Cloning an Instance
To clone an instance, create a snapshot of the instance. A machine image is created. Add this new machine image to an image list, and then use it to create a new instance.
| Task | REST API Call |
|---|---|
| 1. Create a snapshot request, which in turn creates a machine image to preserve all the changes made in the instance since launch. Note down the multi-part name of the snapshot request and the three-part name of the machine image. This information will be required in the next steps. | add snapshot |
| 2. Check the progress of the asynchronous snapshot request. | get snapshot |
3. After the state of the snapshot request changes from active to complete, verify that a machine image has been created.
|
get machineimage |
| 3. Create an image list. | image-list add |
| 4. Add the image that was created by the snapshot as an entry in the image list that you just created. | image-list-entry add |
| 5. (Optional) Create a boot disk using the image that you added. | storage-volume add (with the bootable parameter set to True)
|
| 6. (Optional) If you created a boot disk using the image, then check whether the boot disk is created. | storage-volume get After the volume is created, the |
You can now create instances by using this image. See Creating Instances Using an Orchestration.
See Also:
The following topics in Using Oracle Cloud Infrastructure Compute Classic: