diff options
| author | Simon Rettberg | 2016-03-29 13:54:36 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-03-29 13:54:36 +0200 |
| commit | c3b47ab89bc1fec92858cc3cdf19722eaf86c46a (patch) | |
| tree | 7ae6973309cc56da38d007af98e79e1b34b21fde /remote | |
| parent | [vmware] Don't enable VT-x virtualization until we know how to check for support (diff) | |
| download | tm-scripts-c3b47ab89bc1fec92858cc3cdf19722eaf86c46a.tar.gz tm-scripts-c3b47ab89bc1fec92858cc3cdf19722eaf86c46a.tar.xz tm-scripts-c3b47ab89bc1fec92858cc3cdf19722eaf86c46a.zip | |
[vmware] Enable nested VT-x again by adding proper check for cpuflag
Diffstat (limited to 'remote')
| -rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc index a77bc171..3796cf5f 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc @@ -128,11 +128,11 @@ if [ -n "$SLX_EXAM" ]; then fi # Enable nested virtualization if not specified in remote vmx -# TODO: Some CPUs don't support VT-x nesting. Disabled until we know how to check this -#if [ -e "/run/hwinfo" ] && ! grep -qi '^vhv\.enable' "${TMPDIR}/${IMGUUID}"; then -# . "/run/hwinfo" -# [ "${HW_KVM}" = "ENABLED" ] && echo 'vhv.enable = "TRUE"' >> "${TMPDIR}/${IMGUUID}" -#fi +if [ -e "/run/hwinfo" ] && ! grep -qi '^vhv\.enable' "${TMPDIR}/${IMGUUID}" \ + && grep -qE '^flags\s*:.*\b(ept|npt)\b' "/proc/cpuinfo"; then + . "/run/hwinfo" + [ "${HW_KVM}" = "ENABLED" ] && echo 'vhv.enable = "TRUE"' >> "${TMPDIR}/${IMGUUID}" +fi # TODO: Need a way to check if supported by hardware before enabling! #grep -qi '^vpmc\.enable' "${TMPDIR}/${IMGUUID}" || echo 'vpmc.enable = "TRUE"' >> "${TMPDIR}/${IMGUUID}" |
