summaryrefslogtreecommitdiffstats
path: root/xci/scripts/vm/start-new-vm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xci/scripts/vm/start-new-vm.sh')
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index 6a877143..5f7fe590 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -83,7 +83,7 @@ update_clean_vm_files() {
[[ $# -ne 1 ]] && usage && exit 1
-declare -r CPU=${XCI_CPU_TYPE:-host-passthrough}
+declare -r CPU=${XCI_CPU_TYPE:-host-model}
declare -r NCPUS=${XCI_NCPUS:-24}
declare -r MEMORY=${XCI_MEMORY_SIZE:-65536}
declare -r DISK=${XCI_DISK_SIZE:-500}
@@ -215,12 +215,12 @@ if sudo vgscan | grep -q xci-vm-vg; then
}
echo "Flusing the ${OS_IMAGE_FILE} image to ${lv_dev}..."
sudo qemu-img convert -O raw ${OS_IMAGE_FILE} ${lv_dev}
- disk_config="${lv_dev},cache=directsync,bus=virtio"
+ disk_config="${lv_dev},cache=unsafe,io=threads,bus=virtio"
else
echo "Using file backend..."
echo "Resizing disk image '${OS}' to ${DISK}G..."
qemu-img resize ${OS_IMAGE_FILE} ${DISK}G
- disk_config="${OS_IMAGE_FILE},cache=none,bus=virtio"
+ disk_config="${OS_IMAGE_FILE},cache=unsafe,io=threads,bus=virtio"
fi
echo "Installing virtual machine '${VM_NAME}'..."
@@ -328,6 +328,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
@@ -340,9 +343,10 @@ if [[ $? != 0 ]]; then
echo "Creating a default test case to run xci-deploy.sh"
cat > ${BASE_PATH}/run_jenkins_test.sh <<EOF
#!/bin/bash
+set -o pipefail
export XCI_FLAVOR=mini
cd ~/releng-xci/xci
-./xci-deploy.sh
+./xci-deploy.sh | ts
EOF
# Copy again
do_copy