sudo qemu-lite-system-x86_64 \
-machine pc-lite,accel=kvm,kernel_irqchip,nvdimm \
-cpu host -m 256,maxmem=1G,slots=2 \
-smp 2 -no-user-config -nodefaults \
-rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard \
-kernel ./vmlinux-4.9.4-53.container \
-append "reboot=k panic=1 rw tsc=reliable no_timer_check \
But default in linux you can figure out how many times and for what reasons there is a VM Exit from a VM into the kvm kernel module. However given the ubiquity of vhost and the ability of kvm to emulate most device models directly in the kernel, most of those VM exits do not result in a transition from host kernel into the QEMU. The transitions from VM -> kvm -> QEMU are typically the most expensive.
Here we try to figure out how many of the VM Exits result in the invocation of QEMU.
This can be done very simply with perf
QEMU supports migration of a virtual machine across machine over the network. It also has the capability to save the state of a virtual machine and resume from that state.
It is described in detail in https://www.linux-kvm.org/page/Migration
This capability can be leveraged to create an instant resume virtual machine image if the virtual machine is crafted with care.
The purpose of this gist is to get a discussion started about what the Firecracker team can contribute to crosvm.
This comparison is based on the following commits:
- crosvm commit 7df5a0ef1a23542b0cc7db7797b8b287eaa05699
- Firecracker commit d6861f91acc13868cac4cde94cbce21d9cb5e833
This comparison only touches the common crates of Firecracker and crosvm.