Virtualizing Mac OS X Server with Virtual Box

On Monday Oracle released version 3.2 of their VirtualBox software, which was part of their recent acquisition of Sun Microsystems. The update changes the developer references in the program, but also brings another bout of enhancements and optimizations, one of which is support for virtualizing the OS X server. Seeing this as a feature, I couldn't resist giving it a shot to see how it runs.

Editor's Note: Since this story was posted, Oracle has updated its Web site to clarify that VirtualBox is for use only with Snow Leopard Server. Apple's EULA for Snow Leopard allows the installation of one copy of OS X on one Apple-branded computer, while Snow Leopard Server allows additional copies of Mac OS X Server on the same computer, as long as you have licenses for each of these copies. The article has since been updated to reflect this clarification.

On Monday Oracle released version 3.2 of their VirtualBox software, which it now own as part of its recent acquisition of Sun Microsystems. The update changes the developer references in the program, but also brings another bout of enhancements and optimizations, one of which is support for virtualizing OS X (Apple allows virtualization of the Server OS only). Seeing this as a feature, I couldn't resist giving it a shot to see how it runs.

Legal matters

Before testing the software out, I made sure to check the EULA requirements for OS X Snow Leopard Server to see if this venture was acceptable. Apple is fairly stringent on where they allow their OS to be used, so I went ahead and read the full EULA (that long legal paper we usually bypass and shrug off when installing most software) to see the details.

Here is the full EULA for Snow Leopard Server: http://images.apple.com/legal/sla/docs/macosx106.pdf

Overall, Apple currently allows for one installation of Snow Leopard Server per purchased license, and requires that the OS be installed on Apple hardware. In addition, it requires that you do not in any way modify the operating system code. Note that the client version of OS X may only be installed on one computer system at a time, and while at times people have multiple installations for troubleshooting purposes, to regularly use several working copies of the OS X client on one machine is against Apple's EULA.

The installation has optional command-line tools, but does not require a restart. (click for larger view)

With all this in mind, I decided to gather everything together, get the latest version of VirtualBox, and get started:

1. Download and Install VirtualBox

The program is a relatively small 73MB download from the VirtualBox website, and installing is straightforward. After mounting the disk image you double-click the installer package and proceed with a basic installation. The program will install some kernel extensions and startup items, along with optional command-line utilities for managing your VMs. Once the installation is complete, you do not need to restart the system in order to run it.

2. Create a new Virtual Machine

When the VM is set up, you will see a summary window. (click for larger view)

With the program now open it's time to set up a new Virtual Machine. Clicking the small blue "New" icon in the toolbar brings up the virtual machine wizard, where the program runs you through the steps to configure a VM. The wizard prompts you for a VM name, and depending on what you enter will automatically select the operating system type and version. In this case, entering "OS X Snow Leopard" had it select Mac OS X for both the system and version; however, the version list has the option for selecting the 64-bit version (if you plan on running OS X in 64-bit kernel mode). I selected this option, and proceeded with the configuration.

The wizard will create a default 20GB expandable drive for you, and eventually display the whole VM summary before completion. When it is finished you will see the new VM in your VM list, and it will be ready to power up.

3. Enable optional settings

Change VM settings, especially the amount of video RAM, for optimal performance. (click for larger view)

While the VM will work in its default configuration, you may want to optimize it a little by changing a few settings. These include maximizing video RAM and enabling 3D acceleration for optimal video performance. The OS X interface runs off OpenGL and Quartz which require some graphical acceleration for good performance, so I enabled these options in the settings.

In addition you can change the amount of RAM for the VM, and if you dedicate more than 4GB to the machine you might consider changing the OS version to 64-bit. The default number of CPUs used is one; however, you can increase this if you would like. Keep in mind that maximizing the CPUs will reduce the resources available to the host operating system, which may slow things down a bit.

Lastly, change the boot settings. In the "General" settings tab for the VM, uncheck the option for a "Floppy" drive, and then go to the "Storage" settings and select the CD drive. On the right side of the window you will see a drop-down menu that contains a list of attached CD devices, and an option to use an iso disk image as an optical device. Select your CD drive, and then click "OK" to close the settings.

4. Run the installation

Running the installation may look odd at first, since you will see the OS loading every item for the installer. The GUI will load soon after this. (click for larger view)

With the VM all set up, you are ready to install Snow Leopard. Insert your installation disc and wait for it to mount on the desktop. Then click go to VirtualBox, select your VM, and click the start arrow to launch.

Since the system is not running through the virtualized environment you will not see the grey Apple logo screen. Instead, you will see the system loading and configuring itself, and displaying the output similar to when booting OS X in verbose mode. Eventually the OS X installer will load.

Select your language and continue the installation according to your preferences. I did a minimal install to speed things up (disabling X11, fonts, languages, and printers) but ultimately I am not sure how beneficial this is to the installation time. When the installation runs, it may seem to hang at times; however, it will be progressing. My installation took around 35 minutes to complete.

5. Installation complete

The installation is complete, and OS X is running nicely. (click for larger view)

Once the installation finishes, the system reboots and presents the user registration. Oddly there was no introduction video with the spinning multilingual "welcome" words, but that may be due to limited system resources for the VM.

The first bootup is a little slow, and the system lags a bit but upon checking Activity Monitor the single CPU is running a maximum while Spotlight indexes the drive. This takes around 15 minutes to complete, and when it does the system becomes a bit more responsive. Applications launch nicely (though the Dock does run in slow-motion), and moving items around on screen is pretty snappy.

Oddly, while my machine is a 2.66GHz Core2 Duo processor with 1067MHz DDR RAM, the VM reports it as having a 2.79GHz CPU with 1600MHz RAM. In addition, Apple's "Ink" handwriting recognition system is active and available in the system preferences, even though I do not have a tablet connected. I figure these discrepancies are to be expected in the experimental VM setup, and so far have not shown any undesired behavior.



Questions? Comments? Post them below or email us!
Be sure to check us out on Twitter and the CNET Mac forums.

About the author

    Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.

     

    ARTICLE DISCUSSION

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    Hot on CNET

    CNET's giving away a 3D printer

    Enter for a chance to win* the MakerBot Replicator 3D Printer and all the supplies you need to get started.