MCPcopy Index your code
hub / github.com/Mic92/vmsh

github.com/Mic92/vmsh @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
892 symbols 2,419 edges 109 files 115 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vmsh

Lightweight virtual machines (VMs) are prominently adopted for improved performance and dependability in cloud envi- ronments. To reduce boot up times and resource utilisation, they are usually “pre-baked" with only the minimal kernel and userland strictly required to run an application. This in- troduces a fundamental trade-off between the advantages of lightweight VMs and available services within a VM, usually leaning towards the former. We propose VMSH, a hypervisor-agnostic abstraction that enables on-demand attachment of services to a running VM— allowing developers to provide minimal, lightweight images without compromising their functionality. The additional applications are made available to the guest via a file system image. To ensure that the newly added services do not affect the original applications in the VM, VMSH uses lightweight isolation mechanisms based on containers. We evaluate VMSH on multiple KVM-based hypervisors and Linux LTS kernels and show that: (i) VMSH adds no overhead for the applications running in the VM, (ii) de-bloating im- ages from the Docker registry can save up to 60% of their size on average, and (iii) VMSH enables cloud providers to offer services to customers, such as recovery shells, without interfering with their VM’s execution.

Reproducing the paper results

VMSH was published in Eurosys 2022. To reproduce the results shown in the evaluation of the paper, we provide dedicated documentation.

Usage

  • Run just pts in one terminal to get a /dev/pts/x.
  • Run just qemu in another terminal to spawn a VM.
  • Run just attach-qemu-sh /dev/pts/x in another terminal to attach the first terminal to the shell which is spawned into the VM.

Related work

Build small vm images with microvm.nix

Referencing our work

VMSH: Hypervisor-agnostic Guest Overlays for VMs
Jörg Thalheim, Peter Okelmann, Harshavardhan Unnibhavi, Redha Gouicem, Pramod Bhatotia
EUROSYS 2022
[Paper]

@inproceedings{DBLP:conf/eurosys/ThalheimOUGB22,
  author    = {J{\"{o}}rg Thalheim and
               Peter Okelmann and
               Harshavardhan Unnibhavi and
               Redha Gouicem and
               Pramod Bhatotia},
  title     = {{VMSH:} hypervisor-agnostic guest overlays for VMs},
  booktitle = {EuroSys},
  pages     = {678--696},
  publisher = {{ACM}},
  year      = {2022}
}

Extension points exported contracts — how you extend this code

SignalUsedQueue (Interface)
Simple trait to model the operation of signalling the driver about used events for the specified queue. TODO: Does this [1 …
src/devices/virtio/mod.rs
MaybeIoRegionFd (Interface)
(no doc) [2 implementers]
src/devices/mod.rs

Core symbols most depended-on inside this repo

join
called by 61
src/interrutable_thread.rs
iter
called by 41
src/page_table.rs
map
called by 41
src/kvm/hypervisor/hypervisor.rs
ssh_cmd
called by 38
tests/qemu.py
run
called by 29
tests/procs.py
contains
called by 27
src/guest_mem.rs
get
called by 25
src/guest_mem.rs
write
called by 22
src/tracer/ptrace.rs

Shape

Function 367
Method 358
Class 152
Enum 13
Interface 2

Languages

Rust69%
Python31%
C1%

Modules by API surface

src/kvm/hypervisor/hypervisor.rs35 symbols
src/page_table.rs34 symbols
src/kvm/tracee.rs31 symbols
tests/coredump_analyze.py29 symbols
src/tracer/wrap_syscall.rs27 symbols
src/tracer/inject_syscall.rs26 symbols
tests/qemu.py25 symbols
tests/coredump_structs.py25 symbols
tests/coredump.py24 symbols
src/kernel.rs20 symbols
src/stage1/src/lib.rs19 symbols
tests/reproduce.py17 symbols

For agents

$ claude mcp add vmsh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact