Nova (VMs)
Nova manages VMs (instances; server in the CLI).
List and inspect VMs
Section titled “List and inspect VMs”openstack server listopenstack server list --all-projects --long # administrators: every projectopenstack server show demo1| Item | Value |
|---|---|
| Expected output | name, status (ACTIVE, SHUTOFF, ERROR, …), networks and addresses, image, flavor |
| Permission | member for your own project’s VMs; --all-projects needs an administrator |
| Horizon | Project → Compute → Instances (administrators: Admin → Compute → Instances) |
Create a VM
Section titled “Create a VM”openstack server create --flavor m1.tiny --image cirros-0.6.3-x86_64 \ --network hagistack-tenant --key-name hagistack-key --wait demo1| Option | Meaning |
|---|---|
--flavor |
size: CPU, memory, disk |
--image |
the image to boot |
--network |
the network to attach (the tenant network) |
--key-name |
the SSH public key to inject |
--security-group |
the security group (default: default) |
--wait |
wait until ACTIVE |
HAGISTACK installs no Cinder (volumes); a VM’s disk is created on the compute node’s local disk.
Start, stop, reboot, delete
Section titled “Start, stop, reboot, delete”openstack server stop demo1openstack server start demo1openstack server reboot demo1 # soft rebootopenstack server reboot --hard demo1 # hard rebootopenstack server delete --wait demo1Boot log
Section titled “Boot log”openstack console log show demo1Shows cloud-init’s output and more. In Horizon, the instance’s Log tab.
Compute services and hypervisors
Section titled “Compute services and hypervisors”openstack compute service listopenstack hypervisor listopenstack hypervisor show HYPERVISOR_HOSTNAME| Command | Expected output | Permission | Horizon |
|---|---|---|---|
compute service list |
nova-scheduler, nova-conductor, nova-compute (per host) enabled / up |
administrator | Admin → System → System Information |
hypervisor list |
compute hosts up |
administrator | Admin → Compute → Hypervisors |
Where a VM runs
Section titled “Where a VM runs”openstack server show demo1 -c name -c status -c OS-EXT-SRV-ATTR:hostopenstack server list --all-projects --host HOSTNAMEOnly administrators can see OS-EXT-SRV-ATTR:host. For how placement works and how to request a host, see Add a compute node.
Flavors
Section titled “Flavors”openstack flavor listopenstack flavor create --vcpus 1 --ram 512 --disk 2 m1.smallOnly administrators can create and delete flavors. --ram is in MiB, --disk in GiB.