KVM

From Indie IT Wiki
Jump to: navigation, search

Introduction

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.

Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.

KVM is open source software. The kernel component of KVM is included in mainline Linux, as of 2.6.20. The userspace component of KVM is included in mainline QEMU, as of 1.3.

HOWTOs

Install

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Guest Agent

ssh user@guest
sudo apt-get install qemu-guest-agent
sudo reboot

List

virsh --connect qemu:///system list --all

Start

virsh --connect qemu:///system start '<Name>'

Stop

virsh --connect qemu:///system stop '<Name>'

Reboot

virsh --connect qemu:///system stop '<Name>'

Management

VirSH (Command Line)

Virtual Machine Manager (X Based GUI)

WebVirtMgr (Web Based)

Information

Offical Web Site

Ubuntu Official Documentation

Nice Command Line examples