Score:0

How to prevent multiple users from simultaneously accessing an Azure VM?

cn flag

We created a VM as a replacement for physical machine with rarely used software on it.

When I tested it I noticed when a second user accesses the VM, the first user is kicked out and sees the message "You have been disconnected because another connection was made to the remote computer". However, on another VM that wasn't set up by me, I'm getting the warning "Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in any way?"

What VM or Windows setting(s) do I need to change to display the "Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in any way?" message on the new VM?

Ken W MSFT avatar
gb flag
What OS are you using on these VMs? Windows Server will, by default, let 2 concurrent users log on. Windows 10, will only allow 1. That would explain the difference you are seeing.
CIA avatar
ae flag
CIA
this is a common issue with a desktop OS; if true, you should migrate the app to a server OS. This would allow up to 2 concurrent remote sessions. Unless you're all using the shared credentials. If that's the case, then don't use shared credentials.
Doug avatar
in flag
CIA... note that the 2 connections on server are for administration purposes only. You are not licensed to use these for users to run applications.
Score:3
ng flag

By default a Windows VM in Azure is configured for remote administration, which allows up to 2 users to access the machine to undertake remote administration of that machine. If a third user attempts to connect you will see this message. you will see this if a user has disconnected, but not logged off so their session is till running and using a slot.

If you need more than 2 users to access it concurrently, or you are doing more than remote administration then you need to purchase remote desktop client access licences (CAL's) and setup a licence server.

cn flag
Thanks for your reply! On the VM is Windows Pro installed, and the problem is that when one user is connected to it and another users also connects to it, the first user gets kicked out with the `You have been disconnected because another connection was made to the remote computer` message. Since that might lead to data loss, I'd like to display the VM `Another user is signed in. If you continue, they’ll be disconnected. Do you want to sign in any way?`. However, I can't find out how to do this. I tried all kinds of registry hacks and group policy changes, but nothing worked. :(
ng flag
@NemoXXX windows pro is not an OS. Is this windows server or windows 10. Also are the users using different usernames?
cn flag
`@NemoXXX windows pro is not an OS.` It's an Azure VM with Windows **10** Pro installed on it. `Also are the users using different usernames?` No, they're all using the same RDP file. (I'm new to Azure VMs and that particular VM was set up by someone else.)
ng flag
OK, well first thing its not going to work the way you want if users are all using the same username, windows just thinks its the same user and connects them to the same session. You need to create specific user accounts for each person in windows. Secondly Windows 10 pro is not a supported OS in Azure, Windows 10 Enterprise is, but only if you already own an E3/E5 licence for it, so your likely in breach of licencing.
cn flag
`OK, well first thing its not going to work the way you want if users are all using the same username, windows just thinks its the same user and connects them to the same session.` If that were the case, the first user would be able to continue their session. However, he gets the `You have been disconnected because another connection was made to the remote computer message.` `Secondly Windows 10 pro is not a supported OS in Azure, [...].` I might have mixed up the specific version. Of course, we do have licenses for all our machines.
ng flag
```If that were the case, the first user would be able to continue their session``` no, that's not how it works. The second user logging on is grabbing the first users session, because as far as windows is concerned it is the same user, it is telling the first user that their session has been disconnected because it has been connected on another machine. The first user could reconnect and they would grab the session back. The solution is to use separate user accounts, sharing user accounts is causing your problem, it is also terrible practice and a security risk.
Score:1
in flag

The answer and comments from Sam are quite right, you need to separate users with different login names; and you are violating the license by running Windows 10 Pro on Azure.

One current, supported, and validly licensed method for doing this is to deploy Azure Virtual Desktop. AVD provides a managed Azure service that combines remote desktop gateway and remote desktop host services with a Windows 10 edition built and licensed for concurrent use by multiple users. If you are familiar with Remote Desktop Serivces or Citrix on servers, this is a similar offering based on Windows 10.

In an AVD scenario both users (and many more) can login to the same Windows 10 machine at the same time without getting kicked out by other users or otherwise prompted during login. In general AVD users are unaware that another user is concurrently using the same machine. AVD requires a license per-user generally from a Microsoft 365 E3/E5 monthly license subscription.

Azure Virtual Desktop documentation

  • Create a full desktop virtualization environment in your Azure subscription without running any gateway servers.
  • Publish as many host pools as you need to accommodate your diverse workloads.
  • Bring your own image for production workloads or test from the Azure Gallery.
  • Reduce costs with pooled, multi-session resources. With the new Windows 10 Enterprise multi-session capability, exclusive to Azure Virtual Desktop and Remote Desktop Session Host (RDSH) role on Windows Server, you can greatly reduce the number of virtual machines and operating system (OS) overhead while still providing the same resources to your users.
  • Provide individual ownership through personal (persistent) desktops.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.