Let’s get Virtual
Right now there’s only one big box (well, two actually, but about that later) running the latest version of VMWare’s fantastic product called ESX 3 and Virtual Infrastructure 2.0.
These are a few of the challenges that arise when you want to virtualize your infrastructure.
1. VMWare only works with specific hardware. It is very picky on the stuff you put into your machine. Check the compatibility lists that are available on www.vmware.com. For guarranteed performance you’ll need to buy stuff like ProLiants, eServers, or other pricy equipment.
2. IDE and SATA are not supported for the VMFS (VMWare File System) that contains your virtual disks. It is not a problem installing ESX itself, but what’s the use if you cannot setup virtual machines.
3. For more than two machines you’ll need a huge amount of memory. Memory and disk I/O is the crux in stable and smooth virtualization.
So, what did I do to get this bunch running on relatively cheap hardware and SATA disks?
I bought myself the ASUS K8N-DRE Server Board (without the SCSI option) which allows you to place dual Opterons for Socket 940. This board only works with Registered ECC memory, which will cost a bit more, but it is doable. For now I have 2 gigs (which is not really enough actually), a CD-ROM player and a 20GB PATA disk for installing ESX.
Next, I took an old mainboard (MSI K8MM) with a Athlon64 processor (but you can probarbly do with less), a VIA RAID SATA controller, 1MB of system memory and an old 3GB IDE disk. This machine I fumbled away under a closet without housing. I stacked up my two 300GB SATA disks from one of my former Windows boxes and connected them using the SATA controller. Now, all I need is an OS and an iSCSI Target!
Let’s talk about this “disk array” box first.
It contains Linux; Fedora Core 5 to be precise. You install it with only the minimum set of components (that’s what I did to make it fit on a 3GB disk), so deselect everything during the install, especially X Windows, KDE and Gnome. You’re not going to need it.
Once up and running, first upgrade the kernel, install kernel-development and install the gcc library. You’ll need this to recompile (make) the new kernel. Do this:
- Type yum install kernel kernel-devel gcc and press Enter. This will upgrade your kernel to a supported level and also install the accompanied development files as well as the gcc compiler. In total there will be around 12 packages to install/upgrade.
- Reboot your Fedora box
- Log back in as root and put the iscsi-target-0.4.13 into your home folder. You can get it at: http://sourceforge.net/project/showfiles.php?group_id=108475
- Run tar zxf iscsi-target-0.4.13.tar.gz to unpack.
- Go to the iSCSI Target subfolder using cd iscsi-target-0.4.13. This is important!
- Export the KERNELSRC variable to the system by typing: export $KERNELSRC=/usr/src/kernels/. . ./i686 and press enter (you need to replace . . . with your kernel version. The TAB-key can help you out here).
- Next type make && make install or type make first and make install when it has finished. If you get errors, you’ll need to find other spots on the internet to make it work. For me, this did the trick. There are loads of info on IET so you shouldn’t have to search long.
- Copy the ietd.conf from the etc subfolder to /etc using the following command: cp etc/ietd.conf /etc
- Edit the /etc/ietd.conf file so that it contains the disks you want to present as LUN’s. vi is the tool for this. If you are now familiar with vi (just like me), just learn the I (Insert) function to start editing, and Esc-wq (Write Quit) and Esc-q! (Quit, Don’t save). You’ll manage!
- To test if iSCSI works, type /etc/init.d/iscsi-target start. You should get an OK.
If your system hangs, there is probarbly a problem with the assignment of the device. Check the correct devicename using tools such as fdisk. - Check to see if you can connect to the iSCSI target from any Windows server. You’ll need the free iSCSI Initiator that is downloadable from the Microsoft Download site: http://www.microsoft.com/downloads/details.aspx?FamilyID=12cb3c1a-15d6-4585-b385-befd1319f825&DisplayLang=en
- Once everything works, just add iSCSI Enterprise Target to the startup by entering chkconfig –add iscsi-target
- To activate it automatically for runlevels 3 and 5 type chkconfig –level 35 iscsi-target on
- Type reboot, disconnect your keyboard, video and mouse and off you go!
For every — in this text, you should enter two minus-symbols (WordPress appears to f*ck this up).
Now we have the iSCSI Target setup and running!
Installing ESX is something I’m sure you’ll figure out yourself.
The only pointer I can give you is that you need a seperate VMKernel adapter to connect to your iSCSI target.
I would suggest using Incoming Authentication in ietd.conf, to use a username and password that’s not easy to guess. You need to enter this ID and password in the iSCSI Initiator in ESX to get things to work.
Good luck. Post your comments if you have questions or updates.
Rob.