DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Running Ansible From Windows Using Virtualization
  • Spinnaker Meets Minikube: Part 1

Trending

  • Introduction to Error Prone: How to Catch Bugs at Compile Time
  • When a Coding Agent Fixes the Test Instead of the Bug
  • How an AI Software Factory Works: From Developer Intent to Production
  • Build a Voice Assistant With Gemini Live API

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Hyper-V and Windows AutoLogon

Hyper-V and Windows AutoLogon

The ability for build and release agents to automatically login in order to complete UI-interacting integration tests is important. Windows developers, read on.

By 
Ricci Gian Maria
·
Updated Jul. 22, 17 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
9.4K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

when you configure build agents, and especially when you configure release agents for vsts, it is quite normal to have some installations where you want to use autologon. this is needed whenever you want to run integration tests that need to interact with the ui. having autologon enabled avoids the need to manually log in and start the agent when the machine is rebooted, because you always have a user session opened that runs the agent.

there are lots of articles like this one that explain how to configure everything, but last saturday i had a problem, because i had a windows server 2016 where that technique does not work. i rebooted the machine, but the hyper-v console showed me the login pane, and i was really puzzled.

image

figure 1: login screen in hyper-v console.

as you can see from figure 1, the hyper-v console shows the login page, so i incorrectly believed that the autologon did not work. i said "incorrectly" because, when trying to troubleshoot the problem, a friend told me to check the hyper-v manager console, and here is what i saw:

image

figure 2: small thumbnail of the vm in hyper-v snap-in.

from figure 2, you can see that the thumbnail of the vm does not show the login page, but it shows a user session logged into the machine. a quick check confirmed me that the agent was online, so the automatic logon worked, but my virtual machine console still shows me the login screen.

the reason is in the enhanced session feature, available in the view menu of the virtual machine console. the enhanced session is used to allow windows resizing, clipboard transfer, and so on and uses remote desktop under the hood. if you turn off enhanced session and use the basic hyper-v console, that shows you that a user is really connected to the system.

image

figure 3: the console in basic session mode correctly shows the logged user.

it turns out that, with enhanced mode, you are not able to see the session that is started automatically, but the session is active. if you really want to verify what is happening, you can simply switch to basic mode.

Hyper-V

Published at DZone with permission of Ricci Gian Maria. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Running Ansible From Windows Using Virtualization
  • Spinnaker Meets Minikube: Part 1

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook