diff options
author | Ryan Chu <ryan.chu@qt.io> | 2018-12-03 13:51:46 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-12-10 14:10:58 +0000 |
commit | a6951304782f02400cef961f6ab22f0b4a2a8afc (patch) | |
tree | c8fdb69f310cbd3f264d950528ff7be67d8a0f75 /coin/provisioning | |
parent | 477fc6a73fddd27f468a884c139b82f0a0a5ce7e (diff) | |
download | qt5-a6951304782f02400cef961f6ab22f0b4a2a8afc.tar.gz |
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')
-rwxr-xr-x | coin/provisioning/common/macos/docker_testserver.sh | 7 |
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" |