Craig Francis


Parallels Setup

I run a lovely little MacBook which helps me test websites I'm developing in Internet Explorer.

The typical setup of Parallels allows this kind of testing, however I have a few additional requirements:

So, the initial installation:

  1. Run the Parallels Installer - at the time of writing I am using version 3, build 4128.
  2. Start the 'Parallels Desktop' application.
  3. Enter your activation key and user name.
  4. Select a 'Windows Express' installation.
  5. Select a 'Windows XP' setup.
  6. Fill in the Windows product key, name and organisation.
  7. Change the name to 'XP', and in the 'more options', set the location to /Users/xxx/Library/Parallels/XP/, and you probably don't want the desktop icon if you use QuickSilver.
  8. As the virtual machine is only going be running a couple of browsers, choose a 'more productive Mac OSX'
  9. Insert the Windows XP CD, or ISO, and install.
  10. When Windows is finally running, shut it down.

While still in Parallels, goto 'Parallels Desktop > Preferences':

  1. General: Set the default folder for the virtual machines to /Users/xxx/Library/Parallels/.
  2. Network: Switch off the DHCP scope for shared and host only networking, as we will be using static IP addresses.
  3. Appearance: Personally I prefer to 'never' show applications in the Dock, use a 'Default' dock icon, and don't let it change the Mac OSX resolution.

Configuration of the virtual machine:

  1. Floppy: Disable, who needs these?
  2. Parallel: Disable, what could you connect to?
  3. Network Adapter: Use a host-only network.
  4. Sound: Disable, not having that OS interrupting my music.
  5. USB: Disable, not connecting anything to it.

After doing this configuration we need to restart the Mac... this is to ensure that the networking is running correctly.

In your Macs 'System Preferences':

  1. Under the 'Network' preference pane, look for the 'Parallels Host-Guest' interface. If you cannot find it, then give your Mac another restart.

    We won't be using the DHCP service, as there needs to be a static IP address for the web-server and DNS to run on - more on this later.

    Edit the current 'Parallels Host-Guest' interface to use:

    • IP Address: 192.168.2.2
    • Subnet Mask: 255.255.255.0
    • Router: Leave blank
    • DNS Servers: 192.168.2.2

    Apply the settings, open a terminal, run 'ifconfig', look for the IP address '192.168.2.2' and then note the interface (e.g. 'en2').

  2. If you are running OSX 10.5:

    1. Return to the 'Network' preference pane.
    2. Change the IP address for the 'Parallels Host-Guest' service to use '192.168.2.1'.
    3. Add a second 'service' (plus arrow at the bottom). Call it something like "Parallels Main", and set the interface to what you noted down earlier (its usually 'en2').
    4. Use the same configuration as 'Parallels Host-Guest' above, but with the IP address '192.168.2.2'.

    We use two interfaces because DNS port 53 on '192.168.2.1', is used when Internet Sharing is enabled... for more information see the '/etc/com.apple.named.conf.proxy' file.

  3. If you want the virtual machine to have access to the internet, open the 'Sharing' preference pane and enable 'Internet Sharing', allowing the main internet connection (Built-in Ethernet), to be shared with the Parallels interface(s), which you noted down earlier (usually 'en2').

Now start the virtual machine and:

  1. Ignore the wining little OS, as it complains about lack of network connectivity... we know!
  2. In the control panel, in the 'classic' view (as I have no idea how to use the other one), select 'Network Connections'.
  3. Right click the 'Local Area Connection' and select 'Properties'.
  4. Double click on the 'Internet Protocol' connection type.
  5. Specify the following setup:

    • IP address: 192.168.2.3
    • Subnet mask: 255.255.255.0
    • Default gateway: 192.168.2.2
    • Preferred DNS server: 192.168.2.2

    You should also switch off the Windows firewall - it just causes too much trouble, for relatively no security improvement.

  6. Also, defying common logic, switch off the 'Automatic Updates' in the control panel... we do not want to install IE7 yet.

Give the Mac another restart, to ensure everything starts up correctly.

Technically the virtual machine is now setup and ready to go, but I would suggest that before you install any more software you should:

  1. Shut down the virtual machine.
  2. Open the folder /Users/xxx/Library/Parallels/XP/
  3. Make a copy of the 'XP.pvs' file, and call it 'XP-cd.pvs'
  4. Using the 'Parallels Desktop' application... change the virtual machines setup so that the CD/DVD device does not 'connect on startup' - this is because you cannot have two virtual machines using the CD drive at the same time.
  5. Then, make some copies of the 'XP' folder, to give you:

    • XP
    • XP-IE6
    • XP-IE7
    • XP-Test

    Most of the time you will be running the XP-IE6 and XP-IE7, without CD support.

  6. For each of the 4 virtual machine copies:

    • Rename the two 'pvs' files to match the folder name.
    • Open the 'pvs' files in a text editor to change the 'Parallels VM Name' value, so that it matches the folder name... and set the 'MAC address' to something unique.
    • Start the virtual machine, using one of the 'pvs' files, and change the last digit in the IP address... and give the computer a unique name in the 'Control Panel > System Properties > Change > Computer name'.

    The theory is that you can now boot all 4 virtual machines, and they can all talk to each-other though the virtual network.

  7. Now you can install the additional software for each machine:

    I would suggest keeping the amount of software installed on XP-IE6 and XP-IE7 to a minimum... and then use XP-Test for installing any random software you want to try out.

  8. Once you have your 'perfect' setup, make a copy of the /Users/xxx/Library/Parallels/ folder, and keep it safe... perhaps on a CD, with the Parallels installation dmg?

As a nice little feature of this setup, you can now configure QuickSilver to index the Parallels folder, so you can quick launch the virtual machines by using the 'pvs' files.

You might also want to look at setting up the Flash Plugin Switcher on the XP-IE6 box, to help you test different installations of the Flash player... although this application only allows switching in version 8 and later for Firefox/Netscape/Opera, the ActiveX versions for IE seem to have locking problems... version 2 - 7 seem to be fine in both set-ups.

And finally, if you will be using your Windows virtual machines for testing your websites, now is a good time to setup the DNS server.

Thank you for reading this article, any feedback would be greatly appreciated. Also, if you would like to take a copy of this article, please read the terms this article is released under. This article was originally written Saturday 16th June 2007 and was updated on Tuesday 1st January 2008.