Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Virtual PC on Windows 7 and have periodically gotten this error when trying to shut down:

Cannot shutdown a locked virtual machine.

Google search on "locked virtual machine" Virtual PC revealed no solution for Virtual PC.

share|improve this question

Just to clarify what needs to be done here:

My problem was caused by the 'logon.scr' screensaver in the virtual machine (in the Control panel, it was set to 'none').

I went into task manager and killed logon.scr. I could then shutdown successfully.

Changing the following registry setting will prevent recurrence:

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]


Change to:


This will disable the logon.scr screensaver, which is the screensaver used before the user logs in and it is run as a system process.

See the comments to this entry:

share|improve this answer

What you can also do is execute the command line:

shutdown -r -f 
  • Remove -r if you don't want it to restart.
  • Use /? to find out more about the shutdown command.
share|improve this answer
up vote 2 down vote accepted

Possible solution: (This Google result was ...loading... for a minute or two and I'd given up on it... then it loaded after I posted. Haven't had the "locked virtual machine" again yet.

Found on:

Recent Edits : Tags: a or solution virtual shutdown cannot machine restart locked I ran into this problem after installing and updating versions of .net 1 - 3.5 under Windows XP pro SP3. I found the problem to be caused by the 'On resume, Display Welcome Screen' option in the virtual machine. You may have to use taskmgr to kill logon.scr. Once logon.scr is no longer active in the virtual machine you won't get the message stating ' You can not shutdown a locked virtual machine.' when you try to shut it down. Di....

share|improve this answer
I just changed the LOGIN.SCR in the virtual PC - go here for instructions on how to: – Matt 'Trouble' Esse Oct 20 '10 at 23:53

You may also have to open Task Manager and manually end the logon.scr process after editing the registry value, for that shutdown. Or do it like yoann/8088 said and run shutdown via the command prompt.

share|improve this answer

from one of the links above I saw this: Shutdown Windows Virtual Machine is also done via pressing the ALT key and then F4. and that worked for me after spending :( too long trying to get rid of this

share|improve this answer
How does that relate to the question? What ist <kbd>Alt+F4</kbd> doing exactly? Please clarify your answer. – user 99572 is fine May 10 '13 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .