Microsoft Looks To Bring Hyper-V VM Sockets To Linux

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.
Add A Comment