[pve-devel] kvm disk template implementation ideas

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 23 10:24:44 CEST 2012


>>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)



>>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.

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?

I see 3 cases for snapshots:
- temporary snapshots for backup
- permanent snapshots for rollback in case of problem
- snapshot for base image

----- 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 09:11:56 
Objet: RE: [pve-devel] kvm disk template implementation ideas 

> Question : 
> Is it possible to hack vmtar to use pipe ? 
> for now, vmtar read a file or a block device. 
> But with "virtual" storage like sheepdog,rbd,libiscsi they is no access from 
> host. 

Yes, that should be easy. 

> sheepdog: 
> collie vdi read myimage | vmtar ... 
> for rbd, we can do 
> mkfifo temp.fifo 
> rbd : rbd export myimage temp.fifo && vmtar temp.fio 

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. 

> > - vm cloning, or disk cloning (but this is +- same thing that 
> > template, but implementation will be different) (maybe this point can 
> > be done in a second time) 
> 
> >>That is also backup/restore? 
> mmm, no, it's really different. you really clone a base image snapshot (not 
> copy), without doing any backup. 
> the base image snapshot is used as reference, and new image write only the 
> delta. 
> I think an easy way could be to implement a "qm clone vmidsource 
> snapshotname vmidtarget", this create a new vm from a base vm. (with a 
> nice gui, right-click->clone vm) It's really different, so maybe can we work on 
> this in second time, to avoid confusion. 

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. 

So before we think about such feature, we need to implement VM snapshot support. 
Already thought about that? 

- Dietmar 



-- 

-- 



	

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