I am stuck on this problem and need help. ESXi Free version 5 and qemu-kvm/libvirtd version 0.10. I will put the TL;DR first since it captures the problem fairly well.

TL;DR I have 2 VMs on a KVM server (qcow2 images sized 100 and 200GB), and need to have a clone taken every week to be launched if needed on a separate ESXi (free version) host. The KVM server is using SSD disks because speed is very important, and is out of disk space and resources which makes this problem a little harder. We need to keep all versions of these clones indefinitely. I have tape backup and a file server with a few 100 GB, but would like to have at least the last 2 month's of backups/clones handy at all times. The original VMs on the KVM server must always be running at their current state, they cannot be reverted to a previous snapshot on that server, if we need to access a previous state for any reason we must launch that week's clone on the ESXi server. I only have about 1 TB of storage on the ESXi host, and was hoping there is some solution involving delta disks to conserve space and prevent data duplication.

The long explanation

I have 2 servers running KVM, each with SSD drives and essentially no free space. Each of these KVM servers runs a critical VM using qcow2 as the disk format. The resources are already dedicated to the VM on each box, so there is really not much room to do anything else on these servers. One VM is 100GB (on disk size) and the other is 200GB.

I also have an ESXi 5.0 (free version) host with about 1TB of space and a lot of free resources to spare. The datastore is local storage RAID 5.

I need a solution which involves having a snapshot or clone of both VMs from the KVM servers taken about once a week, and can then be run on the ESXi server at the same time that the original is still running on the KVM box (I would manually change the hostname etc. to avoid conflicts on the network). Typically this would be a clone scenario, but I would run out of space very quickly doing that. I need to keep every week's backup indefinitely. I do have a fileserver with a few 100GBs of storage which gets backed up to tape at my disposal as well, but would like to have at least the last 2 month's VM snapshot/clones available if I need to spin one up.

Performance is crucial on the KVM servers, so a chain of snapshots is not a desirable solution, and it does not solve the problem because the original KVM VMs need to always be running at their current version. The clone on the ESXi host would be effectively where the snapshots would be applied.

This problem has been surprisingly hard for me to solve, so I was hoping to get some help.


OK, lets take this one step at a time:

  1. To move VMs between two different platforms, you need a V2V solution. virt-v2v is designed to pull VMs out of an ESXi environment and into a libvirt host, but not the other way around. Whether VMWare provide a v2v tool that supports kvm/libvirt, I do not know, but in any case, v2v adds complexity into the equation, and I'd start with #2
  2. Having two different virtualization platforms backing each other up by running clones of the same VMs, is not a very good idea, because every conversion is not just a VM clone, but also a v2v process, which requires for you to go into the VM and update it's configuration, much like you would have when moving a server setup between two very different hardware platforms. I would reinstall the ESXi host with KVM, to make things simpler.
  3. If you bring the two hosts to a common platform, it will be easy enough to take COW snapshots and store only those on the backup server, discarding the older snapshots using scripted qemu-img.
  • regarding point 3: If I am taking snapshots of server 1, I can only apply them to server 2 if the qcow2 file is identical, right? So I would then at least have to be rsync(ing) the backing qcow2 file every night to ensure snapshots will be usable on the second server. If the snapshot is removed from the original server, then when the source qcow2 file changes, the snapshots will be out of sync and unusable, won't they? That is what makes that solution difficult for me. – user160910 Sep 11 '13 at 8:43
  • yes, if you want a usable image, or rather a snapshot chain, they have to be identical on both hosts. – dyasny Sep 11 '13 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy