mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Fix (managed)save and snapshots with host mode CPU
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().
This commit is contained in:
@@ -13561,7 +13561,8 @@ char *virDomainSnapshotDefFormat(const char *domain_uuid,
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
int i;
|
||||
|
||||
virCheckFlags(VIR_DOMAIN_XML_SECURE, NULL);
|
||||
virCheckFlags(VIR_DOMAIN_XML_SECURE |
|
||||
VIR_DOMAIN_XML_UPDATE_CPU, NULL);
|
||||
|
||||
flags |= VIR_DOMAIN_XML_INACTIVE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user