[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] Autostarting guests and networks

Daniel P. Berrange wrote:
On Fri, Feb 16, 2007 at 02:51:07PM +0000, Mark McLoughlin wrote:
	We need some way to have libvirtd automatically start guests and

	We had said we should have autostart directories containing config
files of guests/networks which should be autostarted. One problem I see
with that is that we'd need a new API to define autostart configs.

	So, I suggest we add an "autostart" flag to the toplevel element of the

	We could discuss this one at length and I, for one, don't like using
the XML format as an API like this, but ... comments?

I'm not sure that adding a flag to the XML is neccessarily the correct
way to do this. The XML is intended to be a description of the VM's
virtual hardware / resources. Whether a domain autostarts or not is really
administrator defined policy which doesn't match up with intended use of
the XML. Similar reason we don't put VCPU pinning information in the XML,
because its local machine / administrator defined policy rather than a
part of the VM hardware description.

I think I'd probably be more inclined to add a formal API for querying whether a domain autostarts, and a second for setting the autostart
flag on/off.

The old Xend just stuffs VM configs into a special directory to autostart,
so we can detect that by looking for appropriate symlins, and change it
by adding/removing the symlinks. The newer Xen 3.0.4 or later has a formal
API for setting/querying autostart I believe, but can't remember the details
just at the minute.

A case just came up on Fedora-Xen where someone wanted to ensure that one particular domU started before the others. Made me think that we ought to include some well defined way to order the domains we want to autostart. Maybe a sysV init-style thing since we're talking about putting autostart configs in a directory...


Red Hat Virtualization Group http://redhat.com/virtualization
Hugh Brock           | virt-manager http://virt-manager.org
hbrock redhat com    | virtualization library http://libvirt.org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]