[pve-devel] news template - copy -clone patchs send - some details !

Alexandre DERUMIER aderumier at odiso.com
Tue Jan 29 17:28:13 CET 2013


Hi,

I have send the news patches.
I have try to keep the commits as small as posssible for comments.

Templates
---------
So, now, when we create a template, 
  we rename disks from vm-vmid-disk-X to base-vmid-disk-X
  we create a snapshot @base if storage need snapshot for cloning a template
  we protect the volume


The sub is_template detect if vm config have base-xxx disks.
 return 1 if all disks are base disks
 return 2 if not all disks are base disks. (to avoid to clone theses "semi" template)

template create qm command:

qm template <vmid> [-disk virtio0]

default is to convert all disk, we can force a specific disk

A template cannot be started, we cannot take snapshot on template,...


Copy and Clone (Copy == full copy , clone == linked clone from a parent)
------------------------------------------------------------------------
a)Template
   We can clone a template to a VM
   We can copy a template to a VM


b)VM (offline or online)
  
  We can copy a vm to a vm from current
  We can copy a vm to a vm from a live snapshot

  We can clone a vm to a vm from a live snapshot.(not qcow2, only rbd,sheepdog,nexenta).
  (This feature is usefull to make a live clone from a VM, to do tests,updates,...without breaking it with template conversion)
   

qm command:
----------

linked clone (works on template without snapname, works on vm with snapname only)
---------------------------------------------------------------------------------
qm create vmid --clonefrom vmidsrc [--snapname snap] [--clonemode clone]

copy clone : dest storage = source storage 
------------------------------------------
qm create vmid --clonefrom vmidsrc [--snapname snap] --clonemode copy

copy clone : dest storage != source storage
------------------------------------------
qm create vmid --clonefrom vmidsrc [--snapname snap] --clonemode copy --virtio0 storeid:[fmt]   (--virtio0 local:raw --virtio1 rbdstorage: --virtio2:nfsstorage:qcow2)




More information about the pve-devel mailing list