OpenStack Commands Cheat Sheet
Service | Command |
---|---|
Compute (Nova) | |
openstack server create --flavor <flavor> --image <image> --nic net-id=<network_id> <instance_name> |
|
openstack server delete <instance_id> |
|
openstack server show <server_name> |
|
openstack server list --all-projects |
|
openstack server start <server_name> |
|
openstack server stop <server_name> |
|
openstack server pause <server_name> |
|
openstack server unpause <server_name> |
|
openstack server reboot <server_name> |
|
openstack server resize <server_name> <new_flavor> |
|
openstack server migrate <server_name> |
|
openstack server backup create <server_name> |
|
openstack server image create <server_name> <image_name> |
|
openstack server group list |
|
openstack server group create <name> <policy> |
|
openstack server group delete <group_id> |
|
openstack server group show <group_id> |
|
openstack flavor create <name> <id> <ram> <disk> <vcpus> |
|
openstack flavor delete <flavor_id> |
|
openstack flavor list |
|
openstack flavor show <flavor_id> |
|
openstack keypair list |
|
openstack keypair create <keypair_name> |
|
openstack keypair delete <keypair_name> |
|
openstack keypair show <keypair_name> |
|
openstack hypervisor list |
|
openstack hypervisor show <hypervisor_id> |
|
openstack hypervisor stats show |
|
openstack host list |
|
openstack host show <host_name> |
|
openstack host set <host_name> --maintenance <on/off> |
|
openstack console url show <server_name> |
|
openstack network create <network_name> |
|
Image (Glance) | |
openstack image list |
|
openstack image create --file <image_file> --disk-format qcow2 --container-format bare --public <image_name> |
|
openstack image show <image_id> |
|
openstack image delete <image_id> |
|
openstack image save <image_id> --file <filename> |
|
openstack image set <image_id> --name <new_name> |
|
openstack image unset <image_id> --property <key> |
|
openstack image metadata set <image_id> --property <key=value> |
|
openstack image metadata show <image_id> |
|
openstack image tag set <image_id> <tag> |
|
openstack image tag delete <image_id> <tag> |
|
openstack image member add <image_id> <project_id> |
|
openstack image member remove <image_id> <project_id> |
|
openstack image member list <image_id> |
|
Networking (Neutron) | |
openstack network list |
|
openstack network create <network_name> |
|
openstack network show <network_id> |
|
openstack network delete <network_id> |
|
openstack subnet list |
|
openstack subnet create --network <network_id> --subnet-range <subnet_cidr> <subnet_name> |
|
openstack subnet show <subnet_id> |
|
openstack subnet delete <subnet_id> |
|
openstack router list |
|
openstack router create <router_name> |
|
openstack router show <router_id> |
|
openstack router delete <router_id> |
|
openstack router set <router_id> --external-gateway <network_id> |
|
openstack router unset <router_id> --external-gateway |
|
openstack router add subnet <router_id> <subnet_id> |
|
openstack router remove subnet <router_id> <subnet_id> |
|
openstack port list |
|
openstack port create --network <network_id> <port_name> |
|
openstack port show <port_id> |
|
openstack port delete <port_id> |
|
openstack floating ip create <network_id> |
|
openstack floating ip list |
|
openstack floating ip show <floating_ip_id> |
|
openstack floating ip delete <floating_ip_id> |
|
openstack security group list |
|
Block Storage (Cinder) | |
openstack volume list |
|
openstack volume create --size <size_in_gb> <volume_name> |
|
openstack volume show <volume_id> |
|
openstack volume delete <volume_id> |
|
openstack volume set <volume_id> --name <new_name> |
|
openstack volume snapshot list |
|
openstack volume snapshot create --volume <volume_id> <snapshot_name> |
|
openstack volume snapshot show <snapshot_id> |
|
openstack volume snapshot delete <snapshot_id> |
|
openstack volume backup list |
|
openstack volume backup create --name <backup_name> <volume_id> |
|
openstack volume backup show <backup_id> |
|
openstack volume backup delete <backup_id> |
|
openstack volume type list |
|
openstack volume type create <type_name> |
|
openstack volume type delete <type_id> |
|
openstack volume type set <type_id> --property <key=value> |
|
openstack volume type unset <type_id> --property <key> |
|
openstack volume qos associate <qos_policy> <volume_type> |
|
openstack volume qos disassociate <qos_policy> <volume_type> |
|
openstack volume qos list |
|
openstack volume qos create <qos_name> |
|
openstack volume qos delete <qos_id> |
|
openstack volume qos set <qos_id> --property <key=value> |
|
openstack volume qos unset <qos_id> --property <key> |
|
Identity (Keystone) | |
openstack project list |
|
openstack project create <project_name> |
|
openstack project delete <project_id> |
|
openstack project set <project_id> --description <description> |
|
openstack user list |
|
openstack user create --project <project_id> --password <password> <user_name> |
|
openstack user delete <user_id> |
|
openstack user set <user_id> --password <password> |
|
openstack user add role --project <project_id> --user <user_id> <role_id> |
|
openstack user remove role --project <project_id> --user <user_id> <role_id> |
|
openstack role list |
|
openstack role create <role_name> |
|
openstack role delete <role_id> |
|
openstack token list |
|
openstack token issue |
|
openstack token revoke <token_id> |
|
openstack service list |