Skip to content

9. Neri's first house

A compute workshop.

Neri and LUMO watch a keeper kneel at the door of a small new stone house, joined to a path of stones and fine golden lines.

Everything is ready: the tile from the library, the small profile, the connector on Neri's road. LUMO hands the three to Rami at the workshop desk and signs the request with Maë's token. Rami checks the request, Sacha picks a workshop, Noor writes down the tools it will use, and in the chosen workshop the foreman starts the build.

A few minutes later a small house stands in the workshop, connected to Neri's road. Rami's board turns from building to active. Neri claps. LUMO keeps the lantern steady. "Active means the house is standing and powered. It doesn't tell us yet that your service inside is running. Let's look."

LUMO and a keeper look at a small brass panel where a grey light has turned green.

Neri opens the console of the house: the system inside is still starting. Two minutes later it is up.

LUMO stands before a glowing machine at the centre of four cards: a disk, a blank tile, a stack of layers and a network cable.

Important

Where the picture stops. ACTIVE does not guarantee that the guest operating system or the application works: it only says what Nova did. And whether the disk survives the deletion of the instance depends on how it booted: a disk created from the image on the host is deleted with the instance; a volume can outlive it.

What it is in OpenStack

An instance (or server) is a virtual machine created by Nova from:

  • an image (what the disk starts with) or a bootable volume,
  • a flavor (how much CPU, memory and disk),
  • one or more networks or ports (where it is connected),
  • optionally a key pair, security groups, user data, and more.

Nova authenticates the request, schedules it (scene 6), and asks nova-compute on the chosen host to create the virtual machine with the hypervisor, after Neutron has bound its port and Glance has provided the image. The instance goes through states such as BUILD, then ACTIVE, or ERROR if something failed.

From the village to OpenStack

sequenceDiagram
    participant N as Neri
    participant NA as Nova API
    participant SC as Scheduler + Placement
    participant NC as nova-compute (chosen host)
    participant GL as Glance
    participant NE as Neutron
    N->>NA: server create (image, flavor, network) + token
    NA-->>N: accepted: status BUILD
    NA->>SC: choose a host (through the conductor)
    SC-->>NC: build here
    NC->>GL: fetch the image
    NC->>NE: bind the port on this host
    NC->>NC: start the VM with the hypervisor
    Note over N,NC: status ACTIVE means the VM runs, the guest may still be booting

See it for real

openstack server create --image <IMAGE> --flavor <FLAVOR> --network <NET> <SERVER>
openstack server show <SERVER>
openstack console log show <SERVER>

server show gives the status and the fixed IP; the console log shows whether the guest has finished booting.

On a real host. With Kolla-Ansible's default local instance store, the root disk is a file on the compute, in the nova_compute Docker volume: /var/lib/docker/volumes/nova_compute/_data on the host. By default it is a qcow2 overlay on a base image that is cached there (the instances/_base directory), so the compute keeps one cached copy for the instances it builds from that image. Each instance has its own directory under instances/. When that file system is full, the instances that write are paused while Nova may still show ACTIVE. Read-only, as root on the compute: df -h /var/lib/docker/volumes/nova_compute/_data and du -xsh instances/* in that directory. With Ceph or a boot from volume, the disk is not there. To go further: Where instance disks live and Compute disk full.

The lantern: steady on the first house. It does not promise that the house will always be available.

Next: the house is on Neri's private road. How does anyone from outside reach it? 10. The bridge to the outside →

To remember

Lumo: if you keep only 3 things from this page, keep these.

  • An instance is created by Nova from an image (or a bootable volume), a flavor and one or more networks.
  • ACTIVE means Nova runs the VM; it does not prove that the guest system or the application works.
  • A disk created from the image on the host is deleted with the instance; a volume can outlive it.

What would you do?

Lumo: a situation you could meet on a real platform, and three ways to react. Pick the one you would choose: I will tell you what this page says about it. Nothing is recorded.

Deleting an instance to save space

Neri's instance booted from its image. Neri wants to delete it to free capacity and assumes the data on its root disk "will be kept somewhere".

What would you do?

See every choice explained
  • Best choice: Explain that a disk created from the image is deleted with the instance, and copy the data to a volume or an object store first.. Only data on a volume (or copied elsewhere) survives the deletion of an instance that booted from an image.
  • Works, but risky: Take a snapshot of the instance, then delete it.. A snapshot keeps an image of the disk, which can work, but nobody checked that the snapshot is complete or restorable before deleting.
  • Avoid: Delete it: OpenStack keeps the root disk anyway.. The local root disk is deleted with the instance.

Read the section.

Check yourself

Lumo: 2 quick questions to check the main ideas of this page. Choose an answer to see the explanation and the section that gives the evidence. Your score counts your first choices and stays in this browser only.

1. openstack server show says ACTIVE. Is Neri's service up?
Show the answer

Answer: Not necessarily: check the console log and the service itself. ACTIVE is Nova's view of the VM. The guest may still be booting, or the application may have failed. Read the section.

2. Which three things does server create need in the simplest case?
Show the answer

Answer: An image, a flavor and a network. Image (what it starts with), flavor (how much it gets) and a network (where it is connected); the rest is optional. Read the section.