How to run the Virtual Machine Image on KVM/QEMU

The Virtual Machine image ships in a VMWare "VMDK" style image. This image can be run directly by KVM/QEMU, or run under libvert and vert-manager tools by converting the image to a qcow2 disk.

Running directly under KVM/QEMU.

User mode networking

KVM/QEMU will directly support a VMWare VMDK image. Unzip the Foswiki VMWare image to a local directory. The following shell script will launch the image with a user mode networking interface. It will be reachable from your local system, but is not usable across a network.
#!/bin/sh
/usr/bin/qemu-system-x86_64  -smp 2 -soundhw ac97 -enable-kvm -m 1536 \
 -hda "/path/to/Foswiki.vmwarevm/Foswiki.vmdk" \
 -boot once=c,menu=off \
 -net nic,vlan=0,macaddr=e2:ed:c2:ea:a1:13 \
 -net user \
 -name "foswiki.vmware" $*

Bridged networking

ALERT!This document assumes that your network interface has already been configured as a "Bridge", and that the tap0 interface exists, and the user has authorization to access the interface. Configuration of the bridged interface is beyond the scope of this document.

Replace the line -net user \ with the tap connection:
 -net tap,vlan=0,ifname=tap0,script=no \

Running under libvert using virt-manager

The setup of this configuration is generally much simpler than the direct QEMU method, however libvert is currently unable to directly boot a vmdk vmware disk. The vmdk must be converted to a qcow2 image:
qemu-img convert -O qcow2 Foswiki.vmdk Foswiki.qcow2

Once the vmdk has been converted to qcow2 you can use virt-manager to boot your virtual machine.

Using the virt-manager create a new VM

createvm-2.png

Set the path to the qcow2 image, and the system architecture

createvm-2.png

Set memory and CPU

createvm-3.png

Alternative 1: Configure "user mode" network

createvm-4a.png

Alternative 2: Configure bridged networking

createvm-4b.png
Topic revision: r2 - 11 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy