Tip: How do I Shut Down a Virtual Machine?

There are times when you may want to shut down a Windows® operating system on a Virtual Machine (VM) created using Windows Virtual PC (WVPC). In Windows® XP Mode, by default, the VM gets hibernated upon closing the VM’s window. There are various ways to shut down Windows on the VM:

1. On the VM Windows’s toolbar, click Ctrl+Alt+Del menu item.  Alternatively, you can also press the Ctrl+Alt+End key combination on your keyboard.

Fig. 1

Figure 1: Using Ctrl+Alt+Del for the VM as a toolbar menu item

2.  This opens the Windows Security window inside the VM. Click on the Shut Down button.

Fig 2

Figure 2: Shutting down the VM using the familiar Windows Security dialog options 

3. On the new window, choose the Shut Down option from the drop down.

Fig 3

Figure 3: Shutting down the VM

Use Windows Virtual PC functionality

1. On the VM Windows’s toolbar, click Tools menu item, and click Settings in the drop down menu.

Fig 4

Figure 4: Using the Windows Virtual PC Settings option to shutdown a VM

2. This opens the VM’s settings window. On the left navigation pane, click on “Close” option.

Fig 5

Figure 5: Using the ‘Close’ option in Windows Virtual PC Settings

3. Choose the “Prompt for action” option, and then click “OK”.  Whenever you close the VM’s window, you will be prompted to choose which action to take. You can choose to shut down the virtual machine.

Fig 6

Figure 6. Setting to automatically shutdown a VM every time the VM window is closed

4. Alternatively, If you want to shut down the VM each time you close the VM’s window, then choose the Shut Down option from the drop down menu under the “Automatically close with following action:" option. If you select this option, the VM will shut down each time you close the VM’s window.

Note: This is not a recommended option as it would result in the VM having to boot up from a shutdown stage whenever you launch the VM, or any virtual application for this VM. This significantly increases start up time for the VM or the virtual application.

Rahul Razdan

Program Manager

Microsoft Virtualization Team

Technorati Tags: Windows 7,Windows Virtual PC,Windows XP Mode,Application Compatibility,Windows Upgrade,VPC,VHD,VM,Virtual Machine,Virtualization,Shut down,Hibernate

Comments

  • Anonymous
    January 01, 2003
    @David: Would you please provide more details (trying to launch a virtual application automatically on every boot up of Windows 7 or trying to launch the full VM etc.)?  You can use the email link on the blog (right top corner).  Thanks. Prasad Saripalli (MSFT)

  • Anonymous
    October 29, 2009
    Interesting blog, but how could you get your XP mode to automatically boot up every time You login to Windows 7?

  • Anonymous
    October 30, 2009
    The comment has been removed

  • Anonymous
    December 04, 2009
    My XPMode freezes after a few minutes if I'm trying to install an application from a USB, or trying to copy a folder from a USB. When it does this, it refuses to shut down, and so becomes totally useless. I have installed it several times in both 32-bit and 64-bit versions of 7 Pro N. Can anybody tell me what is going on, and whether I have wasted my money buying a new PC with HAV?

  • Anonymous
    February 08, 2010
    This is absolutely useless if your XP mode won't shutdown. What is needed is to include info how to FORCEFULLY shut it down.

  • Anonymous
    February 26, 2010
    Excellent.  Thanks alot.  This meant that I forced a shut down which was still fine.

  • Anonymous
    March 11, 2010
    Hi, I use XP mode + windows 7 and would like to change shutdown behavior for headless VM mode. The "close" option control the action when close button clicked. But, if virtual PC running in headless mode, I mean non-desktop mode, there is no "close" button. Just application window appears in desktop on windows 7. In this case, if I logoff the windows 7, application in XP mode, for instance IE6, will go into hibernate mode. I think this is default action of XP mode when host OS is shutdown. But, I want to change this behevior to shutdown. The reasion is that I use application distribution tool in XP mode which launched by logon script. So, if XP mode is in hibernate, logon script never executed and it cause my distribution tool never runs. Any ideas?. Thanks in advance.

  • Anonymous
    May 14, 2010
    I am having a problem. I have transferred a hibernated-VMC from PC-A to PC-B. The VMC is configured to have 2GB memory. However the RAM in PC-B is only 2GB and cannot delicate all to the VMC obviously. I'm not able to start the VMC in PC-B. Moreover, i cannot reduce the memory allocation of VMC until I shutdown it (which i'm not able to shut down because I cannot start it, lol) Is there any hope?

  • Anonymous
    July 08, 2010
    I had  the exact problem....changed the setting to shut down, didn't work, at "Choose the Prompt for action”, I chose Turn Off, and it worked...but I think I lost the microsoft office. Thanks, nice article.

  • Anonymous
    August 17, 2010
    The comment has been removed

  • Anonymous
    August 27, 2010
    I am running only certain applications in Windows XP Mode. I don't understand how I am supposed to shut down or log off the virtual machine. The VM starts when I launch the application from the Windows 7 desktop. When I log off, I either get a message that the virtual machine needs to shut down, or I get a message that the machine was shut down with a user logged in when I boot up and launch the program again. The proper way to shut down the virtual machine (without shutting down windows 7) is still unclear to me.

  • Anonymous
    September 04, 2010
    is there a way to desinstall windows xp mode? suddenly XPMUser asked password and I never had any! and will not let me start xp mode. would have to uninstall it to reinstall back. but no idea how. please help!

  • Anonymous
    September 24, 2010
    Windows 7 in XPMODE LOCKED UP IN AUTOCAD THE SCREEN IS FROZEN, Virtual PC AP Mode will not shut down and will not allow me to close AutoCad.

  • Anonymous
    October 01, 2010
    I had exactly the same problem. I could not shut down XPMODE but when I followed this blog I was able to do it. Thanks everyone

  • Anonymous
    August 07, 2012
    The comment has been removed

  • Anonymous
    August 22, 2012
    How do you close the virtual pc in the background (ex. it does this when you open a program integrated from xp mode)

  • Anonymous
    January 01, 2013
    Windows 7 Virtual PC, XP Mode message reads "This computer is in use and has been locked" From toolbar to Settings to Shut Down, but nothing happens I need to force Shut Down or unlock

  • Anonymous
    September 13, 2013
    Start Menu --> "Windows Security" --> Shut Down (select and action: Log off <user>, Shut down, Restart, Stand by, Disconnect) --> "OK"

  • Anonymous
    March 27, 2014
    here is a solution
    http://www.5-9-8.com/index.php?option=com_kunena&view=topic&catid=23&id=20&Itemid=152

  • Anonymous
    April 15, 2014
    Nice article - But I'm locked in XP Mode and can't close it
    And none of your options are working - strange !