Thursday 31 January 2008

PXE Boot ESX 3i Installable Edition

My quest for statelessness went one step further today, when I seemingly PXE booted ESX 3i. I say seemingly because I didn't actually run up any VM's on it - I did however join it to VirtualCenter, create a vSwitch and browsed it's datastore, so it's all looking pretty promising.

I'm not suggesting that such a thing should be done in production environments using the 3i installable version, however taking the files from an OEM'ed 3i and ensuring only that specific hardware model can boot that particular image could be a workable solution. I'll post the steps here not because they're especially difficult, but in the hope that others will join the quest and help to shape where VMware is going with all this. So here goes:

1. unzip install.tgz from ESX 3i Installable media

2. unrar install.rar (ie. the contents of install.tgz)

3. Go to \usr\lib\vmware\installer

4. Unzip VMware-VMvisor-big-3.5.0-XXXXX.i386.dd.bz2

You now have the main image transferred to disk when installing ESX 3i

5. Open up the VMware-VMvisor-big-3.5.0-XXXXX.i386.dd image with your tool of choice (I like the free ftk imager lite from AccessData )

6. Extract the mboot.c32 file from the [root] directory of the 'Hypervisor0' partition

7. Extract the entire [root] directory from the 'Hypervisor1' partition

You now have the requisite boot files and image files for a functioning 3i environment. To PXE boot it, just copy all the extracted files to your PXE server, and create a menu option for PXElinux that looks something like:

label 3i
kernel mboot.c32
append vmkernel.gz --- binmod.tgz --- environ.tgz --- cim.tgz --- oem.tgz --- license.tgz

You're now done!

You can obviously go in a few different directions from here... from something as simple as creating DHCP reservations for your hosts and setting the relevant options for hostname and domain name, to modifying the 3i startup script to do something more elaborate.

And again - there could easily be something entirely missing... there's a small vmfs partition on the dd image and I'm not sure what that's for. I'm sure 3i would need some kind of swap partition too which possibly isnt there when it's PXE booted in this manner. Further investigation is warranted (and will be done, at least by me :-)

I'll be following the rabbit hole a little deeper on this one, stay tuned...

Monday 7 January 2008

VirtualCenter Install Video, with Database Setup

In this video I show a semi-distributed VirtualCenter install (ie database is not local) using the command in the earlier post, and go through the database setup as well. I am by no means a DBA, so no doubt there is more that can be done to tune the database than what I show in the video. What I am however is an infrastructure guy, so the database is setup with minimal permissions on the Windows side and (I think) fairly minimal on the SQL side.

I may add a voice over at some point, but until then you can get the drift of what I might draw attention to in a commentary by way of my mouse movements. The database creation and permissioning can of course be scripted, and the last bits of what I do can be completely automated using sc and ntrights, but I thought I'd show it manually for some extra learning goodness. Enjoy!

NOTE: I'm really sorry - I'm still searching for somewhere I can host this video in a reasonable resolution for instructional video! If I don't find somewhere soon, I'll re-record the video and use a magnification tool on the relevant sections of the screen.

Thursday 3 January 2008

Remove Capacity Planner from VirtualCenter 2.5

Capacity planner is rather pesky to have hanging around on every VirtualCenter box in the enterprise... especially if you use some other tool for the job! So just add this line to the end of your VirtualCenter install script:
msiexec /qn /x {2A2750C9-E14E-4635-8595-C1CD214445B0}
and away she goes!

Altenatively, you can simply hide it from the Virtual Infrastructure client by adding the following in the section of vpxd.cfg
<vcp2v>
<dontstartconsolidation>true</dontstartconsolidation>
</vcp2v>

Tuesday 1 January 2008

VirtualCenter 2.5 Silent Install

As with VC 2.0, the unattended install documentation for 2.5 is rather scant. Like most people in large enterprises, I have the requirement to silently install VC, pointing it at a non-local license server and database, and without update manager (separation is for 2 reasons: (1) VUM could be updated out of line with VirtualCenter and (2) I haven't decided what VUM architecture to go with yet :-D).

This can be achieved with the following:
start /wait VMware-vcserver.exe /s /w /v"/qr WARNING_LEVEL=0
LICENSING=custom VPX_LICENSEPATH=27000@hostname.domain VC_EDITION=vc DB_SERVER_TYPE=Custom DB_DSN=\"VC DSN\" INSTALL_VCI=\"\" REBOOT=SUPPRESS"

Of course, if you run that on a command line, you don't need to escape the quotes with a backslash. Also there are some other things that must be setup first... creating the database and DSN in advance etc, I'm putting together a little video to demo that so stay tuned!