]> xenbits.xensource.com Git - libvirt.git/commit
xen-xm: fix data loss in domain edit
authorPhilipp Hahn <hahn@univention.de>
Mon, 6 Feb 2012 13:09:12 +0000 (14:09 +0100)
committerEric Blake <eblake@redhat.com>
Mon, 6 Feb 2012 22:14:36 +0000 (15:14 -0700)
commit700102c992b596bb9d2002c9c033ed006ad6f188
treedbabee56e7e2ac5e1c39c9f66415a50c3dfd7cba
parentc052d8a89f6df81822abbd0a3204d47f402f6de4
xen-xm: fix data loss in domain edit

On CentOS5:
If "virsh edit $DOM" is used and an error happens (for example changing
any live cycle action to a non-existing value), libvirt forgets that
$DOM exists, since it is already removed from the internal hash tables,
which are used for domain lookup.
In once case (unreproducible) even the persistent configuration
/etc/xen/$DOM was deleted.

Instead of using the compound function xenXMConfigSaveFile() explicitly
use xenFomatXM() and virConfWriteFile() to distinguish between a failure
in converting the libvirt definition to the xen-xm format and a problem
when writing the file.

Signed-off-by: Philipp Hahn <hahn@univention.de>
src/xen/xm_internal.c