Skip to main content
IMHCloud Logo
Back to support home

Launching Your First Instance in OpenStack Horizon

Step-by-step guide to launching your first virtual machine instance in OpenStack Horizon, from selecting an image to connecting via SSH.

Introduction

Launching an instance creates a virtual machine (VM) in your OpenStack cloud environment. The Horizon dashboard provides a user-friendly wizard that guides you through selecting an operating system image, choosing instance size (flavor), configuring networking, and applying security settings.

This guide walks you through launching your first instance using the OpenStack Horizon dashboard and verifying successful deployment.

Prerequisites

Before launching an instance, you must configure several prerequisite components:

  • SSH key pair for secure access to the instance
  • Security group with firewall rules allowing SSH and ICMP traffic
  • Network with a subnet for instance connectivity

If you have not yet set up these prerequisites, refer to the Setting Up OpenStack Prerequisites for Launching Instances guide for detailed instructions. This guide assumes prerequisites are already configured.

Launching an Instance Using Horizon

The Horizon Launch Instance wizard guides you through all configuration options across multiple tabs.

Step 1: Access the Instances Dashboard

  1. Log in to your OpenStack Horizon dashboard
  2. Select your project from the dropdown menu in the top left corner
  3. Navigate to Project > Compute > Instances
  4. Click Launch Instance in the upper right corner


The Launch Instance dialog opens, displaying multiple configuration tabs on the left side.

Step 2: Configure Instance Details

On the Details tab, provide basic information about your instance:

  1. Instance Name: Enter a descriptive name (example: "web-server-01")
  2. Description: Optionally add a description for documentation purposes
  3. Availability Zone: Leave as "Any Availability Zone" unless you have specific zone requirements
  4. Count: Enter the number of instances to launch with this configuration (typically 1)

Click Next to proceed to the Source tab.

Step 3: Select an Image

On the Source tab, choose the operating system image for your instance:

  1. Select Boot Source: Choose Image from the dropdown
  2. Create New Volume: Select No to boot directly from the image, or Yes to create a persistent volume
  3. Volume Size: If creating a volume, specify size in GB (must be equal to or larger than the image size)
  4. Delete Volume on Instance Delete: Choose No to preserve data after instance deletion

In the Available section, browse the list of available images and click the up arrow next to your desired image to move it to the Allocated section.

Common image choices:

  • Ubuntu 22.04 LTS
  • CentOS Stream 9
  • Rocky Linux 9
  • Debian 12

Click Next to proceed to the Flavor tab.

Step 4: Choose Instance Flavor (Size)

On the Flavor tab, select the compute resources for your instance:

Flavors define the number of virtual CPUs (vCPUs), RAM, and root disk size. Review the available flavors and click the up arrow next to your desired flavor to allocate it.

Example flavors:

  • m1.tiny: 1 vCPU, 512 MB RAM, 1 GB disk (minimal testing)
  • m1.small: 1 vCPU, 2 GB RAM, 20 GB disk (light workloads)
  • m1.medium: 2 vCPUs, 4 GB RAM, 40 GB disk (moderate workloads)
  • m1.large: 4 vCPUs, 8 GB RAM, 80 GB disk (production workloads)

Choose a flavor appropriate for your workload. You can resize the instance later if needed.

Click Next to proceed to the Networks tab.

Step 5: Configure Networks

On the Networks tab, select the network to which your instance will connect:

In the Available section, click the up arrow next to your network to move it to the Allocated section. If you have multiple networks, you can attach the instance to more than one network by allocating multiple networks.

Typical configuration:

  • Allocate your private network (example: "private-network")
  • Optionally allocate a public network if direct external access is required

Click Next to proceed to the Network Ports tab (or skip it if not needed).

Step 6: Configure Security Groups

On the Security Groups tab, apply firewall rules to your instance:

By default, the default security group is allocated. If you created a custom security group with SSH and ICMP rules, allocate it instead:

  1. Click the down arrow next to "default" to remove it (if desired)
  2. Click the up arrow next to your custom security group (example: "web-server-sg") to allocate it

You can allocate multiple security groups to apply combined rules.

Click Next to proceed to the Key Pair tab.

Step 7: Configure Key Pair

On the Key Pair tab, select the SSH key pair for instance access:

Click the up arrow next to your key pair name to allocate it. If you have not created a key pair yet, you can create one directly from this tab:

  1. Click Create Key Pair
  2. Enter a name for the key pair
  3. Click Create Key Pair
  4. Save the downloaded private key file to a secure location
  5. Allocate the newly created key pair

Important: Without a key pair, you cannot access the instance via SSH.

Step 8: Review and Launch

After configuring all tabs, review your settings in the right sidebar. The sidebar displays a summary of your selected options:

  • Instance name
  • Image name
  • Flavor
  • Networks
  • Security groups
  • Key pair

Verify all settings are correct, then click Launch Instance at the bottom right of the dialog.

The instance creation process begins immediately.

Verifying Your Instance

After clicking Launch Instance, you return to the Instances page where your new instance appears.

Monitor Boot Process

Watch the Status and Power State columns:

  1. Status progresses from "Build" to "Active"
  2. Power State changes from "No State" to "Running"

This process typically takes 30 to 90 seconds, depending on the image size and cloud performance.

Check Instance IP Address

Once the instance reaches Active status, note the assigned IP address in the IP Address column. You will use this address to connect via SSH.

If your instance has multiple network interfaces, multiple IP addresses will be displayed.

Connecting to Your Instance

After the instance is running and has an IP address, connect via SSH using your private key.

Connect via SSH

Open a terminal on your local machine and connect using SSH:

1ssh -i ~/path/to/private-key.pem <username>@<instance-ip-address>

Common default usernames by OS:

  • Ubuntu: ubuntu
  • CentOS/Rocky Linux: centos or rocky
  • Debian: debian

Example:

1ssh -i ~/web-server-key.pem ubuntu@192.168.1.100

Verify Connectivity

If the connection succeeds, you will see a shell prompt inside your instance. Test basic connectivity:

1ping -c 4 8.8.8.8

If the ping succeeds, your instance has internet connectivity through the OpenStack network and router.

Using the OpenStack CLI (Alternative Method)

You can also launch instances using the OpenStack command-line interface for automation or scripting.

Prerequisites for CLI

Ensure the OpenStack CLI is installed and configured with your credentials.

Launch Instance via CLI

Use the openstack server create command with all required parameters:

1openstack server create \
2 --image <image-name-or-id> \
3 --flavor <flavor-name-or-id> \
4 --network <network-name-or-id> \
5 --security-group <security-group-name> \
6 --key-name <key-pair-name> \
7 <instance-name>

Example:

1openstack server create \
2 --image "Ubuntu 22.04 LTS" \
3 --flavor m1.small \
4 --network private-network \
5 --security-group web-server-sg \
6 --key-name web-server-key \
7 web-server-01

Verify CLI Launch

Check the instance status:

1openstack server show web-server-01

List all instances in your project:

1openstack server list

Retrieve Instance IP Address

Extract the instance IP address:

1openstack server show web-server-01 -c addresses

Or use:

1openstack server list --name web-server-01

Troubleshooting Common Issues

Instance Fails to Launch

Cause: Insufficient quota, invalid flavor, or missing image.

Solution: Check your project quotas:

1openstack quota show

Verify the flavor and image exist and are available in your project:

1openstack flavor list
2openstack image list

Cannot Connect via SSH

Cause: Security group rules not allowing SSH traffic, wrong username, or incorrect private key permissions.

Solution:

  1. Verify security group allows SSH (port 22):
1openstack security group show web-server-sg
  1. Ensure private key has correct permissions:
1chmod 600 ~/web-server-key.pem
  1. Try the correct default username for your image (ubuntu, centos, debian, etc.)
  2. Use verbose SSH output to diagnose connection issues:
1ssh -v -i ~/web-server-key.pem ubuntu@192.168.1.100

Instance Has No Network Connectivity

Cause: Network not connected to a router, router missing external gateway, or DHCP not enabled on subnet.

Solution: Verify network and router configuration:

1openstack network show private-network
2openstack router show my-router

Ensure the subnet has DHCP enabled and the router has an external gateway and interface to your private subnet.

Cannot Inject Key Pair

Cause: The selected image does not support cloud-init or key injection.

Solution: Use an image that includes cloud-init support. Most official cloud images (Ubuntu Cloud Images, CentOS Cloud Images, etc.) include cloud-init by default.

Alternatively, use the console to access the instance and manually configure SSH keys.

Related Resources

Related Articles

Read article

Setting Up OpenStack Prerequisites for Launching Instances

Learn how to create SSH key pairs, configure security groups, and set up networks before launching your first OpenStack instance.

Read article

Managing Running Instances: Start, Stop, and Reboot Operations

Learn how to safely start, stop, and reboot your cloud instances using Horizon and the OpenStack CLI. Master soft and hard reboots, understand best practices, and troubleshoot common issues.

Read article

Creating Instance Snapshots in OpenStack: Backup and Recovery

Learn how to create, manage, and restore instance snapshots in OpenStack for effective backup and disaster recovery.