Installing in MS Hyper-V image with Enhanced Session Support

I'm trying to understand how to get Enhanced Session enabled when running Zorin OS Core in a Microsoft Hyper-V virtual image. The core OS runs without audio, copy-paste support (from host) and display resizing which is essentially enhanced session support. I've tried xrdp scripts and directions from online posts but I cannot get this to work. Any success out there?

Hi and welcome.

Having little use for Windows these days I used Brave A.I. search engine via Mojeek and used Ubuntu 24.04 in the search criteria as Zorin 18 is based off that:

" To enable an enhanced session for Ubuntu 24.04 on Hyper-V, you must first install XRDP and configure it to use the HvSocket transport type, as standard VMBus support is limited for this version.

Prerequisites and Host Configuration Begin by ensuring the Hyper-V host allows enhanced sessions via Hyper-V Settings , where you must check "Allow enhanced session mode" under the policy section and enable "Use enhanced session mode" under user settings. On the Ubuntu 24.04 guest, install the necessary integration services and XRDP using the following commands:

sudo apt update
sudo apt install -y linux-tools-virtual-hwe-24.04 linux-cloud-tools-virtual-hwe-24.04 xrdp

After installation, configure XRDP to listen on the correct vsock port and set the session to "Ubuntu" by modifying /etc/xrdp/xrdp.ini and /etc/xrdp/sesman.ini . You must also create a custom startup script (e.g., /etc/xrdp/startubuntu.sh ) to set the GNOME_SHELL_SESSION_MODE environment variable, ensuring the desktop environment loads correctly.

VM and Connection Setup In PowerShell on the Windows host, run the command Set-VM -VMName "YourVMName" -EnhancedSessionTransportType HvSocket to switch the transport protocol from VMBus to HvSocket, which is required for Ubuntu 24.04. Important: You must enable the "Require my password to log in" option in the Windows user account settings, as XRDP connections will fail without authentication. After making these changes, power off the VM completely (do not just restart) to ensure the new transport settings take effect.

Final Connection Steps Once the VM is powered on, connect via the Hyper-V Manager and select View > Enhanced Session or use the connection dialog to choose a display resolution. If the session fails to initialize or shows a blank screen, verify that the blacklist vmw_vsock_vmci_transport rule is in /etc/modprobe.d/blacklist-vmw_vsock_vmci_transport.conf and ensure the xrdp service is running. Note that system updates may occasionally break this configuration, requiring a re-verification of the XRDP configuration files and a full power cycle of the VM.

AI-generated answer. Please verify critical facts."