Storage driver domains

From Xen
Revision as of 11:10, 3 May 2013 by Royger (talk | contribs) (Created page with "This guide will focus on setting up a Linux guest that will serve disk backends to other guests. ===Storage domain set up=== The first step is to create a Linux PV guest, this w…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This guide will focus on setting up a Linux guest that will serve disk backends to other guests.

Storage domain set up

The first step is to create a Linux PV guest, this will not be explained in this guide since it's assumed that the user has the basic knowledge about how to create new guests. Once the guest is set up, you will need to clone the Xen source code inside the guest:

$ git clone git://xenbits.xen.org/xen.git
$ cd xen

Now we will install the hotplug scripts, udev rules and the necessary Xen tools in order to detect and attach the storage devices to the guest, we need to install a couple of dependencies in order to install all this tools:

# apt-get install build-essential python-dev gettext bcc bin86 iasl uuid-dev ncurses-dev libglib2.0-dev libyajl-dev
# ./configure
# make -C tools/include/ install
# make -C tools/libxc/ install
# make -C tools/xenstore/ install
# make -C tools/hotplug/ install
# mkdir -p /var/log/xen

Now we have the store domain correctly set up, but we have to manually mount xenfs each time the system boots, using the following command:

# mount -t xenfs xenfs /proc/xen

This can be added to /etc/rc.local so it is executed automatically at system boot.

Guest configuration

In order to use a disk that resides in a domain different than Dom0, the guest config file should use a disk specification similar to the following:

'format=raw,backendtype=phy,backend=<driver_domain_name>,vdev=xvda,target=<block_device_path_in_driver_domain>',

It is not possible to use driver domains with pygrub or HVM guests yet, so it will only work with PV guests that have the kernel in Dom0.