Home > Mac administration, Mac OS X, VMware, VMware ESXi > Migrating OS X VMs to a VMware ESXi server

Migrating OS X VMs to a VMware ESXi server

I’ve started using ESXi servers more and more for hosting my test Macs, both here and at work. As part of that, I’ve found it to be considerably easier for me to build the VM inside of VMware Fusion on my Mac and move it to ESXi, then build it from scratch on my ESXi server.

That said, I’ve found the process for moving OS X VMs has not been straightforward. When I first tried moving 10.8.x VMs, I tried both VMware’s OVF Tool and VMware’s Standalone Converter, but neither initially appeared to provide me with the ability to transfer working OS X 10.8.x VMs.

In the end, I was able to find a way to use VMware’s Standalone Converter to transfer 10.8.x VMs, but the process involves some extra steps on the ESXi server’s end.

The process I’ve developed involves using a Windows 7 VM running inside of VMware Fusion, with the VMware Standalone Converter application installed. One thing to note before proceeding further is that I did not try this with a vSphere server. All my work has been done with VMware’s free ESXi server, so it may be that there’s an easier way to do this with vSphere. See below the jump for details.

1. Launch Standalone Converter and select Convert Machine.

Screen Shot 2013-04-05 at 8.32.25 PM

2. For Select source type: , select VMware Workstation or other VMware virtual machine then hit the Browse button.

Screen Shot 2013-04-06 at 5.24.57 PM

3. Locate the .vmx file stored inside your VMware Fusion VM and select it.

Screen Shot 2013-04-05 at 8.33.19 PM

4. Once the .vmx file is selected, hit the Open button.

Screen Shot 2013-04-05 at 8.33.24 PM

5. Verify that everything looks OK at the Source System window, then hit the Next button.

Screen Shot 2013-04-05 at 8.33.33 PM

6. For Select destination type:, select VMware Infrastructure virtual machine. Once done, supply the login credentials for the ESXi server that you want to copy the VM to and hit the Next button when finished.

Screen Shot 2013-04-05 at 8.34.01 PM

7. 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 8.34.17 PM

8. In the Destination Virtual Machine window, a listing of the current VMs on the ESXi server should appear. Name the VM that’s being imported as desired and hit the Next button.

Screen Shot 2013-04-05 at 8.34.30 PM

9. In the Destination Location window, select the datastore on the ESXi server that the VM will be imported to and hit the Next button.

Screen Shot 2013-04-05 at 8.34.38 PM

10. In the Options window, leave the default settings alone and hit the Next button.

Screen Shot 2013-04-05 at 8.34.52 PM

11. In the Summary window, hit the Finish button.

Screen Shot 2013-04-05 at 8.35.23 PM

Once all the conversion choices have been made, the VM will then be uploaded to the ESXi server. It’s important to know that the OS X VM will upload in an unbootable state.

Screen Shot 2013-04-05 at 9.18.46 PM

Screen Shot 2013-04-05 at 9.53.53 PM

At this point, you will need the VMware vSphere Client application to do the rest of the work on the ESXi server.

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

Screen Shot 2013-04-05 at 9.56.50 PM

14. 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

15. The ESXi administration console should appear, with the uploaded VM appearing as a powered-off VM.

Screen Shot 2013-04-05 at 9.57.46 PM

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

Screen Shot 2013-04-05 at 9.57.56 PM

17. In the Configuration window, select Custom. This option is needed because we want to re-use a part of the uploaded VM.

Screen Shot 2013-04-05 at 9.58.16 PM

18. In the Name and Location window, name the new VM as desired. To avoid problems, name the VM something different from the uploaded VM.

Screen Shot 2013-04-05 at 9.58.27 PM

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

Screen Shot 2013-04-05 at 9.58.33 PM

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

Screen Shot 2013-04-05 at 9.58.38 PM

21. 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-05 at 9.58.49 PM

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

Screen Shot 2013-04-05 at 9.58.55 PM

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

Screen Shot 2013-04-05 at 9.59.04 PM

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

Screen Shot 2013-04-05 at 9.59.09 PM

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

Screen Shot 2013-04-05 at 9.59.17 PM

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

Screen Shot 2013-04-05 at 9.59.26 PM

27. Select the datastore where you had previously uploaded the OS X VM to from the Standalone Converter application and hit the Open button.

Screen Shot 2013-04-05 at 9.59.57 PM

28. Select the folder that corresponds to the name of the uploaded OS X VM and hit the Open button.

Screen Shot 2013-04-05 at 10.00.07 PM

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

Screen Shot 2013-04-05 at 10.00.15 PM

30. Verify that the correct path is showing in the Disk File Path line and hit the Next button.

Screen Shot 2013-04-05 at 10.00.20 PM

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

Screen Shot 2013-04-05 at 10.00.25 PM

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

Screen Shot 2013-04-05 at 10.00.33 PM

The new VM should now listed. At this point, the uploaded VM can now be removed.

33. Select the uploaded VM and select Remove under the Edit menu.

Screen Shot 2013-04-05 at 10.08.31 PM

34. When asked to confirm the removal, hit the Yes button.

Screen Shot 2013-04-05 at 10.08.36 PM

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

Screen Shot 2013-04-05 at 10.08.57 PM

Screen Shot 2013-04-05 at 10.12.39 PM

  1. April 8, 2013 at 11:21 am

    Awesome write up, thanks for sharing.

  2. April 8, 2013 at 5:08 pm

    Just a little question: Will the .vmdk file of the uploaded VM be moved into the folder of the newly created VM or will it stay within the folder it was uploaded to?

    • April 9, 2013 at 12:39 am

      Jens,

      If the new VM is created on the same ESXi datastore as the uploaded VM, the .vmdk will stay within the folder it was uploaded to. The newly created VM will use the existing .vmdk file in place.

      However, if you have multiple datastores and uploaded to one datastore, but created the new VM on another datastore, the .vmdk file will be copied and stored in the folder of the newly created VM on the other datastore.

  3. Tim
    April 9, 2013 at 1:27 pm

    This is very interesting. I would love to do but it was my understanding that the Apple TOS on the OS prohibited it from being run on non-Apple hardware. Is that no longer true?

  4. April 10, 2013 at 2:27 am

    …and Apple only allows you to virtualize two instances per Mac. Hoping that means that means you can only *launch* two at a given time. We just received a new Mac Pro, we’re going to set up ESXi and give it a whirl.

  5. Alan Gordon
    April 10, 2013 at 9:56 am

    or use the vmware-vdiskmanager commandline tool (part of VMware Fusion) to convert the vmdk file into a ESXi compatible format, creat a new VM in vSpehre and uplaod the vmdk file to that VM folder, attach the vmdk file as the hdd….voila done.
    Syntax would be something like this.

    /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -r .vmdk -t 4 <PATHTONEWVMDK/VMDISKFILE.vmdk

    • April 10, 2013 at 12:49 pm

      Thanks, Alan! I wasn’t aware of the vmware-vdiskmanager tool.

  6. April 10, 2013 at 2:11 pm

    Just thought I would leave our experience. We are currently running Vsphere on 2 late model Xserves and 1 latest gen Macmini. Everything works great and the Macs really do an awesome job running any VM. What I ended up doing to move my Mac servers into VM land was to actually create a vmdk disc in Vsphere that had DeployStudio setup on it. I would then Netboot the physical machine and take an image. In vsphere, would setup a new VM that had 1 blank drive and the other the deploystudio vmdk. Set the VM to boot to the deploystudio, restore the disc image of the server to the new drive. After that, shutdown remove the deploystudio drive and you are done. PtoV. 🙂 Works great and did that for about 10 different servers.

  7. Alan Gordon
    April 16, 2013 at 10:54 am

    that a cool method….however that coudl also have been achieved with the vmware-vdiskmanager tool….it can convert physical disks to vmdk’s….I wrote a conversion script for my presso at MacSysAdmin 2012 that will convert a pshysical drive to a vmdk…actually more specifically it will convert a physical maschien to a VM and optinally upload it to a esxi host……just cant seem to find where i put it :-)….I will post it when I find it

  8. admin
    June 17, 2013 at 10:11 am

    Alan, its on the MacSysAdmin website along with a video of your presentation.

  9. Joel
    July 31, 2013 at 4:34 pm

    Hi, thanks for sharing…. I followed all the steps but when I tried to start the VM the MAC logo Apears and It stills there for long time and the VM didn´t start. Any ideas?

    • August 2, 2013 at 2:24 am

      Joel,

      I’ve seen that behavior when attempts are made to run OS X VMs on ESXi servers that are hosted on non-Apple hardware. If that’s the case, there’s no legal fix for that currently.

  10. DPB
    August 29, 2013 at 8:47 am

    Do you know if this method passes the required VMX Intel CPU extensions to the guest for nested virtualization? I’m trying to port a v9 Fusion vm to ESXi and maintain the ability to run a hypervisor (KVM, ftr) in the guest.

  11. Harry
    May 20, 2014 at 9:12 am

    Hi, Thanks for sharing such a useful info. But I want to know that anyhow can we run this on the ESXI that is running on a non-Apple hardware.

  12. knowmad
    February 18, 2016 at 2:56 pm

    for those interested, the link (soemwhat burried) to the script and video that ALan made can be found here: http://documentation.macsysadmin.se/Documentation2012/2012doc.html

  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 )

Connecting to %s

%d bloggers like this: