diff options
author | Dirk von Suchodoletz | 2010-08-22 11:53:51 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2010-08-22 11:53:51 +0200 |
commit | 9aaf9d1b1a898a1ed01f1464783ba3cc23d76fda (patch) | |
tree | 1aa566177b6119ab5a19f4a9699a82be88560c89 /os-plugins | |
parent | Merge branch 'master' of openslx.org:openslx/core (diff) | |
download | core-9aaf9d1b1a898a1ed01f1464783ba3cc23d76fda.tar.gz core-9aaf9d1b1a898a1ed01f1464783ba3cc23d76fda.tar.xz core-9aaf9d1b1a898a1ed01f1464783ba3cc23d76fda.zip |
Allow VMware swapping if ramzswap is active ...
Diffstat (limited to 'os-plugins')
-rw-r--r-- | os-plugins/plugins/vmware/XX_vmware.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index b67c6222..26b49cc5 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -157,11 +157,18 @@ ${vmware_imagesrc}." nonfatal # needed for VMware 5.5.4 and versions below echo -e "\tmount -t usbfs usbfs /proc/bus/usb 2>/dev/null" \ >>/mnt/etc/init.d/boot.slx - - # disable VMware swapping - echo -e '.encoding = "UTF-8"\nprefvmx.minVmMemPct = "100" + + # allow VMware swapping if RamZSWAP is enabled + if grep -E "^ramzswap.*1 -.*" /proc/modules ; then + echo -e '.encoding = "UTF-8"\nprefvmx.minVmMemPct = "50" +prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \ + >/mnt/etc/vmware/config + else + # disable VMware swapping else + echo -e '.encoding = "UTF-8"\nprefvmx.minVmMemPct = "100" prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \ - >/mnt/etc/vmware/config + >/mnt/etc/vmware/config + fi # copy virtualization include files to config dir cp ${PLUGINDIR}/run-virt.include ${PLUGINCONFDIR} |