Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMSH: hypervisor-agnostic guest overlays for VMs #290

Open
gaocegege opened this issue May 11, 2022 · 6 comments
Open

VMSH: hypervisor-agnostic guest overlays for VMs #290

gaocegege opened this issue May 11, 2022 · 6 comments

Comments

@gaocegege
Copy link
Member

https://github.com/Mic92/vmsh

https://dl.acm.org/doi/abs/10.1145/3492321.3519589

EuroSys'22

Shell into a virtualized Linux, with your own tools

@gaocegege
Copy link
Member Author

gaocegege commented May 11, 2022

这篇文章的核心观察是传统的 VM 提供了非常多的能力,但是为了部署方便,快速启停,现在业界的 FaaS 等都在追求 Lightweight VM。

但是轻量级 VM 都存在一个问题,就是缺少一些功能,这些功能可能在部署时不需要,但是在调试和开发的时候是需要的。这个时候你需要通过 ssh,配置 key 等等,最后到 VM 中操作。非常复杂。而如果是 docker 的话,就可以通过 docker exec 直接 attach 进去操作。

因此这个工作就是解决这样一个问题。为 attach & debug inside vm 提供更好的体验

To this end, we ask the following research question: Can lightweight VMs be extended with external functionality on demand and non-disruptively?

To address this problem, we propose VMSH, which provides an abstraction for accessing KVM-based VMs for tasks such as inspection, debugging, or modification. VMSH enables users to add functionality to VMs non-disruptively and connect to newly attached programs via a console

@gaocegege
Copy link
Member Author

gaocegege commented May 11, 2022

文章的贡献主要是三点:

  • 提出了一个在 Hardware 和 API 之间的抽象,类似于 docker exec,为 debug in vm 提供更好的使用体验

To maintain generality, VMSH provides an abstraction over the hardware and APIs of different KVM-based hypervisors, to offer a uniform hardware interface.

  • 设计了一个系统,能够让轻量级 VM 能够在运行时添加新的依赖

@gaocegege
Copy link
Member Author

VMSH 跟 KVM,VirtIO 有很大相关性。KVM 是硬件辅助的虚拟化的标准抽象了,而且已经合并在内核中。使用 KVM 的接口和能力实现的 Hypervisor 包括 QEMU,firecracker,crosvm 等。VMSH 支持这些 KVM-based Hypervisor。

VirtIO 定义了一套通用的接口,来在 VM 中模拟硬件设备,如网卡,硬盘等。VirtIO 通过共享内存的方式,在 Hypervisor 管理下的 device 以及装在 Guest 中的 driver 之间交换数据。VirtIO 有两种机制,memory mapped IO (MMIO) or on the PCI standard,VMSH 实现了前者,它在 MicroVM 里更常用。

@gaocegege
Copy link
Member Author

VMSH 的典型使用场景:

  • 云供应商在帮客户恢复系统,获取 VM 监控等数据时,不再需要 attach 进去装依赖然后执行,直接 VMSH on-the-fly 的进行即可
  • debug 场景,开发依赖不需要装在 image 里,可以运行时添加
  • serverless,说到底还是 debug

@gaocegege
Copy link
Member Author

image

@gaocegege
Copy link
Member Author

在设计上,VMSH 需要在 Host 上启动一个进程,跟 Hypervisor 相当于是在相同级别。它会 attach 到 Hypervisor 中,并且基于 Guest Kernel 启动一个 file system overlay 在 kernel 上的容器,这个容器的进程都跑在 user space。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant