Modules · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
First commands
source admin-openrc.sh (or export OS_CLOUD=mycloud) | Load credentials (openrc file or clouds.yaml) |
openstack token issue | Can I authenticate? |
openstack catalog list | Services and their endpoints |
openstack compute service list | Nova services and their state per host |
openstack network agent list | Neutron agents per host (OVS-based deployments) |
Launch a VM
openstack server create --flavor m1.small --image ubuntu-24.04 --network private --key-name mykey vm1 | Create an instance |
openstack server show vm1 -c status -c addresses -c fault | Status, IPs, and the error if it failed |
Tenancy
openstack domain create acme | A domain (a namespace for projects and users) |
openstack project create --domain acme shop-prod | A project (tenant) |
openstack role add --project shop-prod --group shop-devs member | Grant a role to a group on a project |
openstack role assignment list --project shop-prod --names | Who has what on a project |
Credentials
openstack application credential create ci-deployer --role member | A credential for automation, scoped to the current project |
export OS_CLOUD=shop-prod | Use a named cloud from clouds.yaml |
openstack token issue -f value -c expires | Token expiry |
Flavors & hosts
openstack flavor create --vcpus 4 --ram 8192 --disk 40 m1.large | A flavor |
openstack flavor set m1.large --property hw:cpu_policy=dedicated | Extra spec: pinned CPUs |
openstack hypervisor list --long | Hypervisors with usage |
openstack aggregate create --zone az1 rack-a | Host aggregate exposed as an availability zone |
Placement & moves
openstack resource provider list | Placement resource providers (osc-placement plugin) |
openstack resource provider inventory list <rp-uuid> | Capacity and allocation ratios |
openstack server migrate --live-migration vm1 | Live-migrate an instance |
openstack server evacuate vm1 | Rebuild an instance from a failed host (admin; recent client syntax) |
Tenant networking
openstack network create private && openstack subnet create --network private --subnet-range 10.0.0.0/24 private-subnet | A self-service network |
openstack router create r1 && openstack router set r1 --external-gateway public && openstack router add subnet r1 private-subnet | Route it to the external network |
openstack floating ip create public && openstack server add floating ip vm1 <ip> | Public access for one instance |
openstack security group rule create --proto tcp --dst-port 22 --remote-ip 203.0.113.0/24 default | Allow SSH from one range |
Troubleshooting
openstack port list --server vm1 --long | The instance's ports, IPs and status |
ip netns (network node, OVS) | qrouter-… and qdhcp-… namespaces |
ovn-nbctl show / ovn-sbctl show | OVN logical topology / chassis bindings |
Glance
openstack image create --disk-format qcow2 --container-format bare --file noble.img ubuntu-24.04 | Upload an image |
openstack image set --property hw_disk_bus=scsi --property hw_scsi_model=virtio-scsi ubuntu-24.04 | Image properties that affect instances |
qemu-img convert -f qcow2 -O raw noble.img noble.raw | Convert to raw (preferred with Ceph) |
Cinder
openstack volume create --size 50 --type ssd data-01 | Create a volume of a type |
openstack server add volume vm1 data-01 | Attach it |
openstack volume snapshot create --volume data-01 data-01-snap | Snapshot (same backend) |
openstack volume backup create --name data-01-bkp data-01 | Backup (to the backup target) |
openstack volume service list | cinder-volume/scheduler/backup service health |
Heat
openstack stack create -t web.yaml --parameter key_name=mykey web | Create a stack from a template |
openstack stack list / openstack stack show web | Stacks and their status |
openstack stack event list web | What happened, step by step (debug failures here) |
openstack stack output show web web_ip | Read an output |
openstack stack delete web | Delete everything the stack created |
Terraform
required_providers { openstack = { source = "terraform-provider-openstack/openstack" } } | The provider |
export OS_CLOUD=shop-prod | Credentials from clouds.yaml |
Workflow
kolla-genpwd | Fill /etc/kolla/passwords.yml with random secrets |
kolla-ansible install-deps | Install the Ansible Galaxy dependencies |
kolla-ansible bootstrap-servers -i multinode | Prepare hosts (container engine, users, packages) |
kolla-ansible prechecks -i multinode | Validate before deploying |
kolla-ansible deploy -i multinode | Deploy / converge the cloud |
kolla-ansible post-deploy -i multinode | Write admin credentials (admin-openrc.sh, clouds.yaml) |
Day 2
kolla-ansible reconfigure -i multinode --tags nova | Apply config changes to one service |
kolla-ansible pull -i multinode | Pre-pull images before an upgrade |
kolla-ansible upgrade -i multinode | Upgrade to the new openstack_release |
/etc/kolla/config/<service>/<file>.conf | Config overrides merged into the generated config |
/var/log/kolla/<service>/ | Service logs on each host |
Health
openstack compute service list | nova-compute/scheduler/conductor state (up/down, enabled) |
openstack network agent list | Neutron agents alive? (OVS/agent-based deployments) |
openstack volume service list | cinder-volume/scheduler/backup state |
rabbitmqctl cluster_status | RabbitMQ cluster members and partitions |
rabbitmqctl list_queues name messages consumers | Queues backing up / queues with no consumers |
mysql -e "SHOW STATUS LIKE 'wsrep_cluster_size'" | Galera members (expect 3) |
Stuck resources (after verifying reality)
openstack server show vm1 -c status -c OS-EXT-STS:task_state -c fault | Status, task state and last fault |
openstack server set --state active vm1 | Reset an instance's state (admin) |
openstack volume set --state available vol1 | Reset a volume's state (admin) |
grep <req-id> /var/log/kolla/*/*.log | Follow one request across services |
Kubernetes on OpenStack
openstack-cloud-controller-manager | Node lifecycle + Services of type LoadBalancer via Octavia |
cinder-csi-plugin (provisioner: cinder.csi.openstack.org) | PersistentVolumes as Cinder volumes |
openstack coe cluster create … | Magnum-managed cluster (if Magnum is deployed) |
clusterctl init --infrastructure openstack | Cluster API provider for OpenStack (CAPO) |
openstack loadbalancer list | Octavia load balancers created for Services |