The use of KVM under Linux
CPU Open VT
Installing the KVM Suite
Add BR0 Bridging Network port
Create a virtual machine disk, or create the disk when you install the virtual machine.
Installing virtual machines
Using virtual machines
Start a new virtual machine by using the installed virtual machine disk as the original image
To turn off installed virtual machines
Copy the installed virtual machine disks
Re-define the XML file for a virtual machine with the following details:
<domain type= ' KVM ' > <name>vm01</name> <memory>4096000</memory> <currentMemory>4096000</currentMemory> <vcpu>2</vcpu> <os> <type arch= ' x86_64 ' machine= ' pc ' >hvm</type> <boot dev= ' HD '/> </os> <features> <acpi/> <apic/> < pae/> </features> <clock offset= ' localtime '/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_ reboot> <on_crash>destroy</on_crash> <devices> <emulAtor>/usr/libexec/qemu-kvm</emulator> <disk type= ' file ' Device= ' disk ' > <driver name= ' qemu ' type= ' Qcow2 '/> <source file= '/storage/instance/vm01/centos6.6.qcow2 '/> <target dev= ' HDA ' bus= ' IDE '/> </disk> <disk type= ' file ' device= ' disk ' > <driver name= ' qemu ' type= ' Qcow2 '/> <source file= '/storage/instance/vm01/disk.qcow2 '/> <target dev= ' HDB ' bus= ' IDE '/> </disk> <disk type= ' file ' device= ' cdrom ' > < Source file= '/iso/centos-6.6-x86_64-bin-dvd1.iso '/> <target dev= ' hdc ' bus= ' IDE '/> </disk> <interface type= ' bridge ' > <source bridge= ' br0 '/> </interface> <input type= ' mouse ' bus= ' PS2 '/> <graphics type= ' VNC ' port= '-1 ' autoport= ' yes ' listen = ' 0.0.0.0 ' keymap= ' en-US '/> </devices> </domain>
To start the virtual machine you just created
Done
KVM Virtual machines under Linux