aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/macos
diff options
context:
space:
mode:
authorRyan Chu <ryan.chu@qt.io>2018-12-03 13:51:46 +0100
committerLiang Qi <liang.qi@qt.io>2018-12-10 14:10:58 +0000
commita6951304782f02400cef961f6ab22f0b4a2a8afc (patch)
treec8fdb69f310cbd3f264d950528ff7be67d8a0f75 /coin/provisioning/common/macos
parent477fc6a73fddd27f468a884c139b82f0a0a5ce7e (diff)
Assert the provisioning process in macOS if VMX is not enabled
The Docker-machine requires VT-x/AMD-v to build up boot2docker virtual machine. The VMX flag should be enabled when deploying the VM into Virtualbox. In the CI framework, it relies on Coin to expose the VMX flag to the CPU feature. To well handle the case that the VMX could be removed due to some CI updates, the provisioning script will assert the process with the related debug message if VMX is not found. Change-Id: I9f3f123d33629df1655a5b55d776d5361878d1f5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'coin/provisioning/common/macos')
-rwxr-xr-xcoin/provisioning/common/macos/docker_testserver.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/coin/provisioning/common/macos/docker_testserver.sh b/coin/provisioning/common/macos/docker_testserver.sh
index 0247921f..051386ea 100755
--- a/coin/provisioning/common/macos/docker_testserver.sh
+++ b/coin/provisioning/common/macos/docker_testserver.sh
@@ -44,6 +44,13 @@ esac
# testserver shared scripts
source "$SERVER_PATH/testserver_util.sh"
+# Nested virtualization - Print CPU features to verify that CI has enabled VT-X/AMD-v support
+cpu_features=$(sysctl -a | grep machdep.cpu.features)
+case $cpu_features in
+ *VMX*) ;;
+ *) echo "VMX not found error! Please make sure Coin has enabled VT-X/AMD-v." >&2; exit 1 ;;
+esac
+
# Create docker virtual machine (Boot2docker)
source "$SERVER_PATH/docker_machine.sh"