# Bringing VSOCK to libzmq: A New Address Family for VM-to-Hypervisor Messaging

Original title: Use Vsock with Libzmq

> Hacker News story 49602615 · language: en · submitted 2026-09-07
> Web version: https://zeli.app/story/49602615
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 48 · by [remijouannet](<https://news.ycombinator.com/user?id=remijouannet>) · 💬 9
[original](<https://blog.remijouan.net/posts/libzmq-vsock-pyzmq/>) · [HN discussion](<https://news.ycombinator.com/item?id=49602615>)

## Summary

The author discovers that libzmq, despite supporting VMCI, lacks VSOCK support, and proposes a straightforward addition by adapting the VMCI code. This enables using libzmq's features—like CURVE authentication and various message patterns—over AF_VSOCK, which facilitates communication between VMs and hypervisors. The post includes practical examples using pyzmq-vsock, demonstrating a simple REQ/REP exchange and a secure asyncio setup with Curve encryption, all testable on loopback since Linux 5.6.

## Key quote

> To my great surprise, there was a VMCI implementation, but no VSOCK.

## HN discussion (9 comments)

### [dwrodri](<https://news.ycombinator.com/item?id=49636232>)

> I could see this being really useful for people who need VM-Sandboxed software, but also need quick and dirty bridges between host/guest. Great contribution!

### [sthustfo](<https://news.ycombinator.com/item?id=49637547>)

> What are the typical use cases for the Guest VM to talk to Hypervisor? I see 2 use cases mentioned on the Proxmox link (https://pve.proxmox.com/wiki/Qemu-guest-agent)
>
> 1. shutdown the guest
>
> 2. freeze the guest system during backup/snapshot
>
> Just curious about other possible use cases.

### [remijouannet](<https://news.ycombinator.com/item?id=49602616>)

> hi, i’ve recently contributed to libzmq by adding AF_VSOCK. if anyone is playing around with it

---

## Cite

- Page: https://zeli.app/story/49602615
- Date: 2026-09-07
- Source: blog.remijouan.net (https://blog.remijouan.net/posts/libzmq-vsock-pyzmq/)
- Hacker News: https://news.ycombinator.com/item?id=49602615

## Other languages

- zh: https://zeli.app/zh/story/49602615 · markdown: https://zeli.app/zh/story/49602615.md
- ja: https://zeli.app/ja/story/49602615 · markdown: https://zeli.app/ja/story/49602615.md
- ko: https://zeli.app/ko/story/49602615 · markdown: https://zeli.app/ko/story/49602615.md
- de: https://zeli.app/de/story/49602615 · markdown: https://zeli.app/de/story/49602615.md
- es: https://zeli.app/es/story/49602615 · markdown: https://zeli.app/es/story/49602615.md
- ru: https://zeli.app/ru/story/49602615 · markdown: https://zeli.app/ru/story/49602615.md
