mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 21:45:21 +00:00
qemu: migration: Disallow migration of read only disk
Currently Libvirt allows attempts to migrate read only disks. Qemu cannot handle this as read only disks cannot be written to on the destination system. The end result is a cryptic error message and a failed migration. This patch causes migration to fail earlier and provides a meaningful error message stating that migrating read only disks is not supported. Signed-off-by: Corey S. McQuay <csmcquay@linux.vnet.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
parent
043ba4a40a
commit
8ee8f939fe
@ -1765,6 +1765,12 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
||||
if (!qemuMigrateDisk(disk, nmigrate_disks, migrate_disks))
|
||||
continue;
|
||||
|
||||
if (disk->src->readonly) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("Cannot migrate read-only disk %s"), disk->dst);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
VIR_FREE(diskAlias);
|
||||
if (!(diskAlias = qemuAliasFromDisk(disk)))
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user