From: Robert Hoo <robert.hoo.linux@gmail.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: vsock support for communication between guests
Date: Sun, 9 Nov 2025 21:13:13 +0800 [thread overview]
Message-ID: <9535cd2e-239a-4002-be5b-b7c7fa85f081@gmail.com> (raw)
In-Reply-To: <pkglizwznrfj6fm7tdyew4tzmomgtp2cetxwfj2fx7ge4vtwhv@kdlj2jdxqheo>
On 11/6/2025 10:32 PM, Stefano Garzarella wrote:
> On Fri, Oct 10, 2025 at 09:00:21PM +0800, Robert Hoo wrote:
>> Hi,
>>
>> Does vsock support communication between guests?
>> From man page, and my experiment, seems it doesn't.
>> But why not?
>>
>
> It depends, vhost-user vsock device, supports it.
> See
> https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-vsock#sibling-vm-communication
>
> The vhost-vsock in-kernel device doesn't support it.
>
> The main problem is that vsock is designed for host<->guest communication, so
> implementing a guest<->guest communication is possible, but requires more
> configuration (e.g. some kind of firewall, etc.) and also an extension to the
> address (see the required
> `.svm_flags = VMADDR_FLAG_TO_HOST` in the link).
>
> The easy way to do that with vhost-vsock, is to use socat in the host to
> concatenate 2 VMs (some examples here:
> https://stefano-garzarella.github.io/posts/2021-01-22-socat-vsock/)
>
> Cheers,
> Stefano
>
Nice, thanks Stefano. It sounds ideal for my VM <--> VM communication
requirement. I'll read the doc carefully later.
BTW, I also found your vsock-bridge
(https://github.com/stefano-garzarella/vsock-bridge); but seems its last commit
was 5 yrs ago. It's not recommended, is it?
next prev parent reply other threads:[~2025-11-09 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 13:00 vsock support for communication between guests Robert Hoo
2025-11-06 14:32 ` Stefano Garzarella
2025-11-09 13:13 ` Robert Hoo [this message]
2025-11-10 11:10 ` Stefano Garzarella
2025-11-15 10:58 ` Robert Hoo
2025-11-10 16:20 ` Bobby Eshleman
2025-11-15 11:13 ` Robert Hoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9535cd2e-239a-4002-be5b-b7c7fa85f081@gmail.com \
--to=robert.hoo.linux@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).