summaryrefslogtreecommitdiffstats
path: root/xci/scripts/vm
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-02-23 14:00:41 +0000
committerMarkos Chandras <mchandras@suse.de>2018-02-23 14:14:02 +0000
commitc5c2f187ff01384e8b9ef323fb5602dcb7154d15 (patch)
tree62d09e7dc8fac6cbad2d9115362f9da75cc9fefe /xci/scripts/vm
parent545874b69ae0f0e4607c44420434b9f1e83fa173 (diff)
xci: scripts: start-new-vm.sh: Disable nested virtualization in clean VM
When using the clean VM for the tests, we will end up with 3 levels of virtualization when functest is executed (1st level = clean vm, 2nd level = compute node, 3rd level = functest VMs). This makes the functest VM terribly slow leading to all sorts of random failures. It appears that KVM can't handle this case, so we need to switch to the QEMU interpreter instead which is slower but functional. This only affects the Jenkins jobs, so deployments on baremetal will still use 2 levels of nested KVM virtualization which should work fine. Change-Id: If274129fbf347526982ac4cf577d216173eb4d1b Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/scripts/vm')
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index f4cec30a..915a7ee2 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -321,6 +321,9 @@ rm ${BASE_PATH}/vm_hosts.txt
$vm_ssh ${VM_NAME} "cp --preserve=all ~/releng-xci/xci/scripts/vm/id_rsa_for_dib /home/devuser/.ssh/id_rsa"
$vm_ssh ${VM_NAME} "cp --preserve=all ~/releng-xci/xci/scripts/vm/id_rsa_for_dib.pub /home/devuser/.ssh/id_rsa.pub"
$vm_ssh ${VM_NAME} "sudo mv /home/devuser/releng-xci/vm_hosts.txt /etc/hosts"
+# Disable 3-level nested virtualization since it makes things terribly slow
+$vm_ssh ${VM_NAME} "sudo bash -c 'echo \"options kvm_intel nested=0\" > /etc/modprobe.d/qemu-system-x86.conf'"
+$vm_ssh ${VM_NAME} "sudo modprobe -r kvm_intel && sudo modprobe -a kvm_intel"
set +e