CHECK_EQ(ioeventfd, "ioeventfd", true);
CHECK_EQ(event_idx, "event_idx", true);
CHECK_EQ(copy_on_read, "copy_on_read", true);
- CHECK_EQ(snapshot, "snapshot", true);
+ /* "snapshot" is a libvirt internal field and thus can be changed */
/* startupPolicy is allowed to be updated. Therefore not checked here. */
CHECK_EQ(transient, "transient", true);
CHECK_EQ(info.bootIndex, "boot order", true);
virDomainDiskDefPtr disk = dev->data.disk;
virDomainDiskDefPtr orig_disk = NULL;
int startupPolicy;
+ int snapshot;
int ret = -1;
if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
}
startupPolicy = orig_disk->startupPolicy;
+ snapshot = orig_disk->snapshot;
switch ((virDomainDiskDevice) disk->device) {
case VIR_DOMAIN_DISK_DEVICE_CDROM:
goto cleanup;
orig_disk->startupPolicy = dev->data.disk->startupPolicy;
+ orig_disk->snapshot = dev->data.disk->snapshot;
if (qemuDomainDiskSourceDiffers(conn, disk, orig_disk)) {
/* Add the new disk src into shared disk hash table */
return ret;
rollback:
+ orig_disk->snapshot = snapshot;
orig_disk->startupPolicy = startupPolicy;
goto cleanup;
}