This episode combines Glance and Nova: uploading Ubuntu and Cirros cloud images in QCOW2 format, understanding flavors as hardware templates, creating your first instance via the CLI, then mastering lifecycle operations start, stop, reboot, resize, rebuild, shelve, migrate, and snapshot.

Up to episode 3, you hadn't created anything "alive." Episode 4 changes that: you'll upload images, create flavors, and then give birth to your first instance — a real VM running on top of KVM. The two services at work here are Glance, the image provider, and Nova, the compute manager.
Episode 4 is split into two big parts: image management in Glance, and the instance lifecycle in Nova — from creation to advanced operations like resize, shelve, and snapshot.
Glance stores cloud images — OS images already configured for the cloud, including cloud-init support. The three most popular ones:
curl -LO https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.imgGlance supports several disk formats. The most recommended one is QCOW2 because it supports copy-on-write and compression — saving space. RAW is faster to access but wastes space. VMDK is used for migrations from VMware.
openstack image create \
--disk-format qcow2 \
--container-format bare \
--file jammy-server-cloudimg-amd64.img \
ubuntu-jammyThe openstack image create command above uploads the image in QCOW2 format with the bare container format. For a quick verification, you can also upload Cirros:
curl -LO https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
openstack image create --disk-format qcow2 --container-format bare \
--file cirros-0.6.2-x86_64-disk.img cirrosImages can carry properties that affect VM behavior. Common examples:
| Property | Function |
|---|---|
hw_firmware_type | Forces UEFI or BIOS firmware |
hw_scsi_model | Enables the SCSI disk model (e.g. virtio-scsi) |
min_disk / min_ram | Minimum resource limits |
openstack image set --property hw_scsi_model=virtio-scsi ubuntu-jammyA flavor is the VM hardware template: a combination of vCPU, RAM, and root disk. DevStack ships with m1.small, m1.medium, and m1.large.
openstack flavor listopenstack flavor list shows the name, RAM, vCPU, and disk of each flavor. If you need a custom flavor:
openstack flavor create --vcpus 2 --ram 4096 --disk 40 m2.mediumAn instance needs a network. DevStack already has a private (tenant) and a public (provider) network. Check them first:
openstack network listNow it's time to give birth to an instance:
openstack server create \
--image cirros \
--flavor m1.small \
--network private \
--key-name mykey \
cirros-pertamaopenstack server create requires an image, a flavor, and a network. The --key-name mykey argument injects an SSH keypair so you can log in without a password — details in episode 5.
openstack server show cirros-pertamaWait until the status is ACTIVE and the power_state column reads Running. Congratulations, you have your first VM from the cloud!
Nova manages the entire lifecycle of an instance:
openstack server stop cirros-pertama
openstack server start cirros-pertama
openstack server reboot cirros-pertama
openstack server delete cirros-pertamaopenstack server stop shuts down the instance OS gracefully, while reboot can take a --hard flag to force a reset without an OS shutdown.
Resize changes an instance's flavor — adding or reducing resources — outside of business hours without creating a new instance:
openstack server resize cirros-pertama --flavor m1.medium
openstack server resize confirm cirros-pertamaopenstack server resize --flavor m1.medium allocates new resources and then needs confirmation. Rebuild restores an instance to its original image — useful when the OS is corrupted — while preserving the instance's identity.
Shelve saves an instance's state to disk and releases its resources — saving capacity without deleting the instance:
openstack server shelve cirros-pertama
openstack server unshelve cirros-pertamaMigrate moves an instance to another host — for maintenance or load balancing. Snapshot creates an image from a running instance, letting you copy the VM to another flavor or project:
openstack server image create --name snapshot-ubuntu ubuntu-jammy-vmEpisode 4 is the moment core skills are born: uploading and managing images in Glance, understanding flavors, creating your first instance with openstack server create, and mastering the entire lifecycle from stop, reboot, resize, rebuild, shelve, and migrate to snapshot.
Key takeaways:
openstack server create needs an image, a flavor, and a network.ACTIVE before operating on an instance.In episode 5, we'll cover cloud-init, keypairs, and the metadata service — automating instance configuration at boot, creating SSH keypairs for secure access, sending custom user-data scripts, and understanding the metadata service and config drive. This is the key to managing instances without manual logins.