Skip to content

Commit

Permalink
KVM documentation
Browse files Browse the repository at this point in the history
- extended the documentation with more details on prerequisites and usage of the kvm provider
  • Loading branch information
ffeldhaus committed Jan 9, 2013
1 parent bf86e8f commit 7e1d0c9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 9 deletions.
65 changes: 58 additions & 7 deletions doc/kvm.md
@@ -1,8 +1,10 @@
NOTE:Virtualbox doesn't like KVM to be enabled
# KVM Provider

## Prerequires
NOTE: Virtualbox doesn't like KVM to be enabled

To check if you're kernel can run kvm :
## Prerequisites

To check if your kernel can run kvm :

# kvm_ok or kvm-ok command (on Ubuntu at least)
kvm_ok
Expand All @@ -11,10 +13,59 @@ To check if you're kernel can run kvm :

The modules needed are the following : kvm, kvm_intel or kvm-amd.

## Define a new box
You need to have at least one storage pool defined in libvirt. You can check all
available storage pools with

virsh pool-list

If no storage pool is listed, you can create a new storage pool which saves all
VM images in the directory /var/lib/libvirt/images with

mkdir -p /var/lib/libvirt/images
cat > /tmp/pool.xml << EOF
<pool type="dir">
<name>virtimages</name>
<target>
<path>/var/lib/libvirt/images</path>
<format type='qcow2'/>
</target>
</pool>
EOF
virsh pool-create /tmp/pool.xml

You need to have at least one network defined. You can check all available
networks with

virsh net-list

If there is no default network, consult the documentation of your operating
system to find out how to creat it.

If you are using libvirt with a URI different than the default `qemu:///system`,
you need to create a config file for fog.io. If your libvirt endpoint is
accessible at `qemu+ssh://cloud@myhost.com/system` you can create the .fog config
file with

cat > ~/.fog << EOF
:default:
:libvirt_uri: qemu+ssh://cloud@myhost.com/system

## Using VeeWee

List available templates

veewee kvm templates

Use one of the listed templates to define a new box e.g. with

veewee kvm define 'My Ubuntu 12.10 box' 'ubuntu-12.10-server-amd64'

Build the box using KVM / Quemu (this will take a while)

veewee build 'My Ubuntu 12.10 box'

The workflow to create a box is almost the same as with the Virtualbox
provider (and others).
You may want to use the VNC console (e.g. through virt-manager) to monitor /
check the build process.

## Options

Expand All @@ -32,4 +83,4 @@ There is currently few options supported :
Remove modules:

rmmod kvm_intel
rmmod kvm
rmmod kvm
4 changes: 2 additions & 2 deletions doc/providers.md
Expand Up @@ -18,6 +18,6 @@ To interact with the screen , veewee enables VNC on the created vmware fusion ma

## KVM

To interact with KVM veewee, uses [libvirt support](http://libvirt.org/ruby/) provided through [Fog gem](http://fog.io) libvirt support
To interact with KVM veewee, uses [libvirt support](http://libvirt.org/ruby/) provided through [Fog gem](http://fog.io).

To interact with the screen , veewee enables VNC on the created vmware fusion machines and use the [Ruby-VNC gem](http://code.google.com/p/ruby-vnc/) to send the keystrokes. Here too , sending keystrokes too fast is a problem.
To interact with the screen , veewee enables VNC on the created kvm machines and use the [Ruby-VNC gem](http://code.google.com/p/ruby-vnc/) to send the keystrokes. Here too , sending keystrokes too fast is a problem.

0 comments on commit 7e1d0c9

Please sign in to comment.