Ubuntu support in Hyper-V is about to get even better with the new 'enhanced session'

However, desktop integration (features such as clipboard sharing) have always been lacking for Linux guests. While this makes sense, since Microsoft primarily focuses on delivering a great Hyper-V experience for servers and the cloud, and instead positions the Windows Subsystem for Linux as the preferred way to get a Linux userland on your own machine, there are still many use cases out there for a comfortable virtualized desktop Linux experience with proper desktop integration – after all, not every single desktop Linux app is terminal-based.

The good news is that improvements are coming! As previewed at Microsoft's Virtualization blog, starting with Ubuntu 18.04, it will be possible to easily get a Linux virtual machine in Hyper-V that supports what Microsoft calls "Enhanced Session Mode", which adds features such as:

Better mouse experience

Integrated clipboard

Window Resizing

Drive Redirection

To get this done, Microsoft is working together with the developers of XRDP, an open source implementation of Microsoft's Remote Desktop Protocol, to add support for Hyper-V sockets, which provide an efficient way for guest virtual machines to communicate with the host.

Ubuntu 18.04 will include the latest version of XRDP with the new feature, along with Linux kernel version 4.15, which adds support for Hyper-V sockets out of the box.

If you don't want to wait for Ubuntu 18.04, however, you can preview improved Linux integration today! While still under development, Microsoft has provided a way to try out the enhanced session using the current Ubuntu LTS release, 16.04.

Enabling enhanced session support in Ubuntu 16.04

Since Ubuntu 16.04 does not ship with the necessary components out of the box, some setup is required. Microsoft provides a script that will download and compile the newest version of XRDP, and install a version of the Linux kernel with Hyper-V sockets support. It only takes a few steps to get going, and requires that you use Windows 10 build 17063 or newer:

Create and set up an Ubuntu 16.04 virtual machine (you can get the ISO here)

Finally, boot into your virtual machine, and you should be prompted to select a screen resolution – that means the enhanced session to go! Enjoy, and don't forget to file any enhaced session bugs that you run into on GitHub!

Dima Konev

Dima Konev is a Linux and macOS writer at ModMy. As an aspiring software developer who spent a lot of time with all sorts of devices and operating systems, he’s got a few things to say about computers. May contain faint traces of cyberpunk. You can find him on Twitter at @SilverEzhik.