When faced with testing applications, it is much easier to load an appliance. This will avoid the time sink of figuring out how to configure everything before you know if the software is what you want.
In this case, I am going to test out Bareos Backup software on a Centos 7.0 KVM enabled server.
First, I downloaded the VMWare file from here:
Search for Baroes on SUSE Studio web site
That web site has many appliances in the gallery you can download to test or use.
I selected the 64-bit stable from the search results, selected Virtual under the downloads section, then picked the vmdk version. This is compatible with VMware, VirtualBox, or KVM-based hypervisors.
While it downloads, look at the top of the download page and make note of which OS the appliance uses. You will need that information to create KVM guest later on.
In my case it was “Based on openSUSE 13.2 64-bit x86″
Once the file is downloaded, extract and prepare the vmdk file for use on th KVM host. Your file and directory names may be different.
You need to know the location of your images. Mine is located in /var/lib/libvirt/images. Move the file into that directory.
Please make sure the file you create here (in my case /var/lib/libvirt/images/bareos_1.qcow2) does not already exist. You would not want to wreck another guest here…
tar xzf bareos_64_bit_stable.x86_64-2015.02.06.vmx.tar.gz cd bareos_64_bit_stable.x86_64-2015.02.06 qemu-img convert -O qcow2 bareos_64_bit_stable.x86_64-2015.02.06.vmdk /var/lib/libvirt/images/bareos_1.qcow2
There will be another file in that tarball that ends in vmx. This is a text file you can look at to see the machine settings, such as memory size. You will need to know how to set the resources when you create the guest machine.
Next, create a new virtual machine using the image as the virtual machine primary drive.
ls -l /var/lib/libvirt/images -rw-------. 1 qemu qemu 2243952640 Jul 13 02:33 tyr.img -rw-r--r--. 1 root root 2243952640 Aug 7 11:18 bareos_1.qcow2
Notice that the permissions are not the same as others in that directory. Fix the permissions like this:
chown qemu:qemu /var/lib/libvirt/images/bareos_1.qcow2 chmod 600 /var/lib/libvirt/images/bareos_1.qcow2
Then check again:
ls -l /var/lib/libvirt/images -rw-------. 1 qemu qemu 2243952640 Jul 13 02:33 tyr.img -rw-------. 1 qemu qemu 2243952640 Aug 7 11:18 bareos_1.qcow2
Next, create the guest machine using the image you have created. At a minumum, you need to update the os-variant and image name
[root]# virt-install --connect qemu:///system --ram 1024 -n bareos -r 2048 --os-type=linux --os-variant=opensuse13.1 --disk path=/var/lib/libvirt/images/bareos_1.qcow2,device=disk,format=qcow2 --vcpus=2 --vnc --noautoconsole --import Starting install... Creating domain... | 0 B 00:00:02 Domain creation completed. You can restart your domain by running: virsh --connect qemu:///system start bareos [root]#