Moving from VMWare Server 2 to VMWare ESXi 4.1 – a walkthrough

I’m sitting here gradually migrating a bunch of VMs on to our new server running VMware vSphere Hypervisor Based on ESXi. It’s taking a little while, and I got a bit flummoxed at a couple of points so I thought I might document what I had to do in order to get it all working.

There’s nothing really complex here, but I found it confusing in a number of places, so hopefully this may be of use to others – it will certainly be a memory aid for me in the future.

Background:

We have an old Windows server the free running VMware Server 2 administered via VMware Infrastrutcure Web Access. There are some peculiarities if you want to run a console window in Firefox, but it generally works well, and is free, so I can’t really complain.

Whilst we’re doing this migration, we’re also looking at consolidating software licenses, an obvious candidate is the host machine running VMs – in this case I could either run VMware Server on Windows or Linux, or look at VMware vSphere based on ESXi. I’ve run VMware Server 2 on Ubuntu before – it was a bit of a nightmare and took a couple of days to get working properly, so I was keen to see if ESXi was any better. ESXi also runs bare metal as opposed to on top of another operating system, so there should be some performance benefits too.

So, VMware vSphere ESXi it is then.

All of the VMware software we’re using below is free, but you’ll have to register in order to download it.

Downloading and installing ESXi

Head on down to https://www.vmware.com/tryvmware/index.php, sign your life away with EULAs and T&C’s, and grab a binary – I manually downloaded the ESXi 4.1 Installable Update 1 (CD ISO) image file. Also make a note of the license key.

Once I got the ISO file, I blindly burned a CD, and hit my first obstacle. My HP DL 360 G7 doesn’t have a CD drive. No worries – we’ll create a bootable USB drive.

I already had a bootable Ubuntu thumb drive, so I used 7-zip to extract the contents of the ISO file onto the USB drive. Not too surprisingly, this wasn’t quite sufficient to get a functioning ESXi boot drive working, so instead a quick Google turned up many pages, among them this excellent one by Ivo Beeren detailing how to Install VMware ESXi 4.1 from bootable USB stick, which basically consisted of downloading Syslinux, editing 2 files, copying 2 files, and booting of the USB stick.

After kicking of the installation, a couple of 5 minute pauses and a restart, I was presented with EXSi’s very simple text interface, telling me to administer the server from 192.168.1.10.

Sure enough, on browsing to this address I can see a welcome screen allowing me to access a Web-Based Datastore browser, but also suggesting I download the vSphere Client, which I do.

Administering the host server

Once we’ve downloaded and installed the vSphere Client, we can connect to the server – the credentials set in Ivo’s page above include a root password of VMware01 in the ks.cfg file:

rootpw VMware01

Log into your server, e.g. 192.168.1.10, user: root, password: VMware01.

The first thing that confused me was mention of a 60 day trial – hang on, I’m a cheapskate, and chose ESXi as I thought it was free?!? Don’t worry – it is – just plug in your license key you noted earlier to get rid of the pesky warning.

vSphere -> Home -> Inventory -> Configuration -> Software -> Licensed Features -> ESX Server License Type -> Edit.

Copying pre-existing VMs

OK, so next I’ve got a load of VMs on my old server that I want to get onto the new box. But there’s no network file access, no FTP access, and the Web-Based Datastore browser is read-only. How do we get our VMs onto the new box?

Well, first off, don’t use the approach below – it probably won’t work if your copying old VMware Server 2 VMs. But hidden away in vSphere is a method to upload files to the server:

vSphere -> Home -> Inventory -> Summary -> Resources -> Datastore, right click, Browse Datastore…

Click the Upload files to this datastore toolbar button, and upload either a file or folder as required.

If you upload old VMware Server 2 images using this method, you’ll likely run into the following error when you try to power up your guest machines:

DevicePowerOn power on failed.
Unable to create virtual SCSI device for scsi0:0,
Failed to open disk scsi0:0: Unsupported or invalid disk type 7.
Make sure that the disk has been imported.

So how do we copy VMs and get them to work? Instead of copying the images manually, head back over to VMware and download the vCenter Converter. Install and run this software (again free) and select Convert Machine.

  1. For the Source System, select VMWare Workstation or other VMware virtual machine – and select your .vmx file.
  2. For the Destination System, select VMware Infrastructure and specify the IP address and credentials to connect to the ESXi box.
  3. For the Destination Virtual Machine, specify the name for the machine, likely the same as the original guest, and  review Destination Location, Options and Summary.
The copying will probably take some time, say in the order of 30 minutes for a 10GB machine to 3-4 hours for a 70GB one. Once the copy has completed, you could fire up the guest and hopefully it should come up. However, you’ll probably find that it has no network access.

Enable networking

Head back into vSphere, and enable VM Networking:

vSphere -> Home -> Inventory -> Configuration -> Networking -> Add Networking…

  1. Under Connection Types – specify Virtual Machine, and click Next.
  2. I’m dealing with internal development servers, so I’m not worrying about security here – you may need to. I simply chose the already configured vSwitch0, then clicked Next, specified a Network Label of VM Network, clicked Next again, and then Finish.
  3. Stop your VM if necessary – configure to use the above created Network Connection (VM Network) by going to vSphere -> Home -> Inventory -> <Guest Machine Name> -> Summary  -> Edit Settings, selecting Network Adaptor 1, and then specifying the VM Network network label created above under Network Connection -> Network Label.
  4. Click OK and restart your guest VM.

Your guest machine should now start up, and be on the network!

Advertisements

2 Comments

Filed under Virtualisation

2 responses to “Moving from VMWare Server 2 to VMWare ESXi 4.1 – a walkthrough

  1. alex

    Hi mate,

    I have the same hardware model as you do, hp 360g7 with no dvd and tried following the same tutorial about making the bootable usb disk with esx4.1 u1 from hp.
    Unfortunately for me something goes wrong, cause I get the following error:

    ————————————————————————————————————————————————-
    Error encountered before the user interface was initialized
    ————————————————————————————————————————————————-
    Error (see log for more info):
    This system does not have a network interface card that is plugged in, or all network interface cards are already clained. Installation cannot continue as requested.

    Any ideas why?
    Thx in advance.

  2. Hi Alex,

    I didn’t run into anything like that, and I’m guessing, but wonder if it’s something in the ks.cfg file not being mirrored by your set-up?

    E.g the line below from the ks.cfg file from http://www.ivobeerens.nl/2010/10/25/install-vmware-esxi-4-1-from-bootable-usb-stick/ references a network device called vmnic0, and the IP address is hard-coded as 192.168.1.10 (leaving aside the other bits that need changing like the hostname, etc) – that would probably be the first place I’d look.

    network –bootproto=static –addvmportgroup=false –device=vmnic0 –ip=192.168.1.10 –netmask=255.255.255.0 –gateway=192.168.1.1 –nameserver=192.168.1.1 –hostname=ESXi-01.beerens.local

    Good luck!
    Cheers,
    Leigh.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s