Thursday, January 20, 2011

Auto-logon in a Hyper-V virtual machine doesn't work

We have Windows XP (all updates) virtual machine installed on a Windows 2008 Hyper-V server. Autologon for the virtual machine was set with TweakUI.

When the virtual machine is rebooted (in a clean manner), the autologon doesn't work. Virtual machine just stands at the user/password prompt.

Does anybody have any idea why this should be happening? In my past, I've never run into any problems with the automatic logon.

The virtual machine is not in a domain (although the Win2008 is) and has remote desktop access enabled (I don't know if that matters or not).

EDIT: I should mention before that autologon settings are correctly stored in the registry.

EDIT: The autologon user is a local (admin) user. There are not logon-related events in the event log.

EDIT: Grub put me on the right track. This is definitely not connected to the Hyper-V but just to a specific VM installation.

  • Hi

    When you enable autologon in TweakUI the tool only changes a few registry keys. The first thing you should do is to check the registry keys

    You can find a Microsoft Knowledge base article about the automatic logon here: http://support.microsoft.com/kb/315231

    Diago : Agreed. Hyper-V will not have any effect on the Windows XP logon process as it only controls the running of the VM. It does sound like the automatic login settings corrupted somehow.
    gabr : Sorry, forgot to mention that - all autologon settings in the registry are correctly set.
    grub : Hmmm Do you have any entries in the system and security event log which are caused by the autologon? Are you trying to autologon with a domain user or a local user?
    gabr : No such events. Local user with administrator rights. IOW, something that I've done at least ten times before and it always worked.
    grub : Do you have any other windows vm on the hyper V server where you can try to activate the autologon? are there any useful error message from the hyper v server? (normally it doesnt matter if you're using a physical machine or a vm on hyper v or vmware but who knows...)
    gabr : At the moment this is the only VM. No errors are reported anywhere.
    gabr : I've restored another VM (also XP) from the deep sleep and behold! it auto-logs on just fine. Something is wrong with my first VM only, but who knows what ... Thanks for putting me on the right track!
    grub : my pleasure. a quick lookup on google just gave me a possible solution: Look up into \\HKLM\Software\Microsft\WindowsNT\CurrentVersion\Winlogon for a REG_WORD called "AutoLogonCount". If it is present delete it, set your AutoLogon-Values and try again. Hope this helps.
    From grub
  • Solved!

    I run "control userpasswords2" and checked "User must enter a user named and password to use this computer."

    Rebooted.

    Run tweakup and set autologon.

    Rebooted.

    The VM logged on automatically.

    Obviously some setting was wrong but control applet managed to reset that to normal when I enabled passwords.

    From gabr

0 comments:

Post a Comment