Versions Compared

Key

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

...

  • Images uploaded to the Image service.
  • Image that you have copied to a persistent volume. The instance launches from the volume, which is provided by the cinder-volume API through iSCSI.
  • Instance snapshot that you took.

Launch an instance

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click Instances category.
    The dashboard shows the instances with its name, its private and floating IP addresses, size, status, task, power state, and so on.
  4. Click Launch Instance.
  5. In the Launch Instance dialog box (fig), specify the following values:

...

Lunch Istance (Details tab)Source tab

Instance In the drop down menu Select Boot Source Your your options are:

  • Boot from imageImage: If you choose  using this option, a new field for Image Name displays. You you can select the image from the listYou can also choose to use persistent storage by creating a new volume.
  • Boot from snapshot: If you choose Instance Snapshot: using this option, a new field for Instance Snapshot displays. You you can select the snapshot from the listYou can also choose to use persistent storage by creating a new volume.
  • Boot from volumeVolume: If you choose  using this option, a new field for Volume displays. You you can select the volume from the listIt does not create a new volume.
  • Boot from image (creates a new volume): With Volume Snapshot: using this option, you can boot from an image and create a volume by entering the Device Size and Device Name for your volume. Click the Delete Volume on Instance Delete option to delete the volume on deleting the instance.Boot from volume snapshot (creates a new volume): Using this option, you can boot from a volume snapshot and create a new volume by choosing Volume Snapshot from a list and adding a Device Name for your volume. select Volume Snapshot from the list. It creates a new volume to persist instance data.

Click the Delete Volume on Instance Delete option to delete the volume on deleting the instance.

...

Image Name: This field changes based on your previous selection. If you have chosen to launch an instance using an image, the Image Name field displays. Select the image name from the dropdown list.

Instance Snapshot: This field changes based on your previous selection. If you have chosen to launch an instance using a snapshot, the Instance Snapshot field displays. Select the snapshot name from the dropdown list.

...

 This option is allowed when the volume is created by default or by your choice (i.e. if the Create New Volume option is set to yes).

Launch Instance (Source tab)

...

Note: The flavor is selected based on the size of the image selected for launching an instance. For example, while creating an image, if you have entered the value in the Minimum RAM (MB) field as 2048, then on selecting the image, the default flavor is m1.small.

Networks tab

Selected Networks:  To To add a network to the instance, click the + in the Availablethe ↑ in the Available field.

Network Ports tab

Ports: Activate the ports that you want to assign to the instance.

...

Customization Script Source: Specify a customization script that runs after your instance launches. Here you can find an example of cloud config.

Metadata tab

Available Metadata: Add Metadata items to your instance.

...

Click Launch Instance. The instance starts on a compute node in the cloud.

...

the cloud

...

.

 Connect to your instance by using SSH

To use SSH to connect to your instance, use the downloaded Key Pair file..

  1. Activate the VPN if you are outside the CNAF offices.
  2. Take note of the location of your private key, or go to the folder where it is located.
  3. Remember the FloatingIP Copy the IP address for your instance.
  4. Use the SSH command to make a secure connection to the instance. For example:

    Code Block
    languagebash
    themeConfluence
    titleConnect to istance
    $ ssh -i myKeyPair.key<key_path>/<key_name> -l cirros<operating_system_users> <FloatingIP>


  5. At the prompt, type yes.

Connect to istanceIt is also possible to SSH into an instance without an SSH Key Pair, if the administrator has enabled root password injection. For more information about root password injection, see Injecting the administrator password in the OpenStack Administrator official Guide.

Track usage for instances

You can track usage for instances for each project. You can track costs per month by showing meters like number of vCPUs, disks, RAM, and uptime for all your instances.

Manage an instance

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tabthe Project tab, open the Compute tab and click OverviewInstances category.
  4. To query the instance usage for a month, select a month and click Submit (at the bottom of the page).
  5. To download a summary, click Download CSV Summary.

...

  1. By clicking the menu list of an instance, you can perform various actions:
    1. You can resize or rebuild an instance.
    2. You can also choose to view the instance console log, edit instance or the security groups.
    3. Depending on the current state of the instance, you can pause, resume, suspend, soft or hard reboot, or terminate it.

Let's see some examples.

Create an instance snapshot

A snapshot of a Virtual Machine is an image which preserves the disk state of that running instance. Snapshots can be used e.g. to backup your instances, or to migrate your instances to another cloud.

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click the Instances category.
  4. Select the instance from which to create a snapshot.
  5. In the actions column, click Create Snapshot.
  6. In the Create Snapshot dialog box, enter a name for the snapshot, and click Create Snapshot.

The Images category shows the instance snapshot. To launch an instance from the snapshot, select the snapshot and click Launch. Proceed with launching an instance.

Manage an instance

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click Instances category.
  4. Select an instance.
  5. In the menu list in the actions column, select the state.

...

Stopping and Starting Instance

Pause Instance/Unpause Instance allows for temporary suspension of the VM. The VM is kept in memory but it is not allocated any CPU time.
Suspend Instance/Resume Instance stores the VM onto disk and recovers it later. This is faster than stop/start and the VM returns to the status is was when the suspend was performed as opposed to a new boot cycle.

Info
titleWarning

The cleanest way to shutdown (or reboot) an instance is however to log on the VM and issue from the shell the shutdown or reboot command. In fact if the Soft Reboot Instance or Hard Reboot Instance or Shut Off Instance actions are chosen, there could be problems with networking when the VM is later restarted.

Resizing Instance

If the size of a virtual machine needs to be changed, such as adding more memory or cores, this can be done using the resize operation. Using resize, you can select a new flavor for your virtual machine. The operation will reboot the virtual machine and might take several minutes of downtime, so this operation should be planned as it will lead to application downtime.

To resize an instance:

  • Detach any attached volume as described in the next chapter.
  • Select the Compute tab menu and then Resize Instance option on the actions column.
  • In the Resize Instance box (fig) select the desired flavor.
  • Click Resize.
  • After the new flavor has been selected, the status will become resize or migrating.
  • The status will change after several minutes to Confirm or Revert Resize/Migrate. You may need to refresh the web browser page to reflect the new status.
  • Select Confirm Resize/Migrate if you wish to change the instance to the new configuration.

Resize InstanceImage Added

The status will then change to Active once completed.

Track usage for instances

You can track usage for instances for each project. You can track costs per month by showing meters like number of vCPUs, disks, RAM, and uptime for all your instances.

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click Overview category.
  4. To query the instance usage for a month, select a month and click Submit (at the bottom of the page).
  5. To download a summary, click Download CSV Summary.