More notes on ESXi 4.1 Kickstart

ESXi 4.1 kickstart is adequate for most things but I still have several issues with it that I consider ‘bugs’:

1.  If you’re not connected to a network, it doesn’t work.  This is fine since most people will be on a network with VMware anyway right?  Fine, I’ll let this one slide.  But if you just have a machine and a usb stick, then why do you need the network?  Sure you’ll have it eventually but I just want to test it on my server on my desk…

2.  The kickstart file likes to stop and give you alerts even if everything is ok.  As an example:  In the post install script if I don’t put the interpreter it stops and gives me a note:  “Interpreter not specified, using busybox”  That’s fine, that’s what the default is.  Why stop me?  The docs state clearly that the default is busybox.

3.  Name resolution doesn’t work in postscripts.  If you’re trying to get information from other hosts, it doesn’t work.  Forget it.  Just put in the IP address in your post install script.

4.  USB installations without kickstart don’t work.  You need to have a CD/DVD image.  This is lame.  In an era where most servers I deal with don’t have DVD roms, why make me buy a usb DVD drive?  A $10 usb stick should do this just fine.

5.  Lack of mount support.  This kills me.  I want to have a USB drive boot up ESXi 4.1 in kickstart and then boot up with a virtual machine.  Problem is my virtual machine is 60GB.  After digging around, I see that ESXi 4.1 can get files from a FAT32 filesystem by using the mcopy command.  (It doesn’t do a mount).  But what I really want is ext3 support so that I can copy 60GB files onto a hard disk.  I’m thinking about hacking an ext3 driver for busybox, but I don’t know how difficult that will be.   Right now, my options seem to break up my disk image into 2GB chunks so they fit on the FAT 32 partition… lame.  Anyway, please don’t tell me to consider NFS and all that stuff, because I know that’s the optimal solution.  This project is a little different than what you may be thinking of.

Anyway, I don’t want to keep complaining, so here are some nice things:

Enable SSH on the TSM.

We want SSH on our machines, even if its not supported.  So we add this to our kickstart file:

%firstboot –interpreter=busybox –unsupported –level=47

sed -ie ‘s/#ssh/ssh/’ /etc/inetd.conf

Mounting USB drives

As I mentioned you can’t mount USB drives on ESXi 4.1.  (At least I haven’t figured it out yet).  You can do passthrough with the USB drives so that the VMs can mount them, but you can’t actually mount it on the hypervisor.

However you can copy files from the FAT32 partition.  Here is an example of a command to use in a kickstart file:

mcopy -i /dev/disks/mpx.vmhba32:C0:T0:L0:1 \::IMAGEDD.BZ2 /install_cache/IMAGEDD.BZ2

(In fact, this is the exact command used by the installer to grab the bz2 image from the fat 32 partition)

So if you had a file named foo on there, you could substitute it in for the IMAGEDD.BZ2 file name and copy it onto your hypervisor.  I would do this for copying *vmx files or things like that.

There’s one catch:  The mcopy command is available during installation, but upon reboot, there is no mcopy command!  So if you want it, then a good idea is to copy it during the kickstart file to some place where you can get it after its installed.

Anyway, happy VMware VMworld to all you who are going.

Comments are closed.