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.
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:
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.
- For the Source System, select VMWare Workstation or other VMware virtual machine – and select your .vmx file.
- For the Destination System, select VMware Infrastructure and specify the IP address and credentials to connect to the ESXi box.
- 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.
vSphere -> Home -> Inventory -> Configuration -> Networking -> Add Networking…
- Under Connection Types – specify Virtual Machine, and click Next.
- 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.
- 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.
- Click OK and restart your guest VM.
Your guest machine should now start up, and be on the network!