Microsoft Looks To Bring Hyper-V VM Sockets To Linux

Written by Michael Larabel in Microsoft on 6 July 2015 at 11:31 AM EDT. Add A Comment
The latest patch-set that Microsoft is proposing for the mainline Linux kernel is Hyper-V VM Sockets (Hvsock) that is a byte-stream based communication mechanism for Windows 10 and later for communication between hosts and VM guests.

Hyper-V VM Sockets is modeled after TCP over VMBus with a transportation layer that's much simpler than IP. Hvsock allows for hosts/guests to communicate with each other using BSD-style socket APIs. Given that Microsoft has sought to support Hyper-V well on Linux (and other non-Windows OSes like FreeBSD), they're now proposing this new hvsock driver for the Linux kernel in order to better support Windows 10 in the (overwhelmingly Linux-based) cloud.

In Microsoft's new patch-set published today they acknowledged there's already similar implementations in the kernel: AF_VSOCK based on VMware's VMCI and a VirtIO/KVM implementation is in the works. However, Microsoft says their version is incompatible with the current code due to differences in the transportation layer. They're proposing AF_HYPERV as an alternative to AF_VSOCK.

For those that weren't following the VirtIO transport for AF_VSOCK patches a few months ago, here's the explanation what the solution is about: "Guest/host communication is currently done over the virtio-serial device. This makes it hard to port sockets API-based applications and is limited to static ports. virtio-vsock uses the sockets API so that applications can rely on familiar SOCK_STREAM and SOCK_DGRAM semantics. Applications on the host can easily connect to guest agents because the sockets API allows multiple connections to a listen socket (unlike virtio-serial). This simplifies the guest/host communication and eliminates the need for extra processes on the host to arbitrate virtio-serial ports."

Those wishing to learn more about Microsoft's Hyper-V VM Sockets for Linux can find the new patch series published on the Linux kernel mailing list.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week