VMware ESXi – a sigh of relief!

WHEW!

A couple days ago I relayed the story about how my VMware Server 2 infrastructure was suffering some issues. Basically it would randomly just shut down my VMs. I don’t know why. I absolutely poured over the logs for days on end while simultaneously searching google for *any* inkling or hint of an idea on how to remedy the situation or even why it was happening. Nothing….

Frustrated, I was searching around for a different solution and after passing on Virtualbox, Parallels, KVM and others for various reasons, not the least of which was the learning curve on some, I settled on ESXi. I run a lot of ESX and some ESXi at work, so the familiarity is there and it’s been my experience that it’s a rock solid and stable platform, not to mention that it’s bare metal and wickedly fast.

There were some drawbacks. ESX(i) requires a Windows management interface (or Virtual Infrastructure Controller – VIC) and I wasn’t even sure my hardware would accomidate. You see, ESXi has only a certain set of hardware that it will work with.

Well, after a bit of research, I was mostly convinced that my hardware would work, albeit with a little tweak to get the IDE drive recognised. I registered for, and downloaded the free ESXi 4.x release from http://www.vmware.com/products/esxi/, burned it to a cd and I was off to the races.

The installation was completely a no-brainer. Just put the cd in, boot it up and go. It really is an almost no-touch install. I was also pleasantly surprised that it recognised my IDE drive automatically with no tweaking whatsoever. When the install was done, there were only a couple settings to adjust like configuring the IP address and root password, and they are all accessed and changed in a very plain and simple text interface. All in all, in less than a half an hour and with 1 reboot I had an ESXi server just begging me for some VMs.

Once it was up and running I decided I would try everything possible NOT to have to resort to running Windows at home for a management interface. Luckily, other people have decided the same and there is good information available on the web on using the built in command line tools to do what you need to. And they aren’t difficult at all.

First, I needed to be able to access the command line tools on ESXi, and that required turning on SSH access. I followed the instructions here:
http://www.vm-help.com/esx/esx3i/ESXi_enable_SSH.php

After that, I needed to get my VMware Server 2.x VMs on the ESXi box. I turned to VMware Converter for that. Downloaded it (again free) from VMware and installed it on my VMware Server 2.x host machine so that the converter would have access to the local VM files.

I shut down the VMs and used vmware converter to convert them to the ESXi box. Each conversion of a 12GB VM took approximately 40 minutes (give or take). Since the converter is a GUI app, I did a “ssh -Y vmwareserver2host vmware-converter.pl” to run the converter console on my local machine because my vmwareserver2 machine is a headless server.

When the VMs were converted to the ESXi box, I took a cue from this page:
http://episteme.arstechnica.com/eve/forums/a/tpc/f/833003030931/m/150009304931
to add vncserver to each VM, which allowed me to connect to the VMs and make 1 integral change to each virtual machine when they were running.

To get the machines running I used ESXi’s “vim-cmd vmsvc/getallvms” command on the ESXi box, which listed all the VMs I copied there with their assigned vm number. “Then, I ran vim-cmd vmsvc/power.on #” where number is the vm number listed from the getallvms command.
Once they were started, I used vncviewer to connect to the VMs, log in and fix their networking. You see when you move a vm to a different host machine, the mac address gets reassigned and hoses up your VMs network config. Once that was quickly fixed, I rebooted the VMs and they were good to go!

There are a couple other things that I need to get tweaked, like adding my registration number to ESXi, which I found directions for at http://www.vm-help.com/esx40i/manage_without_VI_client_2.php. I also noticed that vmware adds some filesystem into the VMs /etc/hosts file which errors out on boot. Just comment that out and it’s fine. Lastly, since I migrated the VMs from Server 2.x, they already had the vmware tools from that loaded in and I noticed a little barking about those tools while the VMs were booting, so I disabled them by doing a “service vmware-tools stop ; chkconfig vmware-tools off” on my VMs which are CentOS, so your method of disabling those tools may vary.

My impressions so far: Although this all sounded hard, long and technical, nothing could be farther from the truth. It was extremely easy – much more than I had initially hoped. And, if my VMs *stay running* now, it will be well worth it. I also believe that these VMs ABSOLUTELY SCREAM compared to how they ran before. They are much more responsive now in every way. The change was well worth it!

Leave a Reply

You must be logged in to post a comment.