[pve-devel] kvm disk template implementation ideas

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 23 08:46:43 CEST 2012


Hi,

I have thinked about it and read about the vzdump code.


> >>- create/export template
> yes, user can create an base vm (linux/windows), export it in template
> storage, then when creating new,vm he can choose the template

>>>that is backup/restore?

Yes, indeed, this is more like like backup/restore.
We need full disk image backup/restore.



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.

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

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


Maybe migrate is easier to start with: 
https://git.proxmox.com/?p=pve-storage.git;a=blob;f=PVE/Storage.pm;h=4afdf15e6106a43dd8164fe4290a27f51a9e79c5;hb=HEAD#l278 
Can we implement that using import/export (for all storage types)? 

I think it can be possible with piping

dd if=localfile | ssh target_address dd of=remotefile
works with file (maybe scp is better for this), block devices
it should work with rbd, sheepdog too.
and we can use |pv| to see progression.


I don't know if we want a generic export,import method for all the case (vzdump, local and remote).
The only way for this is pipping.   
sourcestorage::export | targetstorage::import


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

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mercredi 22 Août 2012 17:33:46 
Objet: RE: [pve-devel] kvm disk template implementation ideas 



> -----Original Message----- 
> From: Alexandre DERUMIER [mailto:aderumier at odiso.com] 
> Sent: Mittwoch, 22. August 2012 17:11 
> To: Dietmar Maurer 
> Cc: pve-devel at pve.proxmox.com 
> Subject: Re: [pve-devel] kvm disk template implementation ideas 
> 
> >>If we implement import/export function, we want to use them also for 
> >>migrate and vzdump and restore. 
> Ok, I understand. 
> I'll take time to read the vzdump code to see how it's works. 

Maybe migrate is easier to start with: 

https://git.proxmox.com/?p=pve-storage.git;a=blob;f=PVE/Storage.pm;h=4afdf15e6106a43dd8164fe4290a27f51a9e79c5;hb=HEAD#l278 

Can we implement that using import/export (for all storage types)? 



-- 

-- 



	

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