Friday, December 16, 2011

VM Guests Take Forever to Shutdown in VMware Workstation 8

I recently had a situation where a user purchased a new i7 + SSD based laptop. Needless to say, the laptop is fast.

As part of the purchase, the user also upgraded to the latest VMware Workstation, version 8.x. The users RHEL4 guest was transferred over from the old laptop (running an older version of Workstation). It powered up and ran just fine on the new hardware / version of VMware, with the exception of the guest shutdown.

It literally took an hour from the point where the RHEL4 issued the halt to the underlying hardware (i.e. the OS portion of the shutdown is done) to a fully stopped virtual guest. From an appearance stand point, the VM screen turns black and remains that way until it fully stops.

The laptop hard drive indicator was also flashing madly during the entire process.

I found suggestions to prevent virus scanners from scanning .vmdk files, that didn't change the behaviour.

The laptop also uses PGP whole disk encryption. Perhaps Workstation 8 and PGP don't play nicely together? I couldn't find any references. The old laptop (much slower than this) also had PGP with the older VMware Workstation, so PGP didn't seem to be a prime candidate.

I eventually discovered this post on the VMware message boards that provided the solution.

The thread discusses a similar issue happening in VMware Workstation 6.0.4 on Windows XP.

The solution was to add the following lines to either the global VMware config.ini file, or each individual guests .vmx file. Exit out of VMware Workstation before modifying config.ini or the .vmx files


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


With that code added to the configuration file, the virtual machine shuts down immediately after the operating system issues the halt.

Placing the code in the config.ini file affects all virtual machines, new and existing, unless the settings are overridden in the individual .vmx files.

For Windows 7, the config.ini file can be found here
C:\ProgramData\VMware\VMware Workstation\config.ini

For Windows XP it can be found here:
C:\Documents and Settings\All Users\Application Data\VMware\VMware Workstation\config.ini

25 comments:

Anonymous said...

Applied your config.ini change advice and it worked for me!

I allocate 12 GB for the VM and it was taking 20 - 30 minutes to shutdown. Just load it up with the full 12GB and did a shutdown ... 30 seconds later, it was done.

Thanks.

Yiqi said...

Thanks a lot for sharing this! I had the same problem in shutting down my VM guests. It is fixed now after applying the change to VM Workstations's config.ini.

Yiqi Yang

Unknown said...

Your welcome, glad to help :-)

Unknown said...
This comment has been removed by a blog administrator.
Anonymous said...

AWESOME- Thanks for fixing and sharing this- I wasted a lot of time waiting for my images to shutdown before finding this post....

Aaron and Shara said...

I cannot get this to work for some reason....Each time I try to cave the changes in the config file, I get an access denied. I have made sure that the vmware player is shutdown. I am supposed to be making this on the host pc ( the pc where I click the vmware player icon for it to start) correct?

Any help would be greatly appreciated!

Unknown said...

That's odd. Is the host machine Windows, Mac or Linux?

Is it a permission denied error?

Aaron and Shara said...

Win7 just says "Access Denied"

Unknown said...

That sounds like a permissions issue, have a look at:
http://www.addictivetips.com/windows-tips/windows-7-access-denied-permission-ownership/

Hopefully this helps

Unknown said...

Sorry, a "file permissions" issue

Aaron and Shara said...

That did it :) Thank you! Opened the file as administrator andthe change saved

Aaron and Shara said...

I made the change and added the following to the config file in VMWarePlayer:


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

and am still having like 10-15 min shutdown times....Anyone else have any ideas?

Thanks!

Aaron and Shara said...

Anyone :)?

Unknown said...

I'll have to do some digging to see if there are any other options to tune in the config file.

Unknown said...

If you placed the options in the config.ini file, you might try also adding them to the virtual guests .vmx (or equivalent file).

Aaron and Shara said...

Thanks! Do you have a step by step of how to do this please? I dont want to dig without knowing exactly what I am doing.

Unknown said...

This article may help. It discusses how to modify the boot menu delay, but should help.

http://www.howtogeek.com/howto/16876/how-to-increase-the-vmware-boot-screen-delay/

Basically, once you open the vmx file in a text editor (notepad or other), it should be the same as editing the config.ini file.

Aaron and Shara said...

I put the same settings in the .vmx file and still takes a LONG long time to shut down any other ideas? Thanks!

Anonymous said...

Dont forget windows users that you must open the file as an admin. Your normal login probably wont have sufficient rights.


Start a command prompt AS ADMINSTRATOR and modify the file from there.

Worked for me.

Anonymous said...

This fix also works with VMWare Player. Just add the patch to the VMX of the virtual machine.

Unknown said...

Great article ...Thanks for your great information, the contents are quiet interesting. I will be waiting for your next post.
Gaming monitor

crack forever said...

If you want to download latest version of these Cracks Links are Here Below!!
Glary Utilities Pro Crack Free Download
Tenorshare iCareFone Crack Free Download
SmartDraw Crack Free Download
VMware Workstation Pro Crack Free Download
Acronis True Image Crack Free Download

crackermind said...

Nice article and explanation Keep continuing to write an article like this you may also check my website Crack Softwares Download We established Allywebsite in order to Create Long-Term Relationships with Our Community & Inspire Happiness and Positivity we been around since 2015 helping our people get more knowledge in building website so welcome aboard the ship.

cyberghost-vpn-crack

mailbird-pro-crack

vmware-workstation-pro-crack

Mudassara said...

Your post made me think and taught me new things.
VMware Workstation Pro

shah said...

Brilliant showed data. I thank you about that. Most likely it will be exceptionally valuable for my future ventures. Might want to see some different posts on the same subject!
VMWare Workstation Pro