Home > Mac OS X, VMware, VMware ESXi > Migrating OS X VMs files without VMware Standalone Converter

Migrating OS X VMs files without VMware Standalone Converter

In one of the comments to my earlier post about migrating OS X VMs to ESXi, Alan Gordon mentioned another way to convert an OS X VM’s vmdk file to an ESXi-compatible format.

Since the process I developed is ultimately about getting the OS X VM’s vmdk file up to the ESXi server, then building a new VM on the ESXi server to use that vmdk file, this is an easier technique because it allows us to skip using VMware Standalone Converter altogether. Instead, this procedure will use the vmware-vdiskmanager tool included with VMware Fusion and the VMware vSphere Client application. See below the jump for details.

Converting the OS X VM’s vmdk file

1. Open Terminal

2. Run the following command, inserting the correct VMWare Fusion vmdk file source and new vmdk destination:


/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -r /path/to/vmware_fusion.vmwarevm/vmware_fusion.vmdk -t 4 /path/to/esxi.vmdk

Screen Shot 2013-04-15 at 2.40.07 PM

Screen Shot 2013-04-15 at 2.43.48 PM

3. Once the conversion process has completed, you will see that the conversion process has created two files:

filename.vmdk

filename-flat.vmdk

This is normal and ESXi will need both of these files.

Screen Shot 2013-04-15 at 2.44.35 PM

4. Store both files somewhere where you can access them from Windows with the VMware vSphere Client application.

5. Quit out of Terminal.

Using VMware vSphere Client to create a new VM and upload the converted vmdk files

1. Launch VMware vSphere Client and log into the ESXi server.

Screen Shot 2013-04-05 at 9.56.50 PM

2. If the ESXi server is using a self-signed SSL certificate, a warning will appear. Click the Ignore button to continue.

Screen Shot 2013-04-05 at 9.56.57 PM

3. The ESXi administration console should appear.

Screen Shot 2013-04-05 at 9.57.46 PM

4. Select File: New: Virtual Machine… to create a new VM.

Screen Shot 2013-04-05 at 9.57.56 PM

5. In the Configuration window, select Custom. This option is needed because we need to set this VM to initially have no disk associated with it.

Screen Shot 2013-04-15 at 10.17.32 AM

6. In the Name and Location window, name the new VM as desired. In this case, I’m naming it troutont-vm2.

Screen Shot 2013-04-15 at 10.16.47 AM

7. In the Storage window, select the datastore where you want to store the new VM.

Screen Shot 2013-04-15 at 10.17.46 AM

8. In the Virtual Machine Version window, use the default option of Virtual Machine Version: 8.

Screen Shot 2013-04-15 at 10.17.50 AM

9. In the Guest Operating System window, select the following options:

Guest Operating System: Other

Version: Apple Mac OS X 10.7 (64-bit)

Screen Shot 2013-04-15 at 10.17.57 AM

10. In the CPUs window, select the desired number of cores.

Screen Shot 2013-04-15 at 10.18.01 AM

11. In the Memory window, select the desired memory configuration.

Screen Shot 2013-04-15 at 10.18.08 AM

12. In the Network window, select the desired number of network cards.

Screen Shot 2013-04-15 at 10.18.13 AM

13. In the SCSI Controller window, leave it at the default selected SCSI controller.

Screen Shot 2013-04-15 at 10.18.17 AM

14. In the Select a Disk window, choose the Do not create disk option.

Screen Shot 2013-04-15 at 10.18.23 AM

15. In the Ready to Complete window, verify everything looks OK and hit the Finish button.

Screen Shot 2013-04-15 at 4.31.46 PM

The new VM should now be listed. The next step is now to upload the converted vmdk files and associate them with the VM.

Screen Shot 2013-04-15 at 11.21.11 AM

16. In your ESXi server settings, select the Configuration tab then click on Storage.

Screen Shot 2013-04-15 at 4.43.50 PM

17. In Storage, select your datastore and right-click to select Browse Datastore…

Screen Shot 2013-04-15 at 4.44.02 PM

18. In the list of folders that appears, select the folder name that corresponds to the newly-created VM.

Screen Shot 2013-04-15 at 11.20.12 AM

19. Select the Upload button (highlighted in red below.)

Screen Shot 2013-04-15 at 11.20.12 AM

20. Select the filename.vmdk and filename-flat.vmdk files and upload them individually.

Screen Shot 2013-04-15 at 4.46.01 PM

21. Click the Yes button at the Upload/Download Operation Warning window.

Screen Shot 2013-04-15 at 4.46.37 PM

The files will then upload.

Screen Shot 2013-04-15 at 11.05.32 AM

Once both files are uploaded, you should see only the filename.vmdk file showing in the Datastore Browser window.

Screen Shot 2013-04-15 at 4.46.57 PM

Configuring the VM to use the uploaded vmdk

22. Click on the VM and select Edit virtual machine settings under the Get Started tab.

Screen Shot 2013-04-16 at 7.54.27 AM

23. Click the Add… button in the Virtual Machine Properties window.

Screen Shot 2013-04-15 at 11.19.40 AM

24. For Device Type, select Hard Disk

Screen Shot 2013-04-15 at 11.19.52 AM

25. In the Select a Disk window, choose the Use an existing virtual disk option.

Screen Shot 2013-04-15 at 11.19.58 AM

26. Select the datastore with the newly-created VM and hit the Open button.

Screen Shot 2013-04-15 at 11.20.08 AM

27. Select the uploaded .vmdk file inside the VM and hit the OK button.

Screen Shot 2013-04-15 at 11.20.31 AM

28. In the Advanced Options window, leave the settings at the default configuration.

Screen Shot 2013-04-15 at 11.20.41 AM

29. In the Ready to Complete window, verify everything looks OK and hit the Finish button.

Screen Shot 2013-04-15 at 11.20.45 AM

30. The new hard disk should now be listed. Hit the OK button to close the Virtual Machine Properties window.

Screen Shot 2013-04-15 at 11.20.51 AM

With the uploaded VM removed, the new VM can be booted to verify that it is working correctly.

Screen Shot 2013-04-15 at 11.21.28 AM

Screen Shot 2013-04-15 at 11.30.11 AM

Categories: Mac OS X, VMware, VMware ESXi
  1. May 10, 2013 at 3:53 pm

    Hi Rich, thanks for an awesome article. When we run the command to convert to ESXi format, Terminal shows completion, but never gets back to the prompt:

    ———- start ———-
    $ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -r ./OSX-1083-12D78/OSX-1083-12D78.vmwarevm/Virtual\ Disk.vmdk -t 4 ./OSX-1083-12D78.vmdk
    Password:
    Creating disk ‘./OSX-1083-12D78.vmdk’
    Convert: 100% done.

    ———- end ———-

    I waited a couple hours to be sure. ;)

    Don

  2. May 10, 2013 at 5:18 pm

    Don,

    Not sure where the problem is coming in. I just retested on both 10.7.5 and 10.8.3 and this worked fine. One thing I did not do was use sudo to run vmware-vdiskmanager with root privileges; not sure if that makes a functional difference.

    What version of VMware Fusion are you running? All my testing was done with VMware Fusion 5.0.3.

  3. May 10, 2013 at 5:57 pm

    Hi Rich, I’m running 5.0.2 and no updates available. Hmm. I ran it again and it completed fine for both 10.7.5 and 10.8.3. :) The original VMs were about 11 GB, and I noticed if I have “Split into 2 GB files” checked, the converted image is 40 GB, else unchecked it’s 80 GB.

  4. May 10, 2013 at 7:28 pm

    OK, the 10.7.5 virtual machine is 40 GB because VMware Fusion 5 allows that size…the 10.8.3 virtual machine is 80 GB because VMware Fusion 5 doesn’t allow anything smaller. Looking at my notes, I actually got the same behavior on completion as before. 10.7.5 image shows “Virtual disk conversion successful.” but the 10.8.3 image hangs at “Convert: 100% done.” (even though it appears to have completed).

  5. May 10, 2013 at 7:31 pm

    …I just noticed there is a folder and file in the 10.8.3 working folder, the folder being at the same level as the (hopefully) completed converted virtual image:

    WorkingFolder/OSX-1083-12D78.vmdk.lck/M58857.lck

  6. May 10, 2013 at 8:34 pm

    …drumroll, I updated to 5.0.3 and it all works fine now (not sure why VMware doesn’t “see” the update). Have a great weekend. :)

  7. Jeremy
    May 28, 2013 at 9:20 pm

    Is this special sauce to convert the VMs from running on Fusion onto a Bare Iron xServe with ESXI loaded on it or to run in any ESXi environment?

    • May 29, 2013 at 4:29 pm

      The converted VMs will run in an ESXi server installed on Apple hardware. OS X VMs running on non-Apple hardware will violate Apple’s license terms for OS X.

      • Jeremy
        May 29, 2013 at 4:31 pm

        Most excellent! This is why we purchased the non-RAID backplanes for 4 of the last 9 xServes we ordered (after Apple “upgraded” us.. grr…)! :) Just checking :)

  1. No trackbacks yet.

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

Follow

Get every new post delivered to your Inbox.

Join 154 other followers

%d bloggers like this: