Configure, Create and Start the Guest System

  1. First, we need to modify the default settings for virtual machines in /etc/xen-tools/xen-tools.conf, which in this case concerns a Debian installation. Adjust the file as follows:

dir = /home/xen

[...]

Memory = 512Mb Swap = 512 Mb dist = lenny Default distribution to install

[...]

dhcp = 1

[...] passwd = 1

[...] kernel = /boot/vmlinuz-`uname -r` initrd = /boot/initrd.img-`uname -r`

[...] mirror = http://ftp.de.debian.org/debian/

[...] serial_device = hvc0

[...]
disk_device = xvda
  1. Now we can create our guest domain called cs2-xen e.g.:

# xen-create-image --hostname=cs2-xen --role=udev
  1. While creating the guest system, you will be prompted for the root password. After providing that, add the PCI device to the guest, that we isolated from dom0 before, by adding the following line to the configuration file /etc/xen/cs2-xen.cfg:

pci=[03:07.0]
  1. Start the guest system:

# xm create /etc/xen/cs2-xen.cfg

You can list all running virtual machines with the following command:

# xm list
  1. First, log onto the guest system using the Xen console:

# xm console cs2-xen

And prepare it for SSH:

# apt-get install udev

Add the following line into /etc/fstab:

none /dev/pts devpts defaults 0 0

# mkdir /dev/pts

# mount -a
  1. Now, find out the DHCP assigned IP address running the command ifconfig and log onto the guest machine using SSH:

# ssh <ip-of-domU>
  1. Check if the correct PCI(e) device is passed through to the guest system:

# lspci

00:00.0 Network and computing encryption device:

Quicklogic corporation Device 0006 (rev 01)