Storage driver domains
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.
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:
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.