libvirt/src/uml
Michal Privoznik 37405b9109 virDomainCreateXML: Don't remove persistent domains on error
https://bugzilla.redhat.com/show_bug.cgi?id=871452

Okay, so we allow users to 'virsh create' an already existing
domain, providing completely different XML than the one stored in
Libvirt. Well, as long as name and UUID matches. However, in some
drivers the code that handles errors unconditionally removes the
domain that failed to start even though the domain might have
been persistent. Fortunately, the domain is removed just from the
internal list of domains and the config file is kept around.

Steps to reproduce:

1) virsh dumpxml $dom > /tmp/dom.xml
2) change XML so that it is still parse-able but won't boot, e.g.
change guest agent path to /foo/bar
3) virsh create /tmp/dom.xml
4) virsh dumpxml $dom
5) Observe "No such domain" error

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-09-24 10:52:37 +02:00
..
uml_conf.c qemu: add udp interface support 2015-09-02 10:17:50 +02:00
uml_conf.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
uml_driver.c virDomainCreateXML: Don't remove persistent domains on error 2015-09-24 10:52:37 +02:00
uml_driver.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00