Skip to content

Autostart XEN Domains

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:

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.