Compute v2
Add security group to server
os server add security group
<server>
<group>
Server (name or ID)
Security group to add (name or ID)
Add volume to server
os server add volume
[--device <device>]
<server>
<volume>
Server internal device name for volume
Server (name or ID)
Volume to add (name or ID)
Create a new server
os server create
--image <image> | --volume <volume>
--flavor <flavor>
[--security-group <security-group-list> [...] ]
[--key-name <key-name>]
[--property <key=value> [...] ]
[--file <dest-filename=source-filename>] [...] ]
[--user-data <user-data>]
[--availability-zone <zone-name>]
[--block-device-mapping <dev-name=mapping> [...] ]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr> [...] ]
[--hint <key=value> [...] ]
[--config-drive <value>|True ]
[--min <count>]
[--max <count>]
[--wait]
<server-name>
Create server from this image
Create server from this volume
Create server with this flavor
Security group to assign to this server (repeat for multiple groups)
Keypair to inject into this server (optional extension)
Set a property on this server (repeat for multiple values)
File to inject into image before boot (repeat for multiple files)
User data file to serve from the metadata server
Select an availability zone for the server
Map block devices; map is <id>:<type>:<size(GB)>:<delete_on_terminate> (optional extension)
Specify NIC configuration (optional extension)
Hints for the scheduler (optional extension)
Use specified volume as the config drive, or ‘True’ to use an ephemeral drive
Minimum number of servers to launch (default=1)
Maximum number of servers to launch (default=1)
Wait for build to complete
New server name
Delete server(s)
os server delete
<server> [<server> ...]
Server to delete (name or ID)
List servers
os server list
[--reservation-id <reservation-id>]
[--ip <ip-address-regex>]
[--ip6 <ip6-address-regex>]
[--name <name-regex>]
[--instance-name <instance-name-regex>]
[--status <status>]
[--flavor <flavor>]
[--image <image>]
[--host <hostname>]
[--all-projects]
[--long]
Only return instances that match the reservation
Regular expression to match IP addresses
Regular expression to match IPv6 addresses
Regular expression to match names
Regular expression to match instance name (admin only)
Search by server status
Search by flavor ID
Search by image ID
Search by hostname
Include all projects (admin only)
List additional fields in output
Lock a server. A non-admin user will not be able to execute actions
os server lock
<server>
Server (name or ID)
Migrate server to different host
os server migrate
--live <host>
[--shared-migration | --block-migration]
[--disk-overcommit | --no-disk-overcommit]
[--wait]
<server>
Target hostname
Perform a shared live migration (default)
Perform a block live migration
Allow disk over-commit on the destination host
Do not over-commit disk on the destination host (default)
Wait for resize to complete
Server to migrate (name or ID)
Perform a hard or soft server reboot
os server reboot
[--hard | --soft]
[--wait]
<server>
Perform a hard reboot
Perform a soft reboot
Wait for reboot to complete
Server (name or ID)
Rebuild server
os server rebuild
--image <image>
[--password <password>]
[--wait]
<server>
Recreate server from this image
Set the password on the rebuilt instance
Wait for rebuild to complete
Server (name or ID)
Remove security group from server
os server remove security group
<server>
<group>
Name or ID of server to use
Name or ID of security group to remove from server
Remove volume from server
os server remove volume
<server>
<volume>
Server (name or ID)
Volume to remove (name or ID)
Scale server to a new flavor
os server resize
--flavor <flavor>
[--wait]
<server>
os server resize
--confirm | --revert
<server>
Resize server to specified flavor
Confirm server resize is complete
Restore server state before resize
Wait for resize to complete
Server (name or ID)
A resize operation is implemented by creating a new server and copying the contents of the original disk into a new one. It is also a two-step process for the user: the first is to perform the resize, the second is to either confirm (verify) success and release the old server, or to declare a revert to release the new server and restart the old one.
Set server properties
os server set
--name <new-name>
--property <key=value>
[--property <key=value>] ...
--root-password
<server>
New server name
Set new root password (interactive only)
Property to add/change for this server (repeat option to set multiple properties)
Server (name or ID)
Show server details
os server show
[--diagnostics]
<server>
Display server diagnostics information
Server (name or ID)
Ssh to server
os server ssh
[--login <login-name>]
[--port <port>]
[--identity <keyfile>]
[--option <config-options>]
[--public | --private | --address-type <address-type>]
<server>
Login name (ssh -l option)
Destination port (ssh -p option)
Private key file (ssh -i option)
Options in ssh_config(5) format (ssh -o option)
Use public IP address
Use private IP address
Use other IP address (public, private, etc)
Server (name or ID)
Restore server from rescue mode
os server unrescue
<server>
Server (name or ID)