Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Migrating OS X VMs from VMware Fusion 7 Pro to ESXi 5.5

$
0
0

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.

Screen Shot 2014-10-31 at 9.21.50 AM

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.

2. VMware Fusion 7 Pro will build VMs by default using VMware’s Hardware Version 11.

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

Pre-requisites:

  • 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).

Setting Fusion-built VMs to use Hardware Version 10

1. Create a new VM and choose an appropriate OS.

Screen Shot 2014-10-31 at 7.51.03 AM

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.

3. In the VM settings, go into USB & Bluetooth

Screen Shot 2014-10-31 at 12.15.53 PM

4. In the USB & Bluetooth settings, set it to use USB 2.0 instead of USB 3.0. USB 3.0 is a new feature with VMware’s Hardware Version 11 and not supported on Hardware Version 10.

Screen Shot 2014-10-31 at 7.54.01 AM

Screen Shot 2014-10-31 at 7.54.06 AM

5. Go back out to the VM settings, then select Camera.

Screen Shot 2014-10-31 at 12.15.55 PM

6. In the Camera settings, click the Remove Camera button.

Screen Shot 2014-10-31 at 7.54.32 AM

7. When prompted, confirm that you want to remove the camera by clicking the Remove button. The camera is a new feature with VMware’s Hardware Version 11 and not supported on Hardware Version 10.

Screen Shot 2014-10-31 at 7.54.47 AM

8. Go back out to the VM settings, then select Compatibility.

Screen Shot 2014-10-31 at 12.15.45 PM

9. Change the Use Hardware Version: setting to 10 and click the Apply button.

Screen Shot 2014-10-31 at 7.53.22 AM

Screen Shot 2014-10-31 at 7.55.15 AM

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…

3. In the login window that appears, enter the server address of your ESXi server, username and password as appropriate.

Screen Shot 2014-10-31 at 7.56.22 AM

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.

3. Right-click on the shutdown VM and select Upload to Server…

Screen Shot 2014-10-31 at 8.38.17 AM

4. If prompted, select your destination server and click the Continue button.

Screen Shot 2014-10-31 at 8.38.52 AM

5. A new Upload Virtual Machine window will appear.

6. Select the ESXi datastore that you want to upload your Fusion-built VM into and click the Upload button.

Screen Shot 2014-10-31 at 8.39.00 AM

7. The selected VM will upload to the ESXi server.

Screen Shot 2014-10-31 at 8.39.09 AM

8. Once the upload is completed, the newly-uploaded VM will appear in your ESXi server’s list of VMs as a powered-off VM.

Screen Shot 2014-10-31 at 8.39.54 AM

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.

Screen Shot 2014-10-31 at 8.46.10 AM

4. At the bottom of the uploaded_vm_name_here.vmx file, add the following entry:

smc.present = "TRUE"

Screen Shot 2014-10-31 at 9.07.03 AM

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:

Name: smc.present
Value: TRUE

Screen Shot 2014-10-31 at 9.04.49 AM

Once the VM has been uploaded and the VM’s uploaded_vm_name_here.vmx configuration file has been edited, your ESXi-hosted OS X VM should now be ready to go.

Screen Shot 2014-10-31 at 12.20.32 PM

Screen Shot 2014-10-31 at 12.21.05 PM



Viewing all articles
Browse latest Browse all 764

Trending Articles