Internships/ProjectIdeas/VsockSiblingCommunication: Difference between revisions
Line 57: | Line 57: | ||
* Skill level: intermediate (knowledge of Rust and virtualization) | * Skill level: intermediate (knowledge of Rust and virtualization) | ||
* Language: Rust | * Language: Rust | ||
* | * Mentors: Stefano Garzarella <sgarzare@redhat.com>, German Maglione <gmaglione@redhat.com> | ||
** IRC: sgarzare / Matrix: @sgarzare:matrix.org | ** IRC: sgarzare / Matrix: @sgarzare:matrix.org | ||
* Suggested by: Stefano Garzarella <sgarzare@redhat.com> | * Suggested by: Stefano Garzarella <sgarzare@redhat.com> |
Latest revision as of 14:39, 17 March 2023
Sibling VM communication in vhost-user-vsock
Summary: Extend the existing vhost-user-vsock Rust application to support sibling VM communication
During GSoC 2021, we developed vhost-user-vsock application in Rust. It leveraged the vhost-user protocol to emulate a virtio-vsock device in an external process. It provides the hybrid VSOCK interface over AF_UNIX introduced by Firecracker.
The current implementation supports a single virtual machine (VM) per process instance. The idea of this project is to extend the vhost-user-vsock crate available in the rust-vmm/vhost-device workspace to support multiple VMs per instance and allow communication between sibling VMs.
vsock is usually used as a communication channel between the host and the guest running in a VM. Recently it has been proposed to extend vsock to also allow communication between VMs running on the same host (sibling VMs).
Usually struct sockaddr_vm { .svm_cid = 42, .svm_port = 1234 }
address inside a VM is used to communicate with a nested VM, but a new flag
is recently added to allow sibling VM communication.
So by setting .svm_flags = VMADDR_FLAG_TO_HOST
, the connection
will be forwarded to the host, allowing communication with the sibling
VM that has CID 42 (if the device supports it).
AF_VSOCK in Linux already supports it, but the vhost-user-vsock application still does not support it, so we want to extend it.
This project will allow you to learn more about the virtio-vsock specification, rust-vmm crates, and vhost-user protocol to interface with QEMU.
This work will be done in Rust, but we may need to patch the virtio-vsock driver or the AF_VSOCK core in Linux if we will find some issues.
Goals:
- Understand how a virtio-vsock device works
- Refactor vhost-user-vsock code to allow multiple virtio-vsock device instances
- Extend the vhost-user-vsock CLI to define sibling VMs
- Implement sibling VM communication
- (optional) Support adding new VMs at runtime
Links:
- vsock info and issues
- virtio-vsock QEMU wiki page
- vhost-user-vsock application
- vhost-user-vsock project @ GSoC 2021
- Firecracker's hybrid VSOCK
- vhost-user protocol
- VMADDR_FLAG_TO_HOST flag support in Linux
Details:
- Project size: 350 hours
- Skill level: intermediate (knowledge of Rust and virtualization)
- Language: Rust
- Mentors: Stefano Garzarella <sgarzare@redhat.com>, German Maglione <gmaglione@redhat.com>
- IRC: sgarzare / Matrix: @sgarzare:matrix.org
- Suggested by: Stefano Garzarella <sgarzare@redhat.com>