KVM Virtual Machine Live cloning : clone on COW LVM volume.

We used many times the nice ability to clone a VM "live", without the necessity to shut it down.

Previously, it was always in order to move the clone on another KVM host.

To day, we had to clone a VM, but with the project to leave it on the same KVM host. The problem is that in this case, the VM remains on a snapshot, Copy On Write, LVM Volume.

Afaik, there's no possibility to convert a snapshot LVM Volume to a linear Volume without getting it copied, so we had to shutdown the clone, and re-clone it, to finaly have a clone on a linear LVM Volume.

Is it intended like this ?

Would it be possible, when "live cloning" a VM, to choose either to leave the clone on a snapshot, or to get the snapshot copied on a linear volume before being deleted (like Cloudmin does for "live" VM backups) ?

Thanks in advance.



Unfortunately, there is no way to create a quick copy of an LV that isn't a snapshot. The alternative in Cloudmin is to shut down the VM first and then make a clone, which is slower but creates a completely separate copy.

Did you run into any problems with running a VM on a copy-on-write snapshot? Since it is given the same size as the original, it should work fine ..

Yes, I know there's no way to create a quick copy without using a snapshot. What I mean, is that we could choose to clone VM like Cloudmin does with backups : first snapshot (so we can leave the original VM live), then copy (so we have a linear volume), and finaly delete the snapshot. So we're not obliged to leave the clone on a cow volume.

Oh, I see .. yeah, that makes sense. It would be no faster than shutting down the VM (at least for the disk copy part), but would avoid the downtime. I'll add this to my todo list ..