Archive
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 vmdm 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.
Running Java 7 in a VMware Fusion 10.8.x VM
As mentioned previously, I’ve moved the majority of my testing to OS X VMs running in either VMware Fusion or VMware ESXi. However, there has been one component of my build testing that I still needed actual Macs for: testing Oracle’s Java 7 updates. The reason for this is that Java 7 crashes when run inside of a VMWare Fusion VM.
Oracle has certified the following virtualization solutions as being Oracle JDK 7 and JRE 7 Certified System Configurations:
Certified:
Not certified:
VMware virtualization solutions
Microsoft virtualization solutions
Unfortunately, that meant unless Oracle or VMware stepped up, Java 7 wasn’t going to run inside an OS X VM. Fortunately, VMware stepped up. There is now a script available from VMware to patch liblwawt.dylib in the Java 7 Runtime Environment. The patch addresses the Java 7 crashing issue, allowing Java 7 Update 17 to run normally in an OS X 10.8.3 VM.
The patch is specific to 10.8.x VMs and does not work in 10.7.x VMs at this time.
I’ve posted a copy of the Python script that applies the patch here on my GitHub repo:
https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/vmware_fusion_java_7_patch
I’ve also built a payload-free package to run the script:
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.
Emulating specific Apple models in VMWare Fusion VMs
Once you have a VM built, you may want to edit it to emulate a specific Mac model. One reason for doing this would be to test model-specific updates from Apple’s Software Update.
To set your VM to report itself as a specific Mac model, you would need to add the hw.model flag to your VM’s .vmx configuration settings. See below the jump for how to do this.
Open Directory needs multiple processors to run in a VM
As more servers and services move off of physical servers and onto virtual servers, there’s been an issue that Mac admins have run into more than once:
“I’m trying to set up Open Directory in this VM, but the service won’t enable.”
Another related issue has to do with Profile Manager, where Profile Manager crashes when you try to set it up in a VM. The root cause is the same: Profile Manager needs to have Open Directory running and Open Directory won’t turn on.
The fix is simple – give your VM more than one processor. Once you give the VM multiple processors (two is fine), Open Directory should begin working. This will also fix the Profile Manager crashing issue, as Open Directory should now enable properly.
As far as I can tell, this is an issue no matter what virtualization solution is being used. It’s been reported on Parallels, VMWare Fusion and VMWare ESXi.
Building Mac test environments with VMWare Fusion, NetBoot and DeployStudio
When new software appears, Mac admins need test boxes that match their standard configuration in order to verify that the new software doesn’t adversely affect anything in their environment. In the past, this has usually meant that admins needed to either have an available test box, or go find one when they needed to test something.
The advent of good virtualization solutions meant it was easier to build test boxes without needing additional hardware, but getting the VM to match your standard could take some time and effort.
In VMWare Fusion 5.x, VMWare added NetBoot support for virtual machines running Mac OS X. This proved to be an enormous boon to Mac admins who used NetBoot to help set up their machines: They could now build VMs using the exact same processes that were used to build their users’ Macs. They could also leverage tools like createOSXinstallPkg to set up template VMs with either the latest available OS X installer from the Mac App Store or custom builds of OS X that ship with new hardware.
See below the jump for an example of how you can leverage VMWare’s NetBoot support, createOSXinstallPkg and DeployStudio to set up a new Mac VM with a factory-fresh install of OS X Mountain Lion.
Setting up ESXi 5.1 on a 2011 Mac Mini Server
One thing I’ve wanted to do for a while is virtualizing my home server setup, as well as making it easier to stand up (and take down) test servers as needed.
I’ve been doing a lot of work with VMWare Fusion on my Mac and could have gone that way, but I wanted to do the virtualization with VMWare’s free ESXi software. I hadn’t previously set up a dedicated hypervisor, so I wanted to learn how to do that.
I have a 2011 Mac Mini Server, which is fortunate because setting up ESXi on that Mini model has been well-documented in a number of places. The latest available version as of this date is ESXi 5.1, so I decided to install that. After some work, I now have ESX 5.1 running on my Mini Server. See below the jump for the details.
Pulling Guest OS information from offline VMWare Fusion VMs
As a related task to my Boot Camp partition detection, I also wanted to see if I could get information on the OS running in VMWare Fusion VMs without the VM actually being up and running. After some poking, I saw that I could get information on running VMs by using the vmrun list command. However, there didn’t see to be a way to pull information on non-running VMs using VMWare Fusion 5′s vmrun command.
After some additional investigation, it looked like the data I wanted was stored in /Users/username_here/Library/Preferences/com.vmware.fusion.plist in the VMFavoritesListDefaults2 plist key. In that plist key, the information I wanted was stored in the guestOS dict. With that information, I was able to use grep and awk to pull just the OS information I wanted. The command I used was:
defaults read com.vmware.fusion VMFavoritesListDefaults2 | grep guestOS | awk '{print $3}' | sed 's/"//g' | sed 's/;//g'
When I did that against my own VMs, here’s the output I received.
Note: One thing to be aware of is that OS X VMs will report their Darwin OS info.
Because this information is stored on a per-user basis, you would need to check each user account to pull the VMs associated with each account.
Booting to a default NetBoot set with VMWare Fusion’s Technology Preview
As a follow-up to the previous post, the NetBoot support built into VMWare Fusion’s June 2012 Technology Preview also supports easily booting to a default NetBoot set.
To boot to a default NetBoot set, hold down the N key on your keyboard when the VM starts up. Just like a physical Mac, the VM should then look for and boot from the default NetBoot set.
An added feature for VMWare Fusion’s NetBoot support is that VMs will automatically try to boot from a default NetBoot set if the VM can’t find a boot OS otherwise. I was able to verify this by setting up a new and completely unconfigured VM, where there was no OS install disk or disk image selected to boot from. (To make sure it was able to see the NetBoot set, I did change the Network Adapter settings to Ethernet Sharing: Ethernet.)
The VM started and found no OS on the VM’s boot disk or elsewhere. It then booted to my network’s default NetBoot set without any intervention on my part.


NetBoot support now available for OS X VMs in VMWare Fusion’s Technology Preview
VMWare has released a new version of their VMWare Fusion Technology Preview. Among its new features is one that Mac admins have been wanting for a while: NetBoot support for OS X VMs.
The NetBoot support is still in the experimental stage, so it currently requires some setup in order to work. See below the jump for the process I’m using.

Recent Comments