[libvirt] [PATCH 3/5] qemu: snapshot: Report better error message if migration isn't allowed

Eric Blake eblake at redhat.com
Tue Dec 11 16:17:42 UTC 2012


On 12/07/2012 04:30 AM, Peter Krempa wrote:
> Qemu doesn't support migration on guests with host devices. This patch
> adds a check to ensure migration is safe before actualy doing so.

s/actualy/actually/

> ---
>  src/qemu/qemu_driver.c | 4 ++++
>  1 file changed, 4 insertions(+)

ACK.

> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 6f8f840..4423e69 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -11428,6 +11428,10 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
> 
>      /* do the memory snapshot if necessary */
>      if (memory) {
> +        /* check if migration is possible */
> +        if (!qemuMigrationIsAllowed(driver, vm, vm->def, false))
> +            goto endjob;
> +
>          /* allow the migration job to be cancelled or the domain to be paused */
>          qemuDomainObjSetAsyncJobMask(vm, DEFAULT_JOB_MASK |
>                                       JOB_MASK(QEMU_JOB_SUSPEND) |
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121211/23db8cbd/attachment-0001.sig>


More information about the libvir-list mailing list