改善 VMware Workstation 9 的 host 的 shutdown 速度

最近把正在使用的 VMware Workstation upgrade 至 version 9,順便處理每次 shutdown Windows host 時需時太久的問題。

Shutdown 最快是 Max OSX,其次是 Linux,最討厭就是 WindowsXP / Windows7,更新了 version 9 是為了測試 Windows 8,Windows 8 關機就更令人火大,由 Windows 轉為黑屏,黑屏至完全關機的時間,實在太…太久!

最直接就是改 VMware 的 config.ini

第一個例子是在這裡找到的,抄錄在這裡:

prefvmx.minVmMemPct = "100"
mainMem.useNamedFile = "FALSE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"


第二個例子比較詳細,在這裡記載,也抄錄在這裡:

Insert the following code into the *.VMX file:
 
	sched.mem.pshare.enable = "FALSE"
	mainMem.useNamedFile = "FALSE"
	prefvmx.minVmMemPct = "100"
	prefvmx.useRecommendedLockedMemSize = "TRUE"
	mainMem.partialLazySave = "FALSE"
	mainMem.partialLazyRestore = "FALSE"
	priority.grabbed = "high"
	priority.ungrabbed = "normal"
 
* sched.mem.pshare.enable = "FALSE", by disabling memory sharing your guests will not share common memory blocks. Your VMware product will also stop comparing memory blocks
* mainMem.useNamedFile = "FALSE", doesn't use named-file - use for VMs on USB-disks or other slow disks. On Windows: useNamedFile= "FALSE" causes memory to be backed by the host's swap space.
* prefvmx.minVmMemPct = "100", fit memory into RAM. Whenever possible, avoid settings lower 100%. 
* MemTrimRate = "0" , by disabling MemTrimRate, memory allocation inside the guest is faster because it doesn't take and give memory to the host os upon all requests.
* prefvmx.useRecommendedLockedMemSize = "TRUE" , this tells VMWare whether to use a fixed sized memory chunk or balloon and shrink memory as needed.
* mainMem.partialLazySave = "FALSE" , do not take snapshots in background
* mainMem.partialLazyRestore = "FALSE" , do not restore snapshots in background
* priority.grabbed = "high" , sets the priority for the VM in grabbed state
* priority.ungrabbed = "normal" , sets the priority for the VM in ungrabbed state.

我採用了第一種方法,黑屏至完全關機的時間跟 Mac OSX 關機的時間差不多,可以接受。