mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virsh: doMigrate: Require --copy-storage-(all|inc) with --migrate-disks
Users need to enable non-shared-storage migration, otherwise the disks specified via '--migrate-disks' will be ignored. Add an error message to inform the users of their wrong config. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
1c2bd205ed
commit
85688f475f
@ -11204,6 +11204,11 @@ doMigrate(void *opaque)
|
||||
if (opt) {
|
||||
g_autofree char **val = NULL;
|
||||
|
||||
if (!(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC))) {
|
||||
vshError(ctl, "'--migrate-disks' requires one of '--copy-storage-all', '--copy-storage-inc'");
|
||||
goto out;
|
||||
}
|
||||
|
||||
val = g_strsplit(opt, ",", 0);
|
||||
|
||||
if (virTypedParamsAddStringList(¶ms,
|
||||
|
Loading…
Reference in New Issue
Block a user