Recreating an instance from volumeΒΆ

Note

This assumes that you have booted your instance from a volume and not using local storage such as with the NVME flavors.

You can recreate an instance that is spawned from a volume by creating a snapshot on the volume, creating a new volume from that snapshot and then spawn a new instance from that volume.

Caution

Do not delete anything before first verifying that it works.

Note

The below instructions walkthrough how this is done when using OpenStack Horizon.

Note

The new instance will have a new IP address, you need to update any internal DNS or configuration where this address might be referenced.

  • Shutdown the instance, perferably by logging into the instance and doing a clean shutdown from the operating system.

  • Create a snapshot of the volume the instance is booted from (also called root volume).

  • Create a new volume from the snapshot.

  • Create a new instance from the new volume.

  • Detach any additional volumes from the original instance and attach them to the new instance, refer to the documentation here.

  • If you have a floating IP assigned to the original instance move it to the new instance.

    • Under Project, click Compute and then Instances in the sidebar menu.

    • In the dropdown menu next to the old instance, press the small arrow and select Disassociate floating IP.

    • Select the floating IP (if you have several, repeat these steps for all).

    • Do not check Release Floating IP as this will release the floating IP from your project.

    • Click Disassociate.

    • Add the floating IP(s) to the new instance by following the instructions here.

  • You are now ready to start your new instance.

Caution

When deleting the old instance, please first verify that it has no extra volumes attached (only the root volume).

  • When you have verified that it works you can proceed to delete the old instance.