# Parallels

Related articles

- VMware
- VirtualBox

This article is about running Arch as guest operating system on Parallels.

## Overview

Parallels Desktop is a hypervisor for Mac OSX which allows users to install a variety of operating systems as "virtual machines" (guests) on the host system, reducing the need for managing multiple physical machines. A more complete description on virtualization can be found at Wikipedia. At the moment of writing, Parallels Desktop is at version 9 and the mainline linux kernel is 3.15-rc5 while 3.14.4 is considered stable.

## Installation of Arch as a guest

Parallels Desktop supports Linux guests out of the box, but only offers support for a few Linux distributions - excluding Arch Linux. This means the installation of Parallels tools have not been tested by the vendor, and requires some manual intervention to work under Arch. If you do not wish to use Parallels tools, installation is as simple as choosing "other linux" when creating a new virtual machine and proceeding as you would on any real machine.

## Parallels Tools

### Overview

To improve interoperability between the host and the guest operating systems, Parallels provides a package called "Parallels tools" which contains kernel modules and userspace utilities. Here is a list of its features.

This article assumes users want to make full use of the tools, including Xorg configuration. If you are running a headless server, you can skip over the sections relating to X.

### Required Kernel versions

The tools installer uses binaries which can sometimes be incompatible with the latest version of Xorg or kernels in the Arch repository. This article has been written for Parallels Desktop 9.0.24229 with tools version 991745.

For the X display to work we need to downgrade our kernel to 3.13.8 by following the instructions at Arch_Rollback_Machine (kernel 3.14 causes Xorg to black screen and freeze the system). It's best to make these changes before running pacstrap when installing Arch Linux, as it's not clear if downgrading only the kernel will break other system utilities (although the author has not noticed any problems).

Repository settings for /etc/pacman.conf

    [core]
    #Include = /etc/pacman.d/mirrorlist
    SigLevel = PackageRequired
    Server = http://seblu.net/a/arm/2014/04/09/$repo/os/$arch
    [extra]
    #Include = /etc/pacman.d/mirrorlist
    SigLevel = PackageRequired
    Server = http://seblu.net/a/arm/2014/04/09/$repo/os/$arch

If you are downgrading the kernel (instead of using the rollback machine during arch install), run:

    #pacman -Syy

    #pacman -S linux

### Configuring Xorg

The Parallels tools installer will take care of configuring Xorg, so just follow the instructions at Xorg to install the relevant packages on your system. You will need to use the `xf86-video-vesa` video driver:

    # pacman -S xf86-video-vesa

### Preparing dependencies

The installation script expects to find your init-scripts in `/etc/init.d/` and will fail if it's not present. Since Arch uses systemd, create a symlink to the systemd scripts directory and set the def_sysconfdir variable:

    # ln -sf /usr/lib/systemd/scripts/ /etc/init.d

    # export def_sysconfdir=/etc/init.d

The installation script also expects the file `/etc/X11/xorg.conf`. We can just create an empty file, as it will automatically be configured by the installer:

    # touch /etc/X11/xorg.conf

Lastly, you need to install standard build utilities, python2, and kernel headers:

    #pacman -S base-devel python2 linux-headers

    #ln -sf /usr/bin/python2 /usr/bin/python

### Installing Parallels tools

Choose "install Parallels Tools" from the "Virtual Machine" menu. Parallels Tools are located on a cd-image, which will be connected to your virtual machine. You have to mount it first:

    # mount /dev/cdrom /mnt/cdrom

Now you can proceed to install Parallels tools using the installation script as follows:

    # cd /mnt/cdrom

    # ./install

### Systemd Configuration

The Parallels tools daemon should be started at boot, so create a service file like the following:

/usr/lib/systemd/system/parallels-tools.service

    [Unit]
    Description=Parallels Tools

    [Service]
    Type=oneshot
    ExecStart=/usr/lib/systemd/scripts/prltoolsd start
    ExecStop=/usr/lib/systemd/scripts/prltoolsd stop
    RemainAfterExit=yes

    [Install]
    WantedBy=multi-user.target

And enable the service:

    # systemctl enable parallels-tools.service

You can now reboot your system and Parallels tools should be installed and working.

### Using the Tools

#### Sharing Folders

You can specify which folders on your hosts system you would like to share with your guests under "virtual machine > configuration > sharing". Then you mount a shared folder like this:

    # mount -t prl_fs name_of_share /mnt/name_of_share

#### Dynamic Display Resolution

A very helpful tool is `prlcc`. It changes the resolution of your display (in the guest - not the host) automatically when your resize your window. If this tool is not running, the contents of the window gets stretched or shrunken. prlcc is usually started automatically and runs in the background. If not, run the following (or place it in a configuration file like /etc/X11/xinit/xinitrc.d/90-prlcc):

    $ prlcc &

### Future work

In general, updating system packages like the linux kernel or Xorg can break Parallels tools and you will need to re-install them. In some cases, new packages will be incompatible with the tools and they will stop working - in that case you will need to roll back the newly installed packages and wait until Parallels releases a new product build before updating your guest (in the hope they have resolved any previous incompatibilities).

Category:

- Virtualization