Focus on Parallels

Parallels is a very convenient way to run Windows and Linux on your Macintosh, in parallel with OS X. It provides a near-native execution speed for such virtual machines, and provides the ability to share files between the Mac and guest operating systems. While that generally works well, there are sometimes problems. Here is what I've encountered, and what I did to resolve.

In academia? Get Parallels Desktop at a low price

The Parallels company will send you solicitations to "Upgrade for $49.99!". (And they will spam you as you launch your aging Parallels Desktop.) Not well known that if you are in academia (student, faculty, staff) you can get an upgrade for $39.99. The entry point for this can be elusive: as of this writing it is at the bottom of page http://www.parallels.com/products/desktop/, but has been seen to be less apparent. Acquisition is serviced through a third party company, OnTheHub. (You can pay via credit card or PayPal.) This annoyingly involves setting up an account, going through a mandatory survey, email verification, and the requirement that you first download an installer program (SecureDownloadManager). As usual, activating the software involved typing in the long key that is provided in the receipt.

"The virtual machine is corrupted"

I have Window 7 virtual machines, both 32-bit and 64-bit. Their usage had been fine, and they were properly operated, with clean shutdowns when done with them. One day, I launced Parallels and, in the virtual machine list, the 64-bit one had an ugly question mark to the left where the start button image should be (and was still, on the 32-bit one). I tried launching the 64-bit W7 from that list. That resulted in an error box, saying:
The virtual machine is corrupted
accompanied by a single choice button saying Remove. This is obviously shoddy, lazy software engineering on the part of that company, providing no assistance or guidance to the customer, let alone any intrinsic means for repair.

Here's how I handled it (which resulted in quick, painless resolution):
I began by performing a general health inspection, going into the Documents/Parallels folder where the virtual machine data is housed. There, I delved into each virtual machine's contents (via Show Package Contents). All files were apparently there, of goodly size. The DiskDescriptor.xml file's content looked fine. Whereas I have Time Machine backups, I decided to proceed with the Remove. Keeping an eye on the virtual machine data directories, I found that they remained intact, as did the virtual machine alias on the desktop. The Remove just removed the virtual machine from the Parallels selection list. I then double-clicked the desktop alias for the problematic 64-bit W7 virtual machine. It launched fine. I shut it down, quit Parallels, and then launched the Parallels application afresh. The 64-bit W7 was reinstated in the VM list, and in a healthy state, where it could be launched cleanly from there.

Advisories

Do not interrupt Windows when it is launching. (You might have cause to do this, as when you accidentally launch one of your Windows VMs, but realize you didn't actually want to do that, and don't want to endure the start-up time — but resist the urge...) Windows remains crappy, even as of Windows 7. If you do interrupt Windows start-up, the next time you start it you will have to go through an ugly, time-consuming recovery operation.

Using Parallels Desktop to run vSphere Client within a Windows VM

The vSphere Client software, which runs only under Windows, is the way to manage VMware virtual machines. Naturally, one wants to do that within Parallels. This all works fine, except for one nagging problem: when a VM console window is opened and clicked in, getting out was not possible. In the bottom margin of that window is advisory: "To release cursor, press CTRL + ALT". Doing that would seem to release the pointer, but then attempting to click in any other area of the Windows session threw the pointer back into that console window. After some cogitation I realized that the problem was likely that Parallels uses the same convention of Ctrl+Alt to release the pointer from its virtual machine environment to get at things in the Mac environment, and that overlap was confusing things. I went into Parallels Desktop's Preferences and changed the Release Input sequence from Ctrl+Alt to the equally convenient Ctrl+Alt+Cmd. (The choice looks grayed out, but double-clicking on it opens it.) With that arrangement I then had no difficulty freeing the pointer from the console window.

Kickstarting a Linux VM in Parallels Desktop

A Linux VM can be kickstarted in Parallels Desktop, but I found it tricky. A kickstart is the standard way of installing Linux. It involves booting from a small, minimal Linux image (ISO) and the provision of a kickstart configuration file which details the ingredients for the Linux system being created, and where to get the actual operating system software (the full-sized Linux).

Preliminary work involves getting a copy of that minimal Linux, as from http://mirror.centos.org/centos/5/os/x86_64/images/boot.iso . Then you create a kickstart file, guided by documents such as Kickstart HowTo and Understanding the kickstart configuration file.

The real challenge came in figuring out how to actually use the kickstart file in the start-up process. In an install, there is a Linux file called isolinux.cfg which defines kernel choices, with labels, and certain options, including a timeout for data entry. When the minimal Linux is booted, it will present a boot: prompt, where you may type override values. Therein you would type linux ks=______, where "linux" does not literally mean Linux, but is one of those labels, this one for the normal Linux kernel stanza in that isolinux.cfg file. The "ks=" specifies where the kickstart file is. You would like it to be a simple file on your Mac. When the kickstart file is a local file, you normally specify it via like ks=file:/path/to/ks.cfg. But: The software operating at that point is, of course, Linux, and it is programmed to work with Linux style file systems (ext3, etc.). It doesn't know how to deal with the Mac file system, so you get a "not found" error — which can be bewildering, as the file certainly is there. So, how the heck can the kickstart file be made to participate in the install? One method is to add it to the mimimal Linux ISO; but that means diddling with a provisioned package, which you simply want to leave and use as-is. I hit upon the idea of using Parallels' Floppy device as the provisioner. This turned out to be an ordeal of discovery in that documentation how to use this is poor or virtually non-existent. I tried creating a .dmg file via OS X Disk Utility and renaming that to .fdd form, as some material suggested. Parallels rejected that. It occurred to me that what I needed was an actual "floppy image". I searched the 'net to find such, which can be found on a few sites such as http://partitionlogic.org.uk/download/index.php. That provides a 1.4 MB xxxx.img file. (Beware: some image files can be defective; if you encounter one, chose another.) Double-click that to mount and open it, then discard all its content and copy your ks.cfg file into it. Also, for good measure, do Get Info on the mount name and change its internal name to "FLOPPY" (to match the Parallels identifier). Unmount that image and then rename it to Floppy.fdd, which causes its icon to magically become a floppy.
How to create a floppy image file: In Terminal, issue the command: dd if=/dev/zero bs=1024 count=1440 > floppy.img. Launch Disk Utility and open that img file from the File menu. Select Erase. For Format, choose "MS-DOS (FAT)". The resulting img file will have a kind of NDIF Disk Image as seen in the Finder; when mounted. A Get Info on the mounted floppy volume will show a format of MS-DOS (FAT12).

At last, we can proceed... In Parallels, create a new virtual machine of Linux type, specifying the variant which most closely resembles yours. (A common one is CentOS.) Specify that the load source be your minimal Linux ISO. Give the VM a goodly name. Go into Virtual Machine > Configure > Hardware > Floppy Disk and there select your Floppy.fdd to be the Source. Make sure the Connected box is checked. Check that CD/DVD 1 is attached to your ISO, and make it first in the Boot Order. Make sure the Connected box is checked. Now start the VM. It should spend a few seconds in its little boot sequence, and then present a splash screen with a boot: prompt. Before its timeout expires, start typing linux ks=floppy. That spec will cause the normal kernel (e.g., vmlinuz) to be used, and specify that your kickstart file is on the floppy device. Press Return after that typing to start the process. You should see a bunch of substantial activity, including going out over the network to download the actual Linux OS software (stage2.img), per the "url" line in your kickstart file.

A general challenge in creating a Linux VM is that Linux often wants arcane disk and other devices which are unobvious in how to define them at the Parallels level. I found nothing on the Web for guidance in that area, so had to derive the following:
In Virtual Machine > Configure > Hardware, for Hard Disk settings:

Parallels Location value Linux Device
IDE 0:0 /dev/hda
SATA 0:1 /dev/sda
SATA 0:2 /dev/sdb

Note that SATA Location values became available as of Parallels version 6.

When your kickstart reaches the Complete milestone (after about an hour), shut it down so that you can change the boot order, and go into Virtual Machine > Configure > Hardware > Boot Order and move Hard Disk 1 to the head of the list, displacing CD/DVD 1. Now you can boot normally.

Links

Parallels sales site
Parallels KnowledgeBase


Back to the Things Apple page