[pve-devel] template considerations

Alexandre DERUMIER aderumier at odiso.com
Sun Jan 27 12:05:21 CET 2013


>>You have a normal VM. Then you select a disk, press 'create template' button. 
>>
>>We can then either: 
>>
>>a.) replace the disk with the base image (VM is now a template, 
>>because it contains read-only images) 
>>
>>or 
>>
>>b.) replace the disk with a clone of the base image (keeps VM working) 

I'm not sure for b) , I think I prefer a), it's more easy to understand.




>>Wouldn't it be convienient to see that in the config file too? 
Yes, sure.

>>> Currently I check only if clones exist when deleting a template. 
>>> Do we need to known if volume are clones for other thing? 

No, it is not needed. I just thought it is good to know? 

> With your proposal,how do you do if a base volume is also a clone of 
> another volume ? 

>>What problem do you see? 

Oh, you want only it in config file ? (not in directory structure, or volume name)

base volume clone of another base volume : local:base/test.raw/base/test2.raw
local volume clone of a base volume : local:base/test.raw/100/vm-100-disk1.raw

I think it should be ok. But we can also simply use a hint,like for size, parent=base/test.raw (files) or parent=base-test (sheepdog,rbd,..)
 

----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Dimanche 27 Janvier 2013 11:29:03 
Objet: RE: template considerations 

> >>Maybe it is also convenient to allow to transform a single disk to a 
> >>template on the GUI. The disks gets simple replaced by a clone in the 
> >>VM config. 
> 
> I don't understand , can you provide an example ? 

You have a normal VM. Then you select a disk, press 'create template' button. 

We can then either: 

a.) replace the disk with the base image (VM is now a template, 
because it contains read-only images) 

or 

b.) replace the disk with a clone of the base image (keeps VM working) 


We can allow to do that per 'disk', or/and for the whole VM (all disks). 

> >>Another thing I am thinking about is how we can mark cloned disks. I 
> >>would be convenient to use some other naming so that we can see if a 
> >>volume is cloned or not. For example: 
> >> 
> >> 
> >>normal volume: local:100/vm-100-disk1.raw base volume: 
> >>local:base/test.raw cloned volume: 
> >>local:base/test.raw/100/vm-100-disk1.raw 
> 
> I don't know, currently we can see if it's a clone with browsing volumes. 
> (qemu-img info for files, rbd/sheepdog/nexenta with listing commands). 

Wouldn't it be convienient to see that in the config file too? 

> Currently I check only if clones exist when deleting a template. 
> Do we need to known if volume are clones for other thing? 

No, it is not needed. I just thought it is good to know? 

> With your proposal,how do you do if a base volume is also a clone of 
> another volume ? 

What problem do you see? 



More information about the pve-devel mailing list