I have three KVM servers each with 1 guest VM, running directly on it's local storage, (so they are essentially getting a dedicated box worth of computing power each). In the event of a host failure I would like the guests replicated to at least one of the other hosts so I can spin it up there, until the failing host is fixed.

I am curious about KVM cloning. I can clone a VM live or when it's suspended/shutdown. Obivously suspended VMs will naturally be quicker to clone but these three VMs comprise three parts of a single solution, so I don't want to ever have any one of them shutdown.

How can I efficiently clone these VMs between servers?

I have had a couple of ideas, but are these insane or, is there a better method I have missed for my scenario?

  1. Set up a DRDB partition between box 1 and 2 where VM 1 runs from, and so is replicated between box1 and box 2, repeat between box 2 & 3, and box 3 & 1 (This could be insane, I have never used DRDB only read about it)

  2. Just use standard KVM CLI clone options to perform live clones (I'm dubious about this because I don't know how long it will take and what the performance impact will be during)

  3. Run a copy of each VM on at least one other host, and have the guest on one host export it's data to the matching guest on another host where it can import that data, scripting this on the guest)

  4. Some of other way? Ideas welcome!

Side Note

These servers have 4x15k SAS drives in a RAID 10 so they aren't rocketing fast, and as I mentioned, each VM runs from the host's local storage, no NAS or SAN etc. So that is why I am asking this question about guest replication. Also, this isn't about disaster recovery. Guests will be exporting their data to a NAS over a VPN, so I am looking at how I can have them quickly spun up in a host failure situation.

  • When you say "host failure", what are you expecting? – ewwhite Aug 21 '12 at 20:15
  • 1
    Ganeti is a tool designed to facility the easy setup of DRBD and migration between hosts and supports KVM. It is shared-nothing, and so it doesn't require a SAN. It even supports live-migrations. – Zoredache Aug 21 '12 at 20:22
  • @Zoredache Can you post this suggestion as an answer please? I am now using Ganeti and would like to mark that as correct? – jwbensley Sep 7 '12 at 11:31

I wouldn't mess around with local storage, and set up a cluster with shared instead. oVirt and RHEV provide VM HA and load balancing out of the box, all you need is to set the VMs up, and if ahost goes down, the VMs that went down with it will automatically be started on another host.

For storage you can get a proper SAN, but if the budget is tight a RHEL box exporting iSCSI or NFS will do.

This iSCSI or NFS backend can easily be replicated, backed up and generally kept safe

  • I was looking for answer that don't require SAN/NAS storage, but valid input so thanks – jwbensley Sep 7 '12 at 11:33

@Zoredache Isn't responding, but ended up using Ganeti and have fallen in love with it;


I can't recommend this enough to people who want to use KVM as a cluster hypervisor with seamless replication and migration.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.