Hyper-V advanced session doesn't work

Enrico De Ronzi 1 Reputation point
2020-10-25T15:37:37.02+00:00

Hi to all,
I have Windows 10 Pro, Remot Desktop enabled, hyper-v enabled with advanced session enabled in both the setings points:
Under Server, select Enhanced session mode policy DONE
Under User, select Enhanced session mode. DONE

I use as virtual system Ubuntu 20.04

When I run the VM, in "show" I see in gray color the "advanced session" menu voice.

So, I can't use it.
Can you help me, please?

Enrico

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,549 questions
{count} votes

9 answers

Sort by: Newest
  1. tastewar 11 Reputation points
    2022-05-25T13:23:34.25+00:00

    This is not an "Answer" per se, but just a response or comment. I don't know if that means it doesn't really belong here, but I didn't see another option for adding to the "discussion."
    I have had it happen to me on numerous occasions that I lose my ability to use Enhanced Session, and inevitably always eventually find my way to this page. It happened to me twice in the past week, when nothing had changed on either the Linux or Windows side. First time (this week, that is...), I went through the entire setup on the Linux side again, to no avail. Turned out the key was running the:

    Set-VM -VMName <your_vm_name> -EnhancedSessionTransportType HvSocket

    command (as admin). The second time, it was recent enough that I remembered not to bother with the install on the Linux side (though not recent enough that I still had the browser tab open). And after it happened the 2nd time, I realized that one thing which tied the two events together was that both times, I came to my computer in the morning to find it unresponsive, and had to power it down, then back on.

    2 people found this answer helpful.

  2. JND Accts 1 Reputation point
    2022-04-18T00:07:51.533+00:00

    Just wanted to let everyone know that "XiaoweiHe-MSFT" solution worked for me. I performed a clean install of the preconfigured Ubuntu 18.04.3 LTS image via Hyper-V "Create Quick..." menu. After following the instructions below, I was able to login to the VM via Enhanced session using the Xorg option from the dropdown list (I used the same credentials I provided during the installation process). Hope this helps anyone struggling with this because it was a major PITA.

    Best,
    Andrew

    XiaoweiHe-MSFT answered • Oct 26 2020 at 1:02 AM | einaradolfsen commented • Dec 31 2020 at 7:02 AM

    Hi,

    Please make sure you have an Ubuntu Desktop image. These steps will not work for Server-based images. From a clean install of an Ubuntu 18.04 image, issue the following commands in a terminal:

    wget https://raw.githubusercontent.com/Microsoft/linux-vm-tools/master/ubuntu/18.04/install.sh
    sudo chmod +x install.sh
    sudo ./install.sh

    After you’ve run your scripts, shut down your VM. On your host machine in an Administrator powershell prompt, execute this command:

    Set-VM -VMName <your_vm_name> -EnhancedSessionTransportType HvSocket

    Thanks for your time!
    Best Regards,
    Anne


  3. James Woods 6 Reputation points
    2021-09-22T05:31:34.803+00:00

    I'm having the same problem as everybody else with Ubuntu 20.04. I'm also seeing the behaviour that if I restart if I restart my PC while the VM is running and then connect to it after the PC then the enhanced session will be activated. And as @Ryan noted, saving the session and restarting it works, effectively retaining the one session forever.

    After the initial PC restart I get a black screen after logging in, which indicates my previous login is still active. Other people have noted this and simply stated that you need to log the other session off but didn't state how to do this. The trick is as follows:

    1. Click on the 'Enhanced Session' button to toggle back to 'Basic Session'.
    2. Login with your credentials to resume the previous basic session.
    3. Logout of that basic session.
    4. Click on the 'Enhanced Session' button to toggle back to 'Enhanced Session'.
    5. Login with your credentials to start your enhanced session.

    Regarding some of the previous comments saying this is a fault in Hyper-V, what I can add is that Ubuntu 18.04.03 LTS works just fine out of the box, enhanced session mode always works.

    0 comments No comments

  4. Ryan 11 Reputation points
    2021-01-15T22:25:42.95+00:00

    I was having the same problem, and it was driving me crazy. If I reset windows while leaving the VM instance running, I could access it via enhanced session. But once I ended that session, I could not access it again via enhanced without first restarting the PC.

    I did fine one workaround that's been working for me that I thought I'd share: I found if I saved the machine and then started it back up, it would always allow for an enhanced session - and subsequent connections do too. No idea why, but I've been using it this way for several weeks now and it always works.

    2 people found this answer helpful.

  5. ranie 1 Reputation point
    2020-12-31T11:27:14.713+00:00

    I followed Scott Hasselman's blog post using-enhanced-mode-ubuntu-1804-for-hyperv-on-windows-10, which uses Hyper-V Quick Create to create ubuntu 18 virtual machine with enanched mode enabled out of the box. The critical point here is: to make sure to select Require my password to log in since automatic login does won't work, according to Scott. This installation is quick and easy and works out fine for ubuntu 18.

    Following the same approach using Ubuntu 20.04.01 LTS image in Hyper-V Quick Create>Select an operating system pane, does not work.

    So what has changed?