From 610f7986e4c5cf62197006121ed9e6cf357b5a15 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Wed, 21 Jun 2023 07:30:35 -0700 Subject: [PATCH] check: Relax the unrestricted_guest check when running in a VM When running on a VM, the kernel parameter "unrestricted_guest" for kernel module "kvm_intel" is not required. So, return success when running on a VM without checking value of this kernel parameter. Signed-off-by: Archana Shinde --- src/tools/kata-ctl/src/arch/x86_64/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tools/kata-ctl/src/arch/x86_64/mod.rs b/src/tools/kata-ctl/src/arch/x86_64/mod.rs index fb2d0a35e..67fd4ddc8 100644 --- a/src/tools/kata-ctl/src/arch/x86_64/mod.rs +++ b/src/tools/kata-ctl/src/arch/x86_64/mod.rs @@ -238,13 +238,9 @@ mod arch_specific { let running_on_vmm_alt = running_on_vmm()?; + // Kernel param "unrestricted_guest" is not required when running under a hypervisor if running_on_vmm_alt { - let msg = format!("You are running in a VM, where the kernel module '{}' parameter '{:}' has a value '{:}'. This causes conflict when running kata.", - module, - param_name, - param_value_host - ); - return Err(anyhow!(msg)); + return Ok(()); } if param_value_host == expected_param_value.to_string() {