[pve-devel] RFC: vm cloning implementation proposal
Alexandre DERUMIER
aderumier at odiso.com
Thu Oct 4 16:21:37 CEST 2012
I'm reading the vmware vsphere cloning documentation,
they have 2 ways to create template:
1) transform vm as template. (just rename the vm as template, so original vm is no more displayed as vm)
2) copy the vm to template. (original vm is available)
seem more easy, they are no vm with clones, so we can delete them without any problem.
Also for sheepdog,rbd,nexenta, we could have
some kind of writable template which are vms, we can start/stop them, do the update, and make versionning with vm-snapshots
so we can clone them, and choose the version 1,2,3,.. from where we want to clone.
(another way to avoid versioning, could be clone a template from a template)
for nfs,dir: the template is readonly.
what do you think ?
----- Mail original -----
De: "Alexandre DERUMIER" <aderumier at odiso.com>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Jeudi 4 Octobre 2012 13:05:02
Objet: Re: [pve-devel] RFC: vm cloning implementation proposal
>>I want to delete the original, not the snapshot.
I don't see how it's possible,the snapshot by itself, it's just a referecence in a point of time.
if you have a simple schema like this
10GB DATAS
baseimage----->snap1
|
|-> clone1
snap1 don't have any datas, the datas are in baseimage.
>>So you simply can't remove the original VM - the user will get an error message?
yes indeed
>>But I have no real idea how to handle that. Maybe replace the reference in the original VM
>>with a clone? In other works, when we create a template, we make the original VM a clone
>>of the created template?
Yes,maybe this is more easy to maintain in proxmox
1) we keep the original vm
----------------------------
originalvm : baseimage----------->snaptemplate1-------------->snaptemplate2------------>snaptemplate3
| | |
| | |
|-> clone1 |->clone2 |->clone4
|
|-> clone3
2) we replace the reference
----------------------------
originalvm : baseimage----------->snaptemplate1
|
|
|-> originalvmcloned1---->snaptemplate2
| |
|-> clone1 |
|-> clone3 |-> originalvmcloned2------------>snaptemplate3
| |
|-> clone2 |
|-> originalvmcloned3
|
|->clone4
I see 1 case where it can be wrong, when we do "gold/cleaned base image"
originalvm------>snap1-----> install some scripts to cleanup specific config,licenses key,sysprep windows------>snaptemplate1
|
|->clone1
if we keep the originalvm, we can easily rollback to snap1, to do new update to originalvm
originalvm------>snap1-----> install some scripts to cleanup specific config, or sysprep windows------>snaptemplate1
| |
| |->clone1
|
|------>do updates--->snap2--->install some scripts to cleanup specific config, or sysprep windows------>snaptemplate2
If we replace the reference,
the clone of the original vm will be a "clean" config, maybe user will need to recreate hostname, or other config ....
with windows vm, need to register licenses key again.(and they are some limits in number of registration for the same key)
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre DERUMIER" <aderumier at odiso.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Jeudi 4 Octobre 2012 11:47:25
Objet: RE: [pve-devel] RFC: vm cloning implementation proposal
> >>why not (we have a snaphot)? - those drivers do not allow that?
>
> Not sure for sheepdog, but rbd,nexenta you can't delete a snapshot if clone
> exist on the snasphot.
I want to delete the original, not the snapshot.
>(or storage should have some method to copy
> baseimage datas in each clone)
>
>
> baseimage->snap1
> |
> |->clone of snap1-> you are here
>
> clones are like a writable snapshots, with only new datas inside them, so if
> you remove the baseimage, it'll break all clones.
So you simply can't remove the original VM - the user will get an error message?
But I have no real idea how to handle that. Maybe replace the reference in the original VM
with a clone? In other works, when we create a template, we make the original VM a clone
of the created template?
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list