{"id":17099824,"url":"https://github.com/cppcoffee/kvm-box","last_synced_at":"2026-05-01T01:32:23.494Z","repository":{"id":238225473,"uuid":"796137913","full_name":"cppcoffee/kvm-box","owner":"cppcoffee","description":"The kvm-box is a minimalist virtual machine monitor (VMM) that uses the Linux Kernel Virtual Machine (KVM) to create and run microVM","archived":false,"fork":false,"pushed_at":"2024-05-14T01:04:49.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T18:34:22.291Z","etag":null,"topics":["kvm","kvm-hypervisor","virtual-machine","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cppcoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T03:38:58.000Z","updated_at":"2024-12-20T19:00:56.000Z","dependencies_parsed_at":"2024-05-05T04:26:48.266Z","dependency_job_id":"fed3b997-39bf-4ba4-8c3a-144a41156337","html_url":"https://github.com/cppcoffee/kvm-box","commit_stats":null,"previous_names":["cppcoffee/kvm-box"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cppcoffee/kvm-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fkvm-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fkvm-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fkvm-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fkvm-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/kvm-box/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fkvm-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kvm","kvm-hypervisor","virtual-machine","x86-64"],"created_at":"2024-10-14T15:11:30.255Z","updated_at":"2026-05-01T01:32:23.478Z","avatar_url":"https://github.com/cppcoffee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kvm-box\n\nThe `kvm-box` is a minimalist virtual machine monitor (VMM) that uses the Linux Kernel Virtual Machine (KVM) to create and run microVM, capable of running Linux kernel partially.\n\n## Supported Architecture\n\n- x86-64\n\n## Build\n\n```shell\n$ make\n```\n\nThe `kvm-box` binary will be placed at `target/release/kvm-box`.\n\n## Preparing the kernel and initrd\n\nkernel: use pre-compiled and tuned files from firecracker:\n\n```shell\n$ wget https://s3.amazonaws.com/spec.ccfc.min/img/quickstart_guide/x86_64/kernels/vmlinux.bin\n```\n\ninitrd:\n\n```shell\n$ git clone https://github.com/marcov/firecracker-initrd.git\n$ cd firecracker-initrd\n$ bash -x ./build.sh\n```\n\n## Usage\n\n```shell\n$ ./target/release/kvm-box --kernel ./testdata/vmlinux.bin --initrd ./testdata/initrd.img\n[    0.000000] Linux version 4.14.174 (@57edebb99db7) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #2 SMP Wed Jul 14 11:47:24 UTC 2021\n[    0.000000] Command line: console=ttyS0 noapic noacpi reboot=k panic=1 pci=off nomodule\n[    0.000000] Disabled fast string operations\n[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'\n[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'\n[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'\n[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256\n[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.\n[    0.000000] e820: BIOS-provided physical RAM map:\n[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable\n[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved\n[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000007fffffff] usable\n[    0.000000] NX (Execute Disable) protection: active\n[    0.000000] DMI not present or invalid.\n[    0.000000] tsc: Fast TSC calibration failed\n[    0.000000] tsc: Unable to calibrate against PIT\n[    0.000000] tsc: No reference (HPET/PMTIMER) available\n[    0.000000] e820: last_pfn = 0x80000 max_arch_pfn = 0x400000000\n[    0.000000] MTRR: Disabled\n[    0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too.\n[    0.000000] CPU MTRRs all blank - virtualized system.\n[    0.000000] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC\n[    0.000000] Scanning 1 areas for low memory corruption\n[    0.000000] Using GB pages for direct mapping\n[    0.000000] RAMDISK: [mem 0x7f180000-0x7fffffff]\n[    0.000000] No NUMA configuration found\n[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000007fffffff]\n[    0.000000] NODE_DATA(0) allocated [mem 0x7f15e000-0x7f17ffff]\n[    0.000000] Zone ranges:\n[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]\n[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000007fffffff]\n[    0.000000]   Normal   empty\n[    0.000000] Movable zone start for each node\n[    0.000000] Early memory node ranges\n[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]\n[    0.000000]   node   0: [mem 0x0000000000100000-0x000000007fffffff]\n[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000007fffffff]\n[    0.000000] smpboot: Boot CPU (id 0) not listed by BIOS\n[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs\n[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]\n[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]\n[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff]\n[    0.000000] e820: [mem 0x80000000-0xffffffff] available for PCI devices\n[    0.000000] Booting paravirtualized kernel on bare hardware\n[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns\n[    0.000000] random: get_random_bytes called from start_kernel+0x94/0x486 with crng_init=0\n[    0.000000] setup_percpu: NR_CPUS:128 nr_cpumask_bits:128 nr_cpu_ids:1 nr_node_ids:1\n[    0.000000] percpu: Embedded 41 pages/cpu s128600 r8192 d31144 u2097152\n[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 515977\n[    0.000000] Policy zone: DMA32\n[    0.000000] Kernel command line: console=ttyS0 noapic noacpi reboot=k panic=1 pci=off nomodule\n[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)\n[    0.000000] Memory: 2031508K/2096760K available (8204K kernel code, 645K rwdata, 1480K rodata, 1324K init, 2792K bss, 65252K reserved, 0K cma-reserved)\n[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1\n[    0.000000] Kernel/User page tables isolation: enabled\n[    0.000000] Hierarchical RCU implementation.\n[    0.000000]  RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ids=1.\n[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1\n[    0.000000] NR_IRQS: 4352, nr_irqs: 24, preallocated irqs: 16\n[    0.000000] Console: colour dummy device 80x25\n[    0.000000] console [ttyS0] enabled\n[    0.000000] tsc: Fast TSC calibration failed\n[    0.016000] tsc: Unable to calibrate against PIT\n[    0.020000] tsc: No reference (HPET/PMTIMER) available\n[    0.028000] tsc: Marking TSC unstable due to could not calculate TSC khz\n[    0.036000] Calibrating delay loop... 5607.42 BogoMIPS (lpj=11214848)\n[    0.064000] pid_max: default: 32768 minimum: 301\n[    0.072000] Security Framework initialized\n[    0.076000] SELinux:  Initializing.\n[    0.124000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)\n[    0.148000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)\n[    0.156000] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)\n[    0.164000] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)\n[    0.176000] Disabled fast string operations\n[    0.184000] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0\n[    0.188000] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0\n[    0.196000] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization\n[    0.204000] Spectre V2 : Mitigation: Full generic retpoline\n[    0.212000] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n[    0.216000] Spectre V2 : Enabling Restricted Speculation for firmware calls\n[    0.224000] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier\n[    0.228000] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp\n[    0.236000] MDS: Mitigation: Clear CPU buffers\n[    0.308000] Freeing SMP alternatives memory: 28K\n[    0.332000] smpboot: Max logical packages: 1\n[    0.336000] smpboot: CPU 0 Converting physical 29 to logical package 0\n[    0.340000] smpboot: SMP motherboard not detected\n[    0.344000] smpboot: SMP disabled\n[    0.348000] Not enabling interrupt remapping due to skipped IO-APIC setup\n[    0.576000] Performance Events: unsupported p6 CPU model 60 no PMU driver, software events only.\n[    0.580000] Hierarchical SRCU implementation.\n[    0.588000] smp: Bringing up secondary CPUs ...\n[    0.592000] smp: Brought up 1 node, 1 CPU\n[    0.596000] smpboot: Total of 1 processors activated (5607.42 BogoMIPS)\n[    0.600000] devtmpfs: initialized\n[    0.608000] x86/mm: Memory block size: 128MB\n[    0.616000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns\n[    0.620000] futex hash table entries: 256 (order: 2, 16384 bytes)\n[    0.632000] NET: Registered protocol family 16\n[    0.636000] cpuidle: using governor ladder\n[    0.640000] cpuidle: using governor menu\n[    0.688000] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages\n[    0.692000] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages\n[    0.696000] SCSI subsystem initialized\n[    0.700000] pps_core: LinuxPPS API ver. 1 registered\n[    0.704000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti \u003cgiometti@linux.it\u003e\n[    0.708000] PTP clock support registered\n[    0.712000] dmi: Firmware registration failed.\n[    0.716000] NetLabel: Initializing\n[    0.720000] NetLabel:  domain hash size = 128\n[    0.724000] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO\n[    0.728000] NetLabel:  unlabeled traffic allowed by default\n[    0.732000] clocksource: Switched to clocksource refined-jiffies\n[    0.736000] VFS: Disk quotas dquot_6.6.0\n[    0.740000] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)\n[    0.752001] NET: Registered protocol family 2\n[    0.756001] TCP established hash table entries: 16384 (order: 5, 131072 bytes)\n[    0.760001] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)\n[    0.764002] TCP: Hash tables configured (established 16384 bind 16384)\n[    0.768002] UDP hash table entries: 1024 (order: 3, 32768 bytes)\n[    0.772002] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)\n[    0.776002] NET: Registered protocol family 1\n[    0.780003] Unpacking initramfs...\n[    1.240031] Freeing initrd memory: 14848K\n[    1.244032] platform rtc_cmos: registered platform RTC device (no PNP device found)\n[    1.248032] Scanning for low memory corruption every 60 seconds\n[    1.252032] audit: initializing netlink subsys (disabled)\n[    1.256032] Initialise system trusted keyrings\n[    1.260033] Key type blacklist registered\n[    1.264033] audit: type=2000 audit(943920001.256:1): state=initialized audit_enabled=0 res=1\n[    1.268033] workingset: timestamp_bits=36 max_order=19 bucket_order=0\n[    1.292035] squashfs: version 4.0 (2009/01/31) Phillip Lougher\n[    1.300035] Key type asymmetric registered\n[    1.304035] Asymmetric key parser 'x509' registered\n[    1.308036] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)\n[    1.312036] io scheduler noop registered (default)\n[    1.316036] io scheduler cfq registered\n[    1.320036] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled\n[    1.328037] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a U6_16550A\n[    1.336037] loop: module loaded\n[    1.340038] Loading iSCSI transport class v2.0-870.\n[    1.344038] iscsi: registered transport (tcp)\n[    1.348038] tun: Universal TUN/TAP device driver, 1.6\n[    1.356039] i8042: Can't read CTR while initializing i8042\n[    1.360039] i8042: probe of i8042 failed with error -5\n[    1.364039] hidraw: raw HID events driver (C) Jiri Kosina\n[    1.368039] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)\n[    1.372040] ip_tables: (C) 2000-2006 Netfilter Core Team\n[    1.376040] Initializing XFRM netlink socket\n[    1.384040] NET: Registered protocol family 10\n[    1.392041] Segment Routing with IPv6\n[    1.396041] NET: Registered protocol family 17\n[    1.400041] Bridge firewalling registered\n[    1.404042] NET: Registered protocol family 40\n[    1.408042] registered taskstats version 1\n[    1.412042] Loading compiled-in X.509 certificates\n[    1.416042] Loaded X.509 cert 'Build time autogenerated kernel key: e98e9d271da5d0a322cc4d7bfaa8c2c4c3e46010'\n[    1.424043] Key type encrypted registered\n[    1.440044] Freeing unused kernel memory: 1324K\n[    1.452045] Write protecting the kernel read-only data: 12288k\n[    1.488047] Freeing unused kernel memory: 2016K\n[    1.500048] Freeing unused kernel memory: 568K\n\n   OpenRC 0.52.1 is starting up Linux 4.14.174 (x86_64)\n\n * Mounting /proc ... [ ok ]\n * Mounting /run ... [ ok ]\n * /run/openrc: creating directory\n * /run/lock: creating directory\n * /run/lock: correcting owner\n * Caching service dependencies ... [ ok ]\n * Clock skew detected with `/etc/init.d'\n * Adjusting mtime of `/run/openrc/deptree' to Tue Apr 30 14:22:13 2024\n\n * WARNING: clock skew detected!\n * WARNING: clock skew detected!\n * Mounting devtmpfs on /dev ... [ ok ]\n * Mounting /dev/mqueue ... [ ok ]\n * Mounting /dev/pts ... [ ok ]\n * Mounting /dev/shm ... [ ok ]\n * Loading modules ...modprobe: can't change directory to '/lib/modules': No such file or directory\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n [ ok ]\n * Mounting misc binary format filesystem ... [ ok ]\n * Mounting /sys ... [ ok ]\n * Mounting security filesystem ... [ ok ]\n * Mounting debug filesystem ... [ ok ]\n * Mounting SELinux filesystem ... [ ok ]\n * Mounting persistent storage (pstore) filesystem ... [ ok ]\n * WARNING: clock skew detected!\n\nWelcome to Alpine Linux 3.19\nKernel 4.14.174 on an x86_64 (ttyS0)\n\n(none) login: root\nWelcome to Alpine!\n[    4.208217] random: fast init done\n\nThe Alpine Wiki contains a large amount of how-to guides and general\ninformation about administrating Alpine systems.\nSee \u003chttps://wiki.alpinelinux.org/\u003e.\n\nYou can setup the system with the command: setup-alpine\n\nYou may change this message by editing /etc/motd.\n\nlogin[818]: root login on 'ttyS0'\n(none):~# uname -a\nLinux (none) 4.14.174 #2 SMP Wed Jul 14 11:47:24 UTC 2021 x86_64 Linux\n(none):~# reboot -f\n[    8.888509] reboot: Restarting system\n[    8.892510] reboot: machine restart\nKVM_EXIT_SHUTDOWN\nvcpu stopped, main loop exit\n```\n\n## References\n\n[KVM (Kernel-based Virtual Machine) API](https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt)\n\n[Using the KVM API](https://lwn.net/Articles/658511/)\n\n[firecracker](https://github.com/firecracker-microvm/firecracker)\n\n[firecracker-initrd](https://github.com/marcov/firecracker-initrd)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fkvm-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Fkvm-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fkvm-box/lists"}