[libvirt] [PATCH 1/2] qemu: Perform the disk WWN check only on fresh starts

Jiri Denemark jdenemar at redhat.com
Tue Sep 29 18:39:35 UTC 2015


On Tue, Sep 29, 2015 at 18:38:04 +0200, Peter Krempa wrote:
> Since we'd disallow migration of a guest that would have possibly
> invalid config but still be able to work, relax the WWN check to be
> performed only on new starts of the VM.
> ---
>  src/qemu/qemu_process.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index f2586a1..9c107bd 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -4628,7 +4628,8 @@ int qemuProcessStart(virConnectPtr conn,
>              goto cleanup;
>      }
> 
> -    if (virDomainDefCheckDuplicateDiskWWN(vm->def) < 0)
> +    if (!migrateFrom && !snapshot &&
> +        virDomainDefCheckDuplicateDiskWWN(vm->def) < 0)
>          goto cleanup;
> 
>      /* "volume" type disk's source must be translated before

In other words, this will allow domains started on an older libvirt
(which didn't check for duplicate disk info) to be migrated to or
restored on a new libvirtd, right?

ACK

Jirka




More information about the libvir-list mailing list