Linux + KVM + libvirt is pretty cool!

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts

On Slackware 13.0 64 bit:

modprobe kvm
modprobe kvm-intel
modprobe virtio

git clone git://
cd qemu-kvm
./configure && make && make install

Fetch some libvirt:

After installing your libvirt, don't forget to symlink your
/usr/bin/kvm to qemu-system-x86_64

And stub out some xml for you guest like this in:

<domain type='kvm'>
    <type arch='i686'>hvm</type>
  <clock offset='localtime'/>
    <disk type='file' device='disk'>
      <source file='/root/vms/winxp-registered-and-base-installed-clean-sp3'/>
      <target dev='hda' bus='ide'/>
    <interface type='network'>
      <source network='default'/>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5902' autoport='no' listen=''/>
    <sound model='sb16'/>
      <model type='vga' vram='9216' heads='1'/>

Start the daemon libvirtd in a startup script

Crank it up from the virsh:

start hostxp
start a vncviewer :2 on localhost and you are off the the races!

And even take the Python module for a ride as well!

import libvirt
import sys

conn = libvirt.openReadOnly(None)
if conn == None:
    print 'Failed to open connection to the hypervisor'

    dom0 = conn.lookupByName("hostxp")
    print 'Failed to find the main domain'

print "Domain 0: id %d running %s" % (dom0.ID(), dom0.OSType())

Monitor that set of vm's!: