diff options
Diffstat (limited to 'remote/modules/vmware')
| -rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc | 8 |
1 files changed, 6 insertions, 2 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 d86a707a..1c7aa533 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,8 +128,12 @@ if [ -n "$SLX_EXAM" ]; then fi # Enable nested virtualization if not specified in remote vmx -grep -qi '^vhv\.enable' "${TMPDIR}/${IMGUUID}" || echo 'vhv.enable = "TRUE"' >> "${TMPDIR}/${IMGUUID}" -grep -qi '^vpmc\.enable' "${TMPDIR}/${IMGUUID}" || echo 'vpmc.enable = "TRUE"' >> "${TMPDIR}/${IMGUUID}" +if [ -e "/run/hwinfo" ] && ! grep -qi '^vhv\.enable' "${TMPDIR}/${IMGUUID}"; 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}" # Killing duplicate lines (output much nicer than sort -u): awk '!a[$0]++' "${TMPDIR}/${IMGUUID}" > "${TMPDIR}/${IMGUUID}.tmp" && mv "${TMPDIR}/${IMGUUID}.tmp" "${TMPDIR}/${IMGUUID}" |
