VMWare Workstation conversion to ESXi 4
…is not made easy by our friends at VMWare.
Oh sure they’ll provide you with a tool called VMWare Converter Standalone which purports to convert your VMWare workstation guests in to fully fledged ESXi compatible versions but does it actually work? In short, no, it doesn’t.
I’m sure that statemt’ll wrangle some VCPs and possibly VMWare themselves but I simply can’t give it anything that could be misconstrued as a seal of approval. The damn piece of software just doesn’t work.
Let me quantify that statement with an example: Last weekend I began the process of building my new ESXi 4 server. Having an existing one that I wanted to tear down and use some parts from, I decided I’d use VMWare Converter Standalone to take the machines from ESXi 4 and put them on my Workstation installation for a short spell while I decommissioned and tore down the old server for parts. Now, to give it its dues, VMWare Converter worked wonderfully for this part of the process and I was left confident that I would be able to reverse the process once the new server was built. Oh how wrong I was.
Having built my new ESXi 4 server, the following 3 days turned in to a litany of disasters and failed attempts to persuade VMWare Converter that if it REALLY tried hard enough, it might actually successfully convert a machine and put it on the ESXi 4 server.
I had two machines I wanted to convert. One is a Fedora 13 install (the one that runs this site) and the other is a Windows Server 2003 R2 box which I run my non Exchange mail server from. Nothing special about these machines and only the Windows box has a second hard drive that is used to store the mail databases so it should be easy.
Fedora 13 box has 1 x 40GB thin provisioned VMDK. The Windows server has 1 x 12GB thin provisioned VMDK and 1 x 30GB thin provisioned VMDK for the databases.
Attempt 1: Simple conversion of Windows Server. Failed to clone disk 1. Time = 3 hours.
Attempt 2: Simple conversion of Windows Server. Failed to clone disk 1. Time = 3 hours.
Attempt 3: Copy of source files of Windows Server to ESX server. Failed to identify source disk V7. = 3 hours.
Attempt 4: Creation and deployment of OVA for Windows Server. Failed to deploy.
Attempt 5: Use Workstation 7 for creation and deployment of OVA for Fedora 13. Success! Huzzah. Quick tinker with settings and it was up and running.
Attempt 6: Use Workstation 7 for creation and deployment of OVF for Windows Server. Failed to deploy. Checksum error.
Attempt 7: Investigate alternatives. Spend two hours banging my head off the desk trying to come up with a solution.
Attempt 8: Copy the files like in attempt 3. Run vmkfstools to convert (clone) the disks directly on the ESX server. Manually rename the disk file name references in the VMX file. Cross fingers, arms, legs, toes, hair folicles. Success!
Yes ladies and gentlement, the only viable option for converting a VMWare Workstation 7 guest to an ESXi host is copy/paste and vmkfstools.
To give you the full info, the command I ran to convert the disks was:
vmkfstools -i "my-source-disk.vmdk" -d zeroedthick "my-destination-disk.vmdk"
I ran the command (obviously swapping the names appropriately) on each of the disks and then manually edited the VMX file to replace the old names with the new disks and it worked. I had some additional playing about to do with the CD-ROM and a couple of other bits and pieces but it took at least eight attempts and a number of clumps of my hair to get those guests on to ESXi.
Not a process I want to have to repeat again any time soon.
If you’re looking for the full breakdown of what I did:
- Use Browse datastore to create a folder for the source guest’s files.
- Upload the source machines guest files to the folder created above.
- On the ESXi host machine, enable the Remote Tech Support Mode (SSH) from Troubleshooting Options. F2 > Login > Troubleshooting Options
- Download Putty (an SSH client) and connect to your ESX server. Login as root with your password.
- Change directory in to the folder where you uploaded your guest’s files. This is usually located in /vmfs/volumes/[datastore]/[Folder created in step1]
- Use the vmkfstools command to import your VMDK. This process will create a new VMDK that is compatible with ESXi.
1vmkfstools -i [source.vmdk] -d zeroedthick [destination.vmdk]
- Rename your original source vmdk file(s) by using the mv command:
1mv [source.vmdk] [source.vmdkOLD]
- Open the VMX file with Vi (a text editor)
- Find the references to the [source.vmdk] files and edit them to reflect the new names of the [destination.vmdk] files. Use the Insert key to edit and then press Esc when you have finished editing.
- Save the edited VMX file. :w
- Exit Vi. :q
- Back in vSphere Client, Browse datastore and import the virtual machine VMX file.
- Your VM should start up.
- It’s up to you if you want to delete your [source.vmdk] files to save space.