On 03/12/2012 08:31 AM, Jiri Denemark wrote:
When host-model and host-passthrouh CPU modes were introduced, qemu
driver was properly modify to update guest CPU definition during
migration so that we use the right CPU at the destination. However,
similar treatment is needed for (managed)save and snapshots since they
need to save the exact CPU so that a domain can be properly restored.
To avoid repetition of such situation, all places that need live XML
share the code which generates it.
As a side effect, this patch fixes error reporting from
qemuDomainSnapshotWriteMetadata().
---
src/conf/domain_conf.c | 3 ++-
src/qemu/qemu_domain.c | 23 +++++++++++++++++++----
src/qemu/qemu_domain.h | 4 ++++
src/qemu/qemu_driver.c | 9 +++------
src/qemu/qemu_migration.c | 8 ++------
5 files changed, 30 insertions(+), 17 deletions(-)
I haven't tested this as much as I'd like, but by inspection, it looks
right, and I'd rather get it in now so we maximize our testing time.
ACK.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org