[pve-devel] kvm disk template implementation ideas

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 23 11:14:34 CEST 2012


>>We can add special case optimization when needed. Should not be a problem. 
I'm reading the storage_migrate sub, seem to be a good start



>>A simply storage scan does not work, because we also want a snapshot of 
>>the VM configuration! 
Ah ok, I miss that. I think you were talking about simple disk snapshot.


>>My idea was to extend the <vmid>.conf file to include a copy of the config 
>>for each snapshot: 

>>----START---- 
>># The current config is on top 
>>mem: 1024 
>>parent: snap2 
>>
>>[snap3] 
>>mem: 512 
>>parent: snap1 
>>
>>[snap2] 
>>mem:128 
>>parent: snap1 
>>
>>[snap1] 
>>mem: 256 

Yes, that can be great. 
how do you see disk part ?



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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 23 Août 2012 10:54:12 
Objet: RE: [pve-devel] kvm disk template implementation ideas 

> >>maybe it is enough if we can get the import/export command for a 
> storage: 
> >> 
> >>sub export_command { 
> >>my $volid = shift; 
> >> 
> >>return ['dd', 'if=$volid", 'of=-']; 
> >>} 
> 
> >>What do you think? With that you can create command pipes. 
> 
> Yes, I think it's good idea. 
> But do you need to use that for by example a export/import between 2 local 
> dir ? (cp is more simple in this case) 

We can add special case optimization when needed. Should not be a problem. 

> >>Well, I do not want to support such kind of clone now (base image) - 
> >>that creates too many problems for me. 
> >> 
> >>There are 'internal' and 'external' snapshots. External snapshots 
> >>(base image) are problematic because you need to track that external 
> >>file. I can see many problems regarding VM snapshots with that. 
> 
> I don't know for other storage, but nexenta by example, can't delete the base 
> image if clones exists. 
> 
> >>So before we think about such feature, we need to implement VM 
> snapshot support. 
> >>Already thought about that? 
> 
> implement snapshot function by itself it's easy for some 
> storage(sheepdog,nexenta,rbd soon). 
> I can't tell for lvm. 

Easy is maybe the wrong term ;-) Our VMs use several disks, and each disk can have 
other storage type, and some storage types only support snapshots indirectly with 
the help of lvm. Some storage types supports different kind of snapshots (internal or external) 
... 

> Do we need to register in the vm config files the snapshots list ? Or 
> implement a snapshot listing sub which scan the storage and display the 
> snapshots for disk? 

A simply storage scan does not work, because we also want a snapshot of 
the VM configuration! 

My idea was to extend the <vmid>.conf file to include a copy of the config 
for each snapshot: 

----START---- 
# The current config is on top 
mem: 1024 
parent: snap2 

[snap3] 
mem: 512 
parent: snap1 

[snap2] 
mem:128 
parent: snap1 

[snap1] 
mem: 256 
----END---- 




-- 

-- 



	

Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 


Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 


45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 



More information about the pve-devel mailing list