We help IT Professionals succeed at work.

VMWare auto start and auto shutdown of guest OS's upon host boot and shutdown

byronleonard asked
Medium Priority
Last Modified: 2008-06-20
I am looking for a way to auto start and auto shutdown my VM using VMWare Workstation 5.5

For startup I found this:
    I'm using autologin with a shortcut to vmware.exe in the startup folder. I added a bit to the shortcut
    "C:\Program Files\VMware\VMware Workstation\vmware.exe" -x "c:\vmware\win98.vmx" "c:\vmware\winxppro.vmx"
    Just set the path to your vmx files and remember to check the power on then open in the machine config.

And this:

    A companion to instsrv is srvany.exe and the method for starting VMWare as a
service is as follows: ... http://groups.google.com/group/vmware.for-windowsnt.experimental/browse_thread/thread/5db8fdb1f7bcc469/be8c1febcd7abc65?lnk=st&q=Run+VMware+Workstation+VMs+as+services&rnum=1&hl=en#be8c1febcd7abc65

However for shutdown I do not have a workable solution.

Someone mentioned using the shutdown.exe to shutdown each individual VM, but I can't find any shutdown event on my W2K3 host.

Any ideas,


Watch Question

it can be copied from a windows XP system and works just as well, you MUST use the shutdown reason code major and minor unless you have turned off shutdown reason codes

C:\>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

        No args                 Display this message (same as -?)
        -i                      Display GUI interface, must be the first option
        -l                      Log off (cannot be used with -m option)
        -s                      Shutdown the computer
        -r                      Shutdown and restart the computer
        -a                      Abort a system shutdown
        -m \\computername       Remote computer to shutdown/restart/abort
        -t xx                   Set timeout for shutdown to xx seconds
        -c "comment"            Shutdown comment (maximum of 127 characters)
        -f                      Forces running applications to close without war
        -d [u][p]:xx:yy         The reason code for the shutdown
                                u is the user code
                                p is a planned shutdown code
                                xx is the major reason code (positive integer le
ss than 256)
                                yy is the minor reason code (positive integer le
ss than 65536)




Thanks, but I mean the Shutdown 'event' that I can use to run a script to run shutdown.exe.

For example in my ups software I want to be able to run a script that will shutdown my VM's
I'm not following.  Something (manually or autmatically) has to do the shutdown.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts



I found it.  Thanks.

Start / Run Type gpedit.msc

Computer Configuration / Windows Settings / Scripts (Startup / Shutdown) / Shutdown

Then I can configure a VBScript to run on shutdown.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.