5

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.

5 Answers 5

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

4

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.
2

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....

1
1

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.

0

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

1
  • How does that relate to the question? What ist <kbd>Alt+F4</kbd> doing exactly? Please clarify your answer. Commented May 10, 2013 at 9:55

You must log in to answer this question.

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