]> xenbits.xensource.com Git - libvirt.git/commit
snapshot: forbid snapshot on autodestroy domain
authorEric Blake <eblake@redhat.com>
Fri, 26 Aug 2011 23:29:18 +0000 (17:29 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 30 Aug 2011 17:03:54 +0000 (11:03 -0600)
commit173015bec6a08d61fa7bc3df06956484b1d1a294
treee180ea3a3bc43c899c2721c8143db3af103efe51
parent4521ffabebde75c0c3c7cc88d1b6eaeedbe50e0f
snapshot: forbid snapshot on autodestroy domain

There is no reason to forbid pausing an autodestroy domain
(not to mention that 'virsh start --paused --autodestroy'
succeeds in creating a paused autodestroy domain).

Meanwhile, qemu was failing to enforce the API documentation that
autodestroy domains cannot be saved.  And while the original
documentation only mentioned save/restore, snapshots are another
form of saving that are close enough in semantics as to make no
sense on one-shot domains.

* src/qemu/qemu_driver.c (qemudDomainSuspend): Drop bogus check.
(qemuDomainSaveInternal, qemuDomainSnapshotCreateXML): Forbid
saves of autodestroy domains.
* src/libvirt.c (virDomainCreateWithFlags, virDomainCreateXML):
Document snapshot interaction.
src/libvirt.c
src/qemu/qemu_driver.c