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
Over 2 million developers have joined DZone.
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

  • 5 AI Security Incidents That Broke Things in Production (and What They Have in Common)
  • Why Stable RAG Answers Can Still Hide Unstable Evidence
  • Alternative Structured Concurrency
  • Agentic AI Has an Observability Blind Spot Nobody Is Talking About
  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 user avatar
Ricci Gian Maria
·
Updated Jul. 22, 17 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
9.2K Views

Join the DZone community and get the full member experience.

Join For Free

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

The likes didn't load as expected. Please refresh the page and try again.

  • 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