Detach virtual machine from virtual machine template
Abstract
Mechanisms for detaching a thin-provisioned virtual machine (VM) from a VM template are disclosed. A request to detach a thin-provisioned VM from a VM template is received. The thin-provisioned VM is linked to the VM template and has at least one delta volume that is linked to a volume of the VM template. For each delta volume of the thin-provisioned VM, a corresponding merged volume is caused to be generated that is not linked to the VM template and that comprises contents of the delta volume and contents of the volume of the VM template to which the delta volume is linked. VM configuration data is altered to indicate that the thin-provisioned VM is an independent VM that is no longer linked to the VM template.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method comprising:
receiving a request to convert an existing thin-provisioned virtual machine (VM) to an independent VM, the thin-provisioned VM being linked to a VM template and having at least one delta volume that is linked to a volume of the VM template;
causing, for each delta volume of the thin-provisioned VM, a corresponding merged volume to be generated that is not linked to the VM template and that comprises contents of the delta volume and contents of the volume of the VM template to which the delta volume is linked;
altering VM configuration data to indicate that the thin-provisioned VM is an independent VM that is no longer linked to the VM template;
receiving a request to re-attach the independent VM to the VM template; and
for each corresponding merged volume:
generating a new delta volume;
analyzing the merged volume and the corresponding volume of the VM template to identify differences in data stored in the merged volume and data stored in the corresponding volume of the VM template;
storing the differences in the data stored in the merged volume and the data stored in the corresponding volume of the VM template in the new delta volume; and
storing data that identifies the new delta volume as being linked to the corresponding volume of the VM template.
2. The method of claim 1 further comprising altering volume configuration data for each delta volume to direct subsequent read operations and subsequent write operations directed to the delta volume to be directed to the corresponding merged volume.
3. The method of claim 1 further comprising removing each delta volume.
4. The method of claim 1 further comprising:
determining that at least one snapshot volume of the at least one delta volume exists; and
modifying volume configuration data to identify the at least one snapshot volume as being a snapshot volume of the merged volume that corresponds to the at least one delta volume.
5. The method of claim 4 further comprising:
determining that a plurality of snapshot volumes of the at least one delta volume exists; and
determining that the at least one snapshot volume is a first-generated snapshot volume of the plurality of snapshot volumes.
6. The method of claim 1 wherein causing, for each delta volume of the thin-provisioned VM, the corresponding merged volume to be generated further comprises:
issuing, for each delta volume of the thin-provisioned VM, a command to a storage subsystem to merge the contents of the delta volume and the contents of the volume of the VM template to which the delta volume is linked into the corresponding merged volume.
7. The method of claim 1 further comprising:
altering the VM configuration data to indicate that the independent VM is a thin-provisioned VM that is linked to the VM template.
8. A computing device comprising:
a memory;
a processor device coupled to the memory to:
receive a request to detach a thin-provisioned virtual machine (VM) from a VM template, the thin-provisioned VM being linked to the VM template and having at least one delta volume that is linked to a volume of the VM template;
cause, for each delta volume of the thin-provisioned VM, a corresponding merged volume to be generated that is not linked to the VM template and that comprises contents of the delta volume and contents of the volume of the VM template to which the delta volume is linked;
alter VM configuration data to indicate that the thin-provisioned VM is an independent VM that is no longer linked to the VM template;
receive a request to re-attach the independent VM to the VM template; and
for each corresponding merged volume:
generate a new delta volume;
analyze the merged volume and the corresponding volume of the VM template to identify differences in data stored in the merged volume and data stored in the corresponding volume of the VM template;
store the differences in the data stored in the merged volume and the data stored in the corresponding volume of the VM template in the new delta volume; and
store data that identifies the new delta volume as being linked to the corresponding volume of the VM template.
9. The computing device of claim 8 wherein the processor device is further to alter volume configuration data for each delta volume to direct subsequent read operations and subsequent write operations directed to the delta volume to be directed to the corresponding merged volume.
10. The computing device of claim 8 wherein the processor device is further to:
determine that at least one snapshot volume of the at least one delta volume exists; and
modify volume configuration data to identify the at least one snapshot volume as being a snapshot volume of the merged volume that corresponds to the at least one delta volume.
11. The computing device of claim 10 wherein the processor device is further to:
determine that a plurality of snapshot volumes of the at least one delta volume exists; and
determine that the at least one snapshot volume is a first-generated snapshot volume of the plurality of snapshot volumes.
12. The computing device of claim 8 wherein to cause, for each delta volume of the thin-provisioned VM, the corresponding merged volume to be generated, the processor device is further to:
issue, for each delta volume of the thin-provisioned VM, a command to a storage subsystem to merge the contents of the delta volume and the contents of the volume of the VM template to which the delta volume is linked into the corresponding merged volume.
13. The computing device of claim 1 wherein the processor device is further to:
alter the VM configuration data to indicate that the independent VM is a thin-provisioned VM that is linked to the VM template.
14. A computer program product stored on a non-transitory computer-readable storage medium and including instructions to cause a processor device to:
receive a request to detach a thin-provisioned virtual machine (VM) from a VM template, the thin-provisioned VM being linked to the VM template and having at least one delta volume that is linked to a volume of the VM template;
cause, for each delta volume of the thin-provisioned VM, a corresponding merged volume to be generated that is not Linked to the VM template and that comprises contents of the delta volume and contents of the volume of the VM template to which the delta volume is linked;
alter VM configuration data to indicate that the thin-provisioned VM is an independent VM that is no longer linked to the VM template;
receive a request to re-attach the independent VM to the VM template; and
for each corresponding merged volume:
generate a new delta volume;
analyze the merged volume and the corresponding volume of the VM template to identify differences in data stored in the merged volume and data stored in the corresponding volume of the VM template;
store the differences in the data stored in the merged volume and the data stored in the corresponding volume of the VM template in the new delta volume; and
store data that identifies the new delta volume as being linked to the corresponding volume of the VM template.
15. The computer program product of claim 14 wherein the instructions further cause the processor device to alter volume configuration data for each delta volume to direct subsequent read operations and subsequent write operations directed to the delta volume to be directed to the corresponding merged volume.
16. The computer program product of claim 14 wherein the instructions further cause the processor device to:
determine that at least one snapshot volume of the at least one delta volume exists; and
modify volume configuration data to identify the at least one snapshot volume as being a snapshot volume of the merged volume that corresponds to the at least one delta volume.
17. The computer program product of claim 16 wherein the instructions further cause the processor device to:
determine that a plurality of snapshot volumes of the at least one delta volume exists; and
determine that the at least one snapshot volume is a first-generated snapshot volume of the plurality of snapshot volumes.
18. The computer program product of claim 14 wherein to cause, for each delta volume of the thin-provisioned VM, the corresponding merged volume to be generated, the instructions further cause the processor device to:
issue, for each delta volume of the thin-provisioned VM, a command to a storage subsystem to merge the contents of the delta volume and the contents of the volume of the VM template to which the delta volume is linked into the corresponding merged volume.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.