{"id":17651170,"url":"https://github.com/bobuhiro11/gokvm","last_synced_at":"2025-04-06T12:11:41.742Z","repository":{"id":37428851,"uuid":"334352225","full_name":"bobuhiro11/gokvm","owner":"bobuhiro11","description":"KVM based tiny x86 hypervisor written in pure golang, which can boot Linux","archived":false,"fork":false,"pushed_at":"2024-08-20T13:25:36.000Z","size":6433,"stargazers_count":226,"open_issues_count":8,"forks_count":25,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-30T11:09:52.484Z","etag":null,"topics":["go","golang","hypervisor","kernel","kvm","linux","vmm"],"latest_commit_sha":null,"homepage":"https://blog.bobuhiro11.net/tags/gokvm.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bobuhiro11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-01-30T07:13:09.000Z","updated_at":"2025-03-19T07:39:43.000Z","dependencies_parsed_at":"2023-09-25T05:58:03.424Z","dependency_job_id":"704665c7-08b7-4dfb-ae7c-34d42b23074a","html_url":"https://github.com/bobuhiro11/gokvm","commit_stats":null,"previous_names":["nmi/gokvm"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Fgokvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Fgokvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Fgokvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobuhiro11%2Fgokvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobuhiro11","download_url":"https://codeload.github.com/bobuhiro11/gokvm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478324,"owners_count":20945266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","hypervisor","kernel","kvm","linux","vmm"],"created_at":"2024-10-23T11:40:29.688Z","updated_at":"2025-04-06T12:11:41.703Z","avatar_url":"https://github.com/bobuhiro11.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gokvm [![Build Status](https://app.travis-ci.com/bobuhiro11/gokvm.svg?branch=main)](https://app.travis-ci.com/bobuhiro11/gokvm) [![Coverage Status](https://coveralls.io/repos/github/bobuhiro11/gokvm/badge.svg?branch=main)](https://coveralls.io/github/bobuhiro11/gokvm?branch=main) [![code lines](https://sloc.xyz/github/bobuhiro11/gokvm?category=code)](https://sloc.xyz/github/bobuhiro11/gokvm?category=code) [![Go Reference](https://pkg.go.dev/badge/github.com/bobuhiro11/gokvm.svg)](https://pkg.go.dev/github.com/bobuhiro11/gokvm) [![Go Report Card](https://goreportcard.com/badge/github.com/bobuhiro11/gokvm)](https://goreportcard.com/report/github.com/bobuhiro11/gokvm) [![Maintainability](https://api.codeclimate.com/v1/badges/f60e75353f617035d732/maintainability)](https://codeclimate.com/github/bobuhiro11/gokvm/maintainability)\n\n\ngokvm is a hypervisor that uses KVM as an acceleration.\nIt is implemented completely in the Go language.\nWith **only 1.5k lines of code**, it can **boot Linux 5.10**, the latest version at the time, without any modifications\n(see [v0.0.1](https://github.com/bobuhiro11/gokvm/releases/tag/v0.0.1)).\nIt includes naive and simple device emulation for serial console, virtio-net, and virtio-blk.\nThe execution environment is limited to the x86-64 Linux environment.\nThis should be useful for those who are interested in how to use KVM from userland.\nThe latest version supports the following features:\n\n- [x] kvm acceleration\n- [x] multi processors\n- [x] serial console\n- [x] virtio-net\n- [x] virtio-blk\n- [x] PVH Boot Protocol\n\n**This is an experimental project, so please do not use it in production.**\n\n![demo](https://raw.githubusercontent.com/bobuhiro11/gokvm/main/demo.gif)\n\n## CLI\n\nExtract the latest release from [the Github Release tab](https://github.com/bobuhiro11/gokvm/releases) and run it.\nBefore running, make sure /dev/kvm exists.\nYou can use existing bzImage and initrd, or you can create them using the Makefile of this project.\n\n```bash\ntar zxvf gokvm*.tar.gz\n./gokvm boot -k ./bzImage -i ./initrd  # To exit, press Ctrl-a x.\n```\n\n## Go package\n\nThis project includes a thin wrapper for the KVM API using ioctl. Please refer to the following link to use it.\n\nhttps://pkg.go.dev/github.com/bobuhiro11/gokvm\n\n## Reference\n\nThanks to the many useful resources on KVM, this project was able to boot Linux on a virtual machine.\n\n- [The Definitive KVM API Documentation](https://docs.kernel.org/virt/kvm/api.html#)\n- [Using the KVM API, lwn.net](https://lwn.net/Articles/658511/)\n- [kvmtest.c, lwn.net](https://lwn.net/Articles/658512/)\n- [KVM tool](https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/about/)\n- [kvm-hello-world](https://github.com/dpw/kvm-hello-world)\n- [linux kvm-api: types,structures, consts](https://github.com/torvalds/linux/blob/master/include/uapi/linux/kvm.h)\n- [aghosn/kvm.go](https://gist.github.com/aghosn/f72c8e8f53bf99c3c4117f49677ab0b9)\n- [KVM HOST IN A FEW LINES OF CODE](https://zserge.com/posts/kvm/)\n- [zserge/kvm-host.c](https://gist.github.com/zserge/ae9098a75b2b83a1299d19b79b5fe488)\n- [CS 695: Virtualization and Cloud Computing, cse.iitb.ac.in](https://www.cse.iitb.ac.in/~cs695/)\n- [The Linux/x86 Boot Protocol, kernel.org](https://www.kernel.org/doc/html/latest/x86/boot.html)\n- [Build and run minimal Linux / Busybox systems in Qemu](https://gist.github.com/chrisdone/02e165a0004be33734ac2334f215380e)\n- [kvm_cost.go, google/gvisor](https://github.com/google/gvisor/blob/master/pkg/sentry/platform/kvm/kvm_const.go)\n- [Serial UART information, www.lammertbies.nl](https://www.lammertbies.nl/comm/info/serial-uart)\n- [Virtual I/O Device (VIRTIO) Version 1.1](https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html)\n- [rust-vmm/vm-virtio](https://github.com/rust-vmm/vm-virtio/tree/main/crates/virtio-queue)\n- [ハイパーバイザの作り方～ちゃんと理解する仮想化技術～ 第１１回 virtioによる準仮想化デバイス その１「virtioの概要とVirtio PCI」](https://syuu1228.github.io/howto_implement_hypervisor/part11.html)\n- [ハイパーバイザの作り方～ちゃんと理解する仮想化技術～ 第１２回 virtioによる準仮想化デバイス その２「Virtqueueとvirtio-netの実現」](https://syuu1228.github.io/howto_implement_hypervisor/part12.html)\n- [Xen PVH boot protocol](https://github.com/mirage/xen/blob/master/docs/misc/hvmlite.markdown)\n- [Cloud Hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobuhiro11%2Fgokvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobuhiro11%2Fgokvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobuhiro11%2Fgokvm/lists"}