I believe anonymous user-3434 is largely correct in that I found all relevant answers direct to:
- a prior version or a pull request version of linux tools install.sh script that ensures xrdp is installed and running, and/or
- making changes to /etc/default/grub that are no longer relevant to ubuntu releases, and/or
- running various powershell scripts (set-vm or set-vmvideo or VMConnect), and/or
- toggling Hyper-V Settings for Allow Enhanced Sessions,
none of which appear to reliably work or create repeatable outcome such that Hyper-V connects to ubuntu 20 and shows the xrdp login page.
Two times I managed to get it automagically to connect and show the xrdp login screen, on successive days after many repeated attempts of the proffered solutions.
However, both times a shutdown of the laptop PC stopped it all working on start-up, even if a VM checkpoint was carried out.
As such, I do not believe it is related to an ubuntu 20 issue, but rather Hyper-V not correctly invoking VMConnect for the Ubuntu 20 VM such that:
a) the edit session settings dialog is shown, or
b) a previously created vmconnect.rdp.<VMId> file located in C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Hyper-V\Client\1.0
Note that "/edit" option fails to force VMConnect to launch the edit session settings dialog, regardless of whether $ set-vm -VMName <name> -EnhancedSessionTransportType HvSocket has been called or not (although I believe this must be run at least once to achieve a random launch of VMConnect that DOES show the session settings dialog or use an existing file).
Also note, I can get my Ubuntu 18.04 VM to exhibit the same behaviour i.e. bypass xrdp logon by launching Edit Session Settings and then cancelling (clicking top-right X button) the VMConnect edit session settings dialog window.
Hopefully this additional detail may help others to diagnose a reliable work-around for this bug until Microsoft fix it.
Note: Running Windows 10 Pro v1909 OS build 18363.1198 and Hyper-V Quick Create VM Ubuntu 20.04 .1 LTS
* UPDATE *
Okay, minutes after I completed this post Windows Update installed a cumulative patch and following the Windows OS restart the Edit Session Settings now shows as an option against my running Ubuntu 20 VM for the first time!! And connecting (either via Connect... or via Edit Session Settings...) lands on xrdp, adhering to any setting changes. And the windows VM application window menu option "View->Enhanced Session" is checked.
So ... fixed??? Let's see whether this persists. ;-)
* UPDATE 2 *
Further pieces of this weird puzzle....
- (Repeatable) If Windows 10 OS is * RESTARTED * while the VM is running then when Hyper-V is opened again the Edit Session Settings... option will appear,
- (Repeatable) If Windows 10 OS is * SHUTDOWN AND STARTED * while the VM is running then when Hyper-V is opened again the Edit Session Settings... option will not appear,
- (Mostly Repeatable) If Ubuntu 20 VM is "Turn(ed) off"/"Shutdown" and then "Start"(ed) via Hyper-V Manager (or via PowerShell) then the Edit Session Settings... option disappears from the right-click menu * and remains missing * through various VM restarts and/or Hyper-V Manager exit and opens and/or Windows User logout/logins and/or Hyper-V Virtual Machine Management service restarts etc.
- (1 in 10-20 iterations) If the VM restart is "not observed" at (i.e. close Hyper-V Manager immediately after a start request or don't have the VM selected during start process) then Edit Session Settings... options * MAY * appear in the right-click menu when the VM is selected when running idle at the Gnome logon screen (as viewed in the VM Summary tab),
So, the first piece of sentient code I stumble across happens to be a shy menu option that only appears as an encore! :-D
However, option 1 is now available to me as a work-around. Following any restart of my Ubuntu 20 VM then I need have it running and restart the laptop to enable an Enhanced Session connection via xrdp, either via Hyper-V Manager or VMConnect.
I hope you can repeat these steps to have a working xrdp session too!