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:
1 |
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)
1vi [source.vmx] - 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.
-Lewis
This information is here for assistance as it is for me when I need to migrate again in three years time.
Other resources I used in this tale:
http://communities.vmware.com/message/1346668
http://www.vm-help.com/esx/esx3i/ESXi_enable_FTP.php
http://www.esxguide.com/esx/content/view/18/25/
http://communities.vmware.com/message/1059976
http://communities.vmware.com/message/839647
I am baffled, because for me it just worked, I’m slinging virtual machines around between various ESXi installs and VMware Fusion (same thing as Workstation, except for Mac) without an issue. Perhaps it’s because I am using the Windows version of VMware Converter, which is a higher rev number than the Linux version? Or maybe it’s because VMware Fusion has no flags for filesystem file format other than “break into 2gb chunks” (I chose monolithic here). The only real thing I’ve run into is that when converting a VM to an ova (whether infrastructure or local), I have to convert to a local hard drive — it won’t work if trying to save to a network share. WTF?!
Which brings up the cruddy quality of VMware’s Linux-based CLI tools for managing VMware installations, but that’s a whole different ball of ire.
Hi Eric, I think I discovered the cause of my issues a couple of weeks after writing this tale. I started getting weird issues and the occasional BSOD in Windows so decided to do some memory checking to see if that was causing any problems and lo-and-behold I had 3 out of 4 memory sticks that were bad!
I RMAd them to the manufacturer and although I haven’t tried to convert any more VMs, I’m confident it’ll work as expected now.
The strangest things…
Hi,
I just tried to convert from Workstation 7 to ESXi 4.0 and I did follow all of your steps but when I added the VM to the inventory it’s keep saying that it’s invalid?
Do you have any clue?
Thanks
You just saved me a lot of time my friend. thanks for this article
Thank you, you help me a lot. I have a question, is it possible to resize the disk that I just “upgrade” form the workstation? I resize it once I ran it on the new ESX VM but it just looks resize in the Settings but it doesn´t in the new VM OS – It is running Win XP
thanks four your help
You my friend have saved me days worth of work! Excellent article. I was using the converter to convert my Hyper V VM’s to workstation so that I could then rebuild my Hyper V server to ESXi5.
It worked going to the Workstation VM but failed on the return.
I followed your instructions and I have got back my entire environment including AD Domain Controller and Exchange 2010.
Just a humble note to say thank you 🙂
It *is* worth writing these posts.. Karma counts!
Awesome post :)!