KVM virt-clone while the VM is running

Is it possible to clone a running kvm machine without tools like virt-clone?

They already have the original vm in production, I cannot shut it down. If I don't care about temporary data corruption (what an initial fsck can fix) on the clone, can I just cp the qcow image file to a new name, create a new vm definition which uses that disk and start the machine up?


Solution 1:

If you don't care about in-memory data, you can snapshot the backing device and take a copy of that snapshot.

This of course require a storage pool with snapshot support (mostly LVM or ZFS, as BTRFS is abysmal slow for virtual machines storage).