Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Delete a volume. This is a destructive action and all data associated with the volume is lost

    Code Block
     $ openstack volume delete <volume_name>

...


Images

While it is true that instances in the Rapid Access Cloud are intended to be ephemeral, it is still possible to capture the state of an instance at any moment and save it as an image that can in turn be provisioned in a similar fashion to deploying a new instance using openstack server create as outlined above. This permits the ability to back-up an instance for safe keeping or create a base image with required applications already installed if you want to rapidly deploy many instances with a similar role. Volume snapshots are point-in-time stateful ‘freeze’ of a volume, meaning the volume itself cannot be attached after a snapshot is taken. (see volumes above for creating new volumes from snapshots)

Before snapshotting your instance, make sure it is in a shut-off state.


  • Create an image of an existing instance: 

    Code Block
    $ openstack server image create --name <image_name> <instance_name>

     

  • Download an image to a local computer: 

    Code Block
     $ openstack image save --file <file_name> <image_name>

    Snapshot an existing volume, unattached to an instance: 

    Code Block
    $ openstack snapshot create --name <snapshot_name> <volume_name>

    Snapshot an existing volume, attached to an instance: 

    Code Block
    $ openstack snapshot create --name <snapshot_name> --force <volume_name>
    Note
    Note about volume snapshots: Notice the use of the --force switch when taking a snapshot of an attached volume; the snapshot will work and not fail, however if there are open files being actively written to the validity of the data being cloned cannot be guaranteed.