Re: [libvirt] [PATCH 5/6] qemu: migration: warn if migrating with host-passthrough

2016-11-29 Thread Jiri Denemark
On Mon, Nov 21, 2016 at 14:11:55 -0500, Jason J. Herne wrote:
> From: "Collin L. Walling" 
> 
> Warn the user when migrating a guest that is using the host-passthrough cpu
> mode. host-passthrough is not migration safe because the host hypervisor is 
> not
> attempting to block features that may not exist on the destination host.
> 
> Signed-off-by: Collin L. Walling 
> Signed-off-by: Jason J. Herne 
> ---
>  src/qemu/qemu_migration.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index d4a55d8..f721de7 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3151,6 +3151,10 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
>  if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_OUT)
>  qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_BEGIN3);
>  
> +if (vm->def->cpu && vm->def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
> +VIR_WARN("cpu mode 'host-passthrough' may fail migration if 
> destination"
> + " machine is running an older cpu model.");
> +

The warning is not user visible anyway, so there's no real benefit in
adding it. We could document it in formatdomain.html#elementsCPU,
though.

>  if (!qemuMigrationIsAllowed(driver, vm, true, flags))
>  goto cleanup;
>  

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 5/6] qemu: migration: warn if migrating with host-passthrough

2016-11-21 Thread Jason J. Herne
From: "Collin L. Walling" 

Warn the user when migrating a guest that is using the host-passthrough cpu
mode. host-passthrough is not migration safe because the host hypervisor is not
attempting to block features that may not exist on the destination host.

Signed-off-by: Collin L. Walling 
Signed-off-by: Jason J. Herne 
---
 src/qemu/qemu_migration.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d4a55d8..f721de7 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3151,6 +3151,10 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
 if (priv->job.asyncJob == QEMU_ASYNC_JOB_MIGRATION_OUT)
 qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_BEGIN3);
 
+if (vm->def->cpu && vm->def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH)
+VIR_WARN("cpu mode 'host-passthrough' may fail migration if 
destination"
+ " machine is running an older cpu model.");
+
 if (!qemuMigrationIsAllowed(driver, vm, true, flags))
 goto cleanup;
 
-- 
1.9.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list