[pve-devel] kvm disk template implementation ideas

Dietmar Maurer dietmar at proxmox.com
Thu Aug 23 09:11:56 CEST 2012

> 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

More information about the pve-devel mailing list