1Native Linux KVM tool 2===================== 3 4kvmtool is a lightweight tool for hosting KVM guests. As a pure virtualization 5tool it only supports guests using the same architecture, though it supports 6running 32-bit guests on those 64-bit architectures that allow this. 7 8From the original announcement email: 9------------------------------------------------------- 10The goal of this tool is to provide a clean, from-scratch, lightweight 11KVM host tool implementation that can boot Linux guest images (just a 12hobby, won't be big and professional like QEMU) with no BIOS 13dependencies and with only the minimal amount of legacy device 14emulation. 15 16It's great as a learning tool if you want to get your feet wet in 17virtualization land: it's only 5 KLOC of clean C code that can already 18boot a guest Linux image. 19 20Right now it can boot a Linux image and provide you output via a serial 21console, over the host terminal, i.e. you can use it to boot a guest 22Linux image in a terminal or over ssh and log into the guest without 23much guest or host side setup work needed. 24-------------------------- 25 26This is the stand-alone version which does not live inside a Linux 27kernel tree. 281. To check it out, clone the main git repository: 29 30 git clone git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git 31 322. Compile the tool (for more elaborate instructions see INSTALL): 33 34 cd kvmtool && make 35 363. Download a raw userspace image: 37 38 wget http://wiki.qemu.org/download/linux-0.2.img.bz2 && bunzip2 39linux-0.2.img.bz2 40 414. The guest kernel has to be built with the following configuration: 42 43 - For the default console output: 44 CONFIG_SERIAL_8250=y 45 CONFIG_SERIAL_8250_CONSOLE=y 46 47 - For running 32bit images on 64bit hosts: 48 CONFIG_IA32_EMULATION=y 49 50 - Proper FS options according to image FS (e.g. CONFIG_EXT2_FS, CONFIG_EXT4_FS). 51 52 - For all virtio devices listed below: 53 CONFIG_VIRTIO=y 54 CONFIG_VIRTIO_RING=y 55 CONFIG_VIRTIO_PCI=y 56 57 - For virtio-blk devices (--disk, -d): 58 CONFIG_VIRTIO_BLK=y 59 60 - For virtio-net devices ([--network, -n] virtio): 61 CONFIG_VIRTIO_NET=y 62 63 - For virtio-9p devices (--virtio-9p): 64 CONFIG_NET_9P=y 65 CONFIG_NET_9P_VIRTIO=y 66 CONFIG_9P_FS=y 67 68 - For virtio-balloon device (--balloon): 69 CONFIG_VIRTIO_BALLOON=y 70 71 - For virtio-console device (--console virtio): 72 CONFIG_VIRTIO_CONSOLE=y 73 74 - For virtio-rng device (--rng): 75 CONFIG_HW_RANDOM_VIRTIO=y 76 77 - For vesa device (--sdl or --vnc): 78 CONFIG_FB_VESA=y 79 80 815. And finally, launch the hypervisor: 82 83 ./lkvm run --disk linux-0.2.img \ 84 --kernel ../../arch/x86/boot/bzImage \ 85or 86 87 sudo ./lkvm run --disk linux-0.2.img \ 88 --kernel ../../arch/x86/boot/bzImage \ 89 --network virtio 90 91The tool has been written by Pekka Enberg, Cyrill Gorcunov, Asias He, 92Sasha Levin and Prasad Joshi. Special thanks to Avi Kivity for his help 93on KVM internals and Ingo Molnar for all-around support and encouragement! 94 95See the following thread for original discussion for motivation of this 96project: 97 98http://thread.gmane.org/gmane.linux.kernel/962051/focus=962620 99 100Another detailed example can be found in the lwn.net article: 101 102http://lwn.net/Articles/658511/ 103 104Contributing 105------------ 106 107Please send patches for kvmtool to kvm@vger.kernel.org, in the usual git 108patch format, including "kvmtool" in the mail subject. "kvmtool" can be 109added automatically by issuing the command 110 111 git config format.subjectprefix "PATCH kvmtool" 112 113in the git repository. 114 115Maintainers 116----------- 117 118kvmtool is maintained by Will Deacon <will@kernel.org> and Julien Thierry 119<julien.thierry.kdev@gmail.com>. 120