Duplicate/clone KVM machines, how to?

pcravero

New Member
Hi all, first post here.

I want to clone a KVM VM. I found the related HOWTO http://pve.proxmox.com/wiki/Duplicate_Virtual_Machines but I think something is missing.

The document explains how to overcome cloning issues, but it does not state how to actually clone the VM.

I feel the process is something like: shutdown VM, copy vmdk/qcow2 at filesystem level, and ... ? Then I am lost how to get it back into proxmox.

My VMs reside on a LVM over iSCSI group.

TIA,
Paolo
 
Hi all, first post here.

I want to clone a KVM VM. I found the related HOWTO http://pve.proxmox.com/wiki/Duplicate_Virtual_Machines but I think something is missing.

The document explains how to overcome cloning issues, but it does not state how to actually clone the VM.

I feel the process is something like: shutdown VM, copy vmdk/qcow2 at filesystem level, and ... ? Then I am lost how to get it back into proxmox.

My VMs reside on a LVM over iSCSI group.

TIA,
Paolo
Hi Paolo,
simple create an disk with the same (or greater) size in the new VM. Look with "lvdisplay" and you see the new disk (number of VM)
Now you can copy the existing raw-disk, like "dd if=/var/lib/vz/images/110/vm-110-disk-1.raw of=/dev/iscsi_vg/vm-500-disk-1 bs=1024k"
qcow2-images must converted first.

Udo
 
You could probably also restore a saved backup to a new VMID, and then solve duplication issues...
Marco

some of them, not all if you have Windows KVM (but it's not Proxmox problem, it's a Microsoft problem)