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

Re: [libvirt] Reusing dumpxml output

On Thu, Aug 14, 2008 at 01:04:56AM +0200, Stefan de Konink wrote:
> I would like to reuse configurations that have been edited using the
> libvirt api. For example by attaching interfaces.
> Now the output that dumpxml generates, is very 'specific' to an active
> configuration. I am not able to use a stored configuration from an active
> domain to redefine it after it has been undefined. Is there a trick to do
> so? Or should one really strip all 'live' attributes first?

The XML is supposed to be idempotent - the XML you get from 'dumpxml'
should be able to be fed back into 'create' resulting in exactly the
same VM config.

Previously there were a few places where you had to tweak the XML,
eg to remove the auto-allocated VNC port, or remove the VIF target
device name. In current CVS those issues are all fixed, so you should
not have to change anything in the XML.  So any further problems in
this area are definitely bugs.

There is also the option to request the 'inactive' XML dump for a running
domain which removes any auto-allocated params. This is just a convenience
though, and not required for re-creating the VM later.

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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