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.

link|improve this question

feedback

3 Answers

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

link|improve this answer
feedback

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.
link|improve this answer
feedback
up vote 1 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....

link|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
feedback

Your Answer

 
or
required, but never shown

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