I've always been a fan of Hyper-V because it strikes the perfect balance between simplicity and power. It's built right into Windows, so there's no need to install third-party software, and it integrates seamlessly with the rest of the system. Unlike Oracle's VirtualBox, which can feel clunky and limited at times, or VMware, which is powerful but often overcomplicated and pricey for non-commercial use, Hyper-V is just... there. It's reliable, performs exceptionally well, and doesn't come with the licensing headaches or unnecessary bloat. For me, it's the virtualization solution that gets out of the way and lets me focus on what I actually want to do.
Why Should I Care? What is Enhanced Session Mode
Setting up Enhanced Session Mode for Fedora 41 on Hyper-V is like unlocking the true potential of a virtual machine. This feature bridges the gap between host and guest systems, enabling a seamless integration that feels less like working on a remote system and more like using a native app. From dynamic display resizing to clipboard sharing and shared drives, Enhanced Session Mode turns a standard virtual machine into a productivity powerhouse. Whether you're a developer testing Fedora or a curious tinkerer, this setup delivers an experience that's both streamlined and cutting-edge, showcasing the perfect marriage of open-source innovation and Hyper-V's advanced virtualization features.
So let's dive in... (this should also work on Fedora 39, and Fedora 40 based distros)
Setting Up Enhanced Session Mode on Fedora 41
Enhanced Session Mode allows for a more seamless experience when using virtual machines by improving integration with the host system. This feature enables functionalities such as clipboard sharing, dynamic display resizing, and drive redirection. Here's how to set it up on Fedora Workstation 41:
Note: Commands prefixed with # should be executed as the root user or using sudo. Commands prefixed with $ are for a regular, unprivileged user.
Step 1: Install xrdp
To enable remote desktop support with Enhanced Session Mode:
- Install
xrdpto set up Remote Desktop Protocol (RDP) functionality:
``bash # dnf install xrdp xrdp-sesman ``
If you want support for Xorg sessions, include the xorgxrdp package:
``bash # dnf install xrdp xorgxrdp ``
Step 2: Configure xrdp for GNOME (if applicable)
If you're using GNOME, adjust the xrdp-sesman PAM configuration:
- Open the configuration file with your preferred text editor:
``bash # nano /etc/pam.d/xrdp-sesman ``
- Modify the file by commenting or uncommenting lines as needed to ensure compatibility with your setup.
Step 3: Optional - Customize Shared Drive Names
To rename the shared drives mount:
- Edit the
sesman.inifile:
``bash # nano /etc/xrdp/sesman.ini ``
- Locate the
FuseMountNameparameter and set it to your desired name:
`` FuseMountName=shared-drives ``
Step 4: Modify xrdp Settings
- Open the
xrdp.iniconfiguration file:
``bash # nano /etc/xrdp/xrdp.ini ``
- Update the following settings:
- Set the port for Enhanced Session Mode:
`` port=vsock://-1:3389 ``
- Ensure security and compression settings are appropriate:
`` security_layer=rdp bitmap_compression=false ``
- If using the
xorgxrdppackage, uncomment the entire[Xorg]section to enable support for Xorg sessions.
Step 5: Enable and Start xrdp Services
- Enable the
xrdpandxrdp-sesmanservices to start at boot:
``bash # systemctl enable --now xrdp xrdp-sesman # systemctl restart xrdp xrdp-sesman ``
Step 6: Configure the Virtual Machine in PowerShell
- Shut down the Fedora VM completely (do not reboot).
- Close the Virtual Machine Connection window.
- On the host machine, open PowerShell as an administrator (or as a user in the "Hyper-V Administrators" group).
- Run the following command, replacing
"Name of your Fedora VM"with the actual name of your VM:
``powershell Set-VM -VMName "Name of your Fedora VM" -EnhancedSessionTransportType HvSocket ``
- Set-VM: Modifies settings for the specified virtual machine. - -VMName: Identifies the virtual machine to configure. - -EnhancedSessionTransportType: Specifies the transport type for Enhanced Session Mode, using HvSocket for communication between the host and the guest.
Step 7: Reconnect and Verify Enhanced Session Mode
- Reopen the Virtual Machine Connection window and boot your Fedora VM.
- Enhanced Session Mode should now be available, allowing advanced features like display resizing and clipboard sharing. The login screen is ugly and straight out of 1994 but it works.
Verifying Enhanced Session Mode Settings in PowerShell
To confirm that Enhanced Session Mode is enabled:
- Run the following PowerShell command:
``powershell Get-VM -VMName "Name of your Fedora VM" | Select-Object -Property EnhancedSessionTransportType ``
- Get-VM: Retrieves information about the specified virtual machine. - Select-Object: Filters the output to show the EnhancedSessionTransportType property.
- Ensure the result shows
HvSocket, indicating the configuration is correct.
With these steps, you should be able to enjoy Enhanced Session Mode on Fedora 41, offering an improved virtual machine experience that feels much more integrated with your host Windows system.
