My company needs to automate the creation of new VM's with our proprietary solution, for this we would like to ship the product either on a a standardized format (OVA seems to be the only "standard" out there) or to be able to convert from the same machine to various different Virtualization types.
Thus far this is made manually, meaning that if a client wants a HyperV VM we need to build it on a HyperV Server we have inhouse, VMWare on VMWare etc... Our goal is to have this automated.
Explaining better: The plan is to have a KVM server, provision the VM and after provisioning export it to an OVA Format, and possibly as as extra courtesy to our clients on their Hypervisor of choice.
I can convert the disks just fine with "qemu-img convert" however i cannot seem to convert the machine definition (XML) to to other formats as needed by other hypervisors.
I cannot find any appropriate tools for this, suggestions?
Note: we do not have access to the hypervisor where these will be installed so we need to export it as OVA/TAR etc...
Unfortunately OVA promises far more than it is able to deliver. At best it is a standard format for distributing disk images, but it does very little, if anything, to ensure that a disk image can be booted seamlessly on multiple hypervisors. Every hypervisor emulates a different set of virtual hardware, so guest OS will need different drivers installed for each hypervisor. Some operating systems like Linux are reasonably good are being able to boot with arbitrary hardware, autodetecting drivers to match what they find, but even then its easy to mess up are make it break. eg if your
/etc/fstab
lists "/" as being on/dev/vda1
disk (for QEMU's virtio-blk disk driver) that's not going to work when booted on VMWare with a SCSI disk that appears as/dev/sda1
. Windows is really hard to adapt to different harware as it likes to tightly bind specific drivers to each disk / NIC / etc.There's also problem that every hypervisor has its own preferred disk image format - VMWare prefers vmdk, QEMU likes raw or qcow2 ideally, VirtualBox has another, etc, etc. OVA does nothing to address any of these hard problems.
These kind of problems are why tools like virt-v2v (http://libguestfs.org/virt-v2v.1.html) exist which take a disk image for one hypervisor and re-configure the guest OS to work on a different hypervisor, changing disk format at the same time.
Even if you somehow build a disk image that you think works on all of them, you still need to put it through a full QA test cycle to ensure you've actually got it working correctly.
IMHO it is way easier to just build a dedicated disk image for each hypervisor.