From fbf76c5d243d3815ce2a4bee22e6073ac077ebb6 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 21 Mar 2016 12:17:49 +0100 Subject: [vmware] Enable nested virtualization by default --- .../vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'remote/modules/vmware/data/opt') 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 a8136513..d86a707a 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 @@ -127,6 +127,10 @@ if [ -n "$SLX_EXAM" ]; then echo 'gui.restricted = "true"' >> "$TMPDIR/$IMGUUID" 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}" + # Killing duplicate lines (output much nicer than sort -u): awk '!a[$0]++' "${TMPDIR}/${IMGUUID}" > "${TMPDIR}/${IMGUUID}.tmp" && mv "${TMPDIR}/${IMGUUID}.tmp" "${TMPDIR}/${IMGUUID}" -- cgit v1.2.3-55-g7522