CloudFORMS CFME on KVM

If you so happen to have the VMware OVF version of CloudFORMs CFME, and you want to convert to run on KVM, this is how.

1. If the OVF is zipped, Unzip the appliance image:

$ unzip evm-v5.1.0.4-r.zip

2. Convert each of the 5 disks from VMDK format to RAW:
$ for i in `seq 1 5`; do qemu-img convert -p evm-v5.1.0.4-r/ovf-disk$i.vmdk disk$i.img; done

3. Remove unneeded files
$ rm -rf evm-v5.1.0.4-r/

4. Move your disk[1-5].img into place in /var/lib/libvirt/images, with the correct ownership.

5. Use virt-manager to create a VM such that disk1.img is an IDE disk, and disk[2-5].img are SCSI disks.  If it helps, here’s the libvirt XML for my VM:

$ virsh dumpxml cloudforms2

<domain type='kvm' id='7'>
<name>cloudforms2</name>
<uuid>17b323fa-27fc-39a2-382d-5e3d0fd70cbc</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type arch='x86_64' machine='pc-1.2'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/disk1.img'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/disk2.img'/>
<target dev='sda' bus='scsi'/>
<alias name='scsi0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/disk3.img'/>
<target dev='sdb' bus='scsi'/>
<alias name='scsi0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/disk4.img'/>
<target dev='sdc' bus='scsi'/>
<alias name='scsi0-0-2'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/disk5.img'/>
<target dev='sdd' bus='scsi'/>
<alias name='scsi0-0-3'/>
<address type='drive' controller='0' bus='0' target='0' unit='3'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='scsi' index='0'>
<alias name='scsi0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:07:10:58'/>
<source network='default'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='vmvga' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>

Credits

Jim Minter – Thanks for the instructions on how to achieve this.

  1. After you finish converting the disk1 …. disk5 and put them in a folder such as /home/jzhou/VMs/EVM05104, you can create the VM using “virt-install” as below.

    virt-install –name=EVM
    –ram=4096
    –vcpus=2
    –import
    –disk path=/home/jzhou/VMs/EVM-5104/disk0,format=qcow2,bus=ide
    –disk path=/home/jzhou/VMs/EVM-5104/disk1,format=qcow2,bus=virtio
    –disk path=/home/jzhou/VMs/EVM-5104/disk2,format=qcow2,bus=virtio
    –disk path=/home/jzhou/VMs/EVM-5104/disk3,format=qcow2,bus=virtio
    –disk path=/home/jzhou/VMs/EVM-5104/disk4,format=qcow2,bus=virtio
    –network=network:default
    –graphics=spice
    –os-type=linux
    –os-variant=rhel5.4

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s