From 18ee60104bc8f816b288c463b9aaaf172097dc2d Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Wed, 4 Mar 2015 16:50:49 +0000 Subject: [PATCH] CA-162966: Fix the bug where the GPU value could not be updated via VM Properties for Linux HVM - The problem was that we didn't create a vgpu if the vgpu_type was null. But for Linux HVM, this is gpu passthrough case. Signed-off-by: Mihaela Stoica --- XenModel/Actions/VM/GpuAssignAction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XenModel/Actions/VM/GpuAssignAction.cs b/XenModel/Actions/VM/GpuAssignAction.cs index 14bcf27f6..d73c2479b 100644 --- a/XenModel/Actions/VM/GpuAssignAction.cs +++ b/XenModel/Actions/VM/GpuAssignAction.cs @@ -66,9 +66,9 @@ namespace XenAdmin.Actions string device = "0"; // fixed at the moment, see PR-1060 Dictionary other_config = new Dictionary(); - if (Helpers.FeatureForbidden(vm, Host.RestrictVgpu)) + if (Helpers.FeatureForbidden(vm, Host.RestrictVgpu) || vgpuType == null) VGPU.async_create(Session, vm.opaque_ref, gpu_group.opaque_ref, device, other_config); - else if (vgpuType != null) + else VGPU.async_create(Session, vm.opaque_ref, gpu_group.opaque_ref, device, other_config, vgpuType.opaque_ref); }