Migrating OS X VMs from VMware Fusion 7 Pro to ESXi 5.5
A new feature that appeared in VMware Fusion 7 Pro was its new ESXi management. This included the ability to upload VMs from Fusion directly to an ESXi server. However, when I tried to upload OS X VMs something seemed to go wrong. The upload would work, but the OS X VM would then hang on boot.
Non-OS X VMs were uploading fine, so the problem was specific to OS X VMs. Since I could still build OS X VMs using the Windows vSphere client, I didn’t invest a lot of time into solving this issue. Fortunately, Calum Hunter was more motivated in this regard and found a solution.
There are a few things to know about if you want to upload an OS X VM to an ESXi server running 5.5, so I’ve put together a procedure for those who want to leverage Fusion 7 Pro to upload OS X VMs. See below the jump for the details.
There’s three issues to be aware of when uploading OS X VMs to ESXi 5.5:
1. ESXi 5.5 supports up to VMware’s Hardware Version 10.
3. The upload process to ESXi 5.5 will not tranfer the necessary smc.present = “TRUE” attribute from the Fusion VM’s .vmx configuration file. This attribute allows the VM to check and detect that it’s running on Apple hardware. Without this check succeeding, the VM assumes it’s running on non-Apple hardware and will then hang during the boot process (which is why I was seeing the hang in my previous upload attempts.)
- VMware Fusion 7 Professional
- A fully-updated ESXi 5.5 server running on Apple hardware. As of October 31, 2014, the latest version should be ESXi 5.5 Patch03 (ESXi550-201410001).
Update: 3-30-2015 – If you are running ESXi 6.x, both VMware Fusion 7.x and ESXi 6.x support VMware’s Hardware Version 11. Downgrading to Hardware Version 10 will not be necessary if transferring to an ESXi 6.x server.
Setting Fusion-built VMs to use Hardware Version 10
Note: If you’re planning to upload a 10.10 VM, choose OS X 10.9 in this window. VMware Fusion’s setup process will not allow a 10.10 VM to use Hardware Version 10. In my testing, 10.10 runs fine even when the VM’s selected OS is 10.9.
2. Once the VM is created and you’ve set your preferred memory, processor and memory settings, shut down the VM and then go into the VM settings.
8. Go back out to the VM settings, then select Compatibility.
At this point, your OS X VM should be set to use Hardware Version 10 and ready for uploading to ESXi 5.5.
Connecting to ESXi 5.5 from VMware Fusion 7 Professional
1. Launch VMware Fusion 7 Professional if needed.
2. Under the File menu, select Connect to Server…
Exporting VMs from VMware Fusion 7 Professional to ESXi
1. Shut down the Fusion VM that you want to copy to your ESXi server.
2. Connect to your ESXi server if you hadn’t previously.
4. If prompted, select your destination server and click the Continue button.
5. A new Upload Virtual Machine window will appear.
Editing the OS X VM’s .vmx file
Before booting your VM, you will need to edit the uploaded VM’s .vmx configuration file to add the smc.present = “TRUE” attribute back to the .vmx file. There’s a few ways to do this, but I used SSH and Cyberduck’s ability to edit remote files.
With TextWrangler set in Cyberduck as my preferred editor, here’s the procedure I used:
1. Connect to the ESXi server with Cyberduck via SFTP
2. Navigate to /vmfs/volumes/datastore_name_here/uploaded_vm_name_here/
3. Select /vmfs/volumes/datastore_name_here/uploaded_vm_name_here/uploaded_vm_name_here.vmx and click the Edit button in the Cyberduck browser window.
4. At the bottom of the uploaded_vm_name_here.vmx file, add the following entry:
smc.present = "TRUE"
5. Save the changes in TextWrangler. That save process will then enable Cyberduck to write the changes back to the uploaded VM’s uploaded_vm_name_here.vmx configuration file on the ESXi server.
6. Disconnect and then quit Cyberduck.
If you’re more comfortable editing these changes with the Windows vSphere client’s editor, first make sure you’re running the vSphere 5.5 Update 2 client. Once that’s sorted, you’ll need to add the following setting to the uploaded_vm_name_here.vmx configuration file: