Skip to content

Instantly share code, notes, and snippets.

@andreeaflorescu
andreeaflorescu / firecracker_crosvm_crates.md
Last active January 24, 2019 09:36
Firecracker and Crosvm Common Crates - WIP
@sameo
sameo / qemu-upstream.md
Last active November 29, 2018 14:43
QEMU upstream submission scripts

Get maintainers

git diff --cached | ./scripts/get_maintainer.pl --nol | cut -d '(' -f 1 | awk '$0="Cc: "$0' | sed -e 's/[[:space:]]*$//'

git-request-pull

git request-pull upstream/master https://github.com/intel/nemu topic/upstream/acpi
@mcastelino
mcastelino / qemu_migrate.md
Last active March 21, 2024 21:06
Using Local Virtual Machine Migration to perform fast VM launch using QEMU

Overview

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.

Creating a Virtual Machine that can be fast resumed

@mcastelino
mcastelino / qemu-tracing.md
Last active September 27, 2023 14:47
Tracing QEMU-KVM Interactions

Tracing QEMU-KVM Interactions

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.

Tracking VM-KVM Interactions

This can be done very simply with perf

@egernst
egernst / Debug CC QEMU pc-lite.md
Last active April 28, 2017 07:54 — forked from mcastelino/Debug CC QEMU pc-lite.md
Debugging Clear Containers Kernel and Rootfs using qemu-lite

Debug the kernel and rootfs for Clear Containers with pc lite

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 \