Skip to content

Compute

Compute services provide virtual machines (instances) that run your workloads on shared physical infrastructure. Each VM is defined by a Flavor (vCPU, RAM, disk) and boots from an Image (operating system template).

What is a Virtual Machine?

A virtual machine (VM) is a guest operating system running on the cloud infrastructure. It is created from an image and a flavor inside a project. The VM runs on a physical hypervisor host and is isolated from other tenants.

OpenStack offers two boot modes:

  • Ephemeral boot — the VM boots directly from the flavor's integrated root disk. The disk exists only for the life of the instance and is deleted when the instance is deleted.
  • Volume boot — the VM boots from a persistent volume created from an image. The volume survives instance deletion, can be resized, and can be reattached to a new instance.

Tip

Volume boot (Zero-Disk flavors) is recommended for most workloads. It provides flexibility for resizing, snapshots, and backups.

In This Section

  • Images — available images, boot source options, creating images from snapshots, custom images.
  • SSH Key Pairs — create or import SSH keys for VM access.
  • Launch Instance — step-by-step Horizon wizard for deploying a VM.
  • Floating IP — assign a public IP to make a VM reachable from the internet.
  • Server Groups — affinity and anti-affinity policies for VM placement.
  • CLI Deployment — deploy a complete VM (network + instance + floating IP) from the command line.

Quick Examples

A VM can be deployed using the OpenStack CLI (OSC), Ansible, or Terraform. For a full walkthrough, see CLI Deployment.

Prerequisites: The CLI tool must be installed and configured (see Tools), and you need Application Credentials (cloud.yaml).

OpenStack CLI

openstack server create vm-u2404-az2 \
   --image "Ubuntu 24.04" \
   --flavor g1.2c4m \
   --key-name foo-key \
   --network foo-net \
   --security-group default \
   --availability-zone ch-zh1-az2

Ansible

- os_server:
    name: "foo-u2404-az2"
    image: "Ubuntu 24.04"
    key_name: "foo-key"
    flavor: "g1.2c4m"
    network: "foo-net"
    security_groups: "default"
    availability_zone: "ch-zh1-az2"

Terraform

resource "openstack_compute_instance_v2" "instance_1" {
   name = "vm-u2404-az2"
   image_name = "Ubuntu 24.04"
   flavor_name = "g1.2c4m"
   key_pair = "foo-key"
   security_groups = ["default"]
   availability_zone = "ch-zh1-az2"

   network {
      name = "foo-net"
   }
}

For Volume deployment examples, see Storage — Volume Operations.