Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

5 Answers 5

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]

"ScreenSaveActive"="1"

Change to:

"ScreenSaveActive"="0"

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:

http://msdn.microsoft.com/en-us/library/ee449454%28v=ws.10%29.aspx

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: http://natmac.org/9am/tfeed?id=910E53194CF1A4D546DE4A5E3D870812630459B9

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: support.microsoft.com/kb/314493 –  Matt 'Trouble' Esse Oct 20 '10 at 23:53

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.