Skip to content

Instantly share code, notes, and snippets.

@HarmfulBreeze
Last active December 24, 2025 19:43
Show Gist options
  • Select an option

  • Save HarmfulBreeze/9d013676301d784ce9783a39b0e66a84 to your computer and use it in GitHub Desktop.

Select an option

Save HarmfulBreeze/9d013676301d784ce9783a39b0e66a84 to your computer and use it in GitHub Desktop.
Setting up Hyper-V Enhanced Session Mode with Fedora 43

Tested working on Fedora Workstation 39, 40, 41, 42, and 43.

(Commands prefixed with a # should be run as the root user or with sudo. Commands prefixed with a $ should be run as a regular/unprivileged user.)

  1. # dnf install xrdp (with Xorg session support: # dnf install xrdp xorgxrdp)
  2. If using GNOME: # $EDITOR /etc/pam.d/xrdp-sesman and comment and uncomment the appropriate lines.
  3. If using Xfce: $ echo startxfce4 > $HOME/.xsession and $ chmod +x $HOME/.xsession.
  4. Optionally, rename the shared drives mount: # $EDITOR /etc/xrdp/sesman.ini and set FuseMountName=shared-drives
  5. # $EDITOR /etc/xrdp/xrdp.ini and set:
    • port=vsock://-1:3389 ([Globals] section)
    • vmconnect=true (uncomment)
    • security_layer=rdp
    • bitmap_compression=false
    • If you chose to install the xorgxrdp package: uncomment the whole [Xorg] section.
  6. $ systemctl enable xrdp xrdp-sesman
  7. Shut down the virtual machine (do NOT reboot) and close the Virtual Machine Connection window.
  8. On your host, in PowerShell (as admin or as a user in the "Hyper-V Administrators" group): Set-VM -VMName "Name of your Fedora VM" -EnhancedSessionTransportType HvSocket
  9. Connect to your VM by reopening the Virtual Machine Connection window, and boot it.

You can now enable Enhanced Session Mode.

@MxMaster3
Copy link

Thanks.
This method is also working for Fedora 40.

@HarmfulBreeze
Copy link
Author

Thanks. This method is also working for Fedora 40.

Thank you for your comment. I updated the Gist to mention it.

@nreith
Copy link

nreith commented Aug 28, 2024

You can use xorgxrdp-glamor instead of xorgxrdp only, for more features.

and don't forget to run this before enabling enhanced session, so the kernel enables vsock.

echo "hv_sock" | sudo tee /etc/modules-load.d/hv_sock.conf

@smudj
Copy link

smudj commented Oct 28, 2024

What DE? I can't get this to work with KDE on Fedora40. Are there additional commands not listed?

@HarmfulBreeze
Copy link
Author

What DE? I can't get this to work with KDE on Fedora40. Are there additional commands not listed?

It works with Fedora 40 Workstation, so with GNOME. I will try it with KDE today and report back.

@HarmfulBreeze
Copy link
Author

@smudj Do you have plasma-workspace-x11 installed? I don't think Fedora includes it by default in recent versions.

@smudj
Copy link

smudj commented Oct 30, 2024

@HarmfulBreeze That seems to have done it. After installing plasma-workspace-x11 and rebooting, enhanced session is working. No audio, unlike gnome. Thanks!

@smudj
Copy link

smudj commented Dec 9, 2024

Follow up: got audio working with this: https://github.com/neutrinolabs/pipewire-module-xrdp

@LantosIstvan
Copy link

I had no luck with this and any other guides to setup Hyper-V ESM. I've got the XRDP login screen in ESM, but the login didn't work, always closed the session. Even turning off SELinux and adding firewall exceptions didn't helped.

My solution is just to use the built-in Gnome RDP and start on the Windows host a regular mstsc session, so not the built-in one in the Hyper-V window.

The perk with this method that you getting remote Wayland session, instead of X11.

Ps.: Audio works out of the box, too!

@nreith
Copy link

nreith commented Dec 20, 2025

I want to do the same like you @LantosIstvan in WSl2 but I’m starting headless and can’t figure out how to enable Remote Desktop properly since Fedora 43 removed x11 so no xrdp and also the Wayland gnome remote desktop requires a connected session. So I think you can only do it once you connect graphically. Any ideas?

@LantosIstvan
Copy link

Yes, my use case was exactly like that, unfortunately, I cannot help in the setup with WSL2:

  • Windows host with Hyper-V hypervisor
    • -> Fedora 43 Workstation (Gnome) guest machine with RDP enabled in settings
      • -> Using a regular Remote Desktop session window (mstsc).

@beastwick
Copy link

beastwick commented Dec 24, 2025

This might be less to do with getting an enhanced session to work, but I had trouble booting into a fresh 43 install using the non rescue kernel. The rescue kernel did work, so it seems that some modules/drivers were missing from the other kernel image. I had to do the following, otherwise I would get an indefinite hang looking for a device that doesn't exist:

The error:

image

Create a new config file specifically for Hyper-V drivers

echo 'add_drivers+=" hv_vmbus hv_netvsc hv_storvsc hv_utils "' | sudo tee /etc/dracut.conf.d/hyperv.conf

Get the version of the bad kernel.

ls /lib/modules

Replace [VERSION] with the string from step 2

sudo dracut -f --kver [VERSION]

Update initramfs.

$ dracut -f --kver 6.17.12-300.fc43.x86_64

Then I was able to boot under Hyper-V.

Can confirm that this guide got enhanced session working for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment