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:

  1. 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.

    ReplyDelete
  2. 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

    ReplyDelete
  3. Your welcome, glad to help :-)

    ReplyDelete
  4. This comment has been removed by a blog administrator.

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

    ReplyDelete
  6. 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!

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

    Is it a permission denied error?

    ReplyDelete
  8. 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

    ReplyDelete
  9. Sorry, a "file permissions" issue

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

    ReplyDelete
  11. 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!

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

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

    ReplyDelete
  14. 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.

    ReplyDelete
  15. 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.

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

    ReplyDelete
  17. 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.

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

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

    ReplyDelete
  20. 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

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

    ReplyDelete
  22. 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

    ReplyDelete