Autostart XEN Domains

Posted by ads' corner on Saturday, 2013-06-15
Posted in [Linux]

When using XEN you can start virtual machines using xm create. However after rebooting the host machine, the virtual machines are not started automatically. This minor problem is easy to solve. Let’s say the configuration for the virtual machine is in /etc/xen/pluto.cfg:

1
2
3
4
5
6
7
mkdir -p /etc/xen/auto

cd /etc/xen/auto

ln -s /etc/xen/pluto.cfg .

cd -

This creates a link to autostart the virtual machine. The source of the symlink must be an absolute path.

In addition to the symlink, the pluto.cfg file must contain the following entries:

on_xend_stopĀ  = 'shutdown'
on_xend_start = 'start'

If you are using the xm toolkit, you can add these two lines to the template in /etc/xen-tools/xm.tmpl. After these changes, pluto starts when the host system starts.


Categories: [Linux]