Compute v2 Commands

aggregate

Host aggregates provide a mechanism to group hosts according to certain criteria.

aggregate add host

Add host to aggregate

openstack aggregate add host <aggregate> <host>
aggregate

Aggregate (name or ID)

host

Host to add to <aggregate>

aggregate cache image

Request image caching for aggregate

openstack aggregate cache image <aggregate> <image> [<image> ...]
aggregate

Aggregate (name or ID)

image

Image ID to request caching for aggregate (name or ID). May be specified multiple times.

aggregate create

Create a new aggregate

openstack aggregate create
    [--zone <availability-zone>]
    [--property <key=value>]
    <name>
--zone <availability-zone>

Availability zone name

--property <key=value>

Property to add to this aggregate (repeat option to set multiple properties)

name

New aggregate name

aggregate delete

Delete existing aggregate(s)

openstack aggregate delete <aggregate> [<aggregate> ...]
aggregate

Aggregate(s) to delete (name or ID)

aggregate list

List all aggregates

openstack aggregate list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--long]
    [--availability-zone <availability-zone>]
    [--host <host>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--long

List additional fields in output

--availability-zone <availability-zone>

Filter by availability zone name

--host <host>

Filter by aggregates containing this host

aggregate remove host

Remove host from aggregate

openstack aggregate remove host <aggregate> <host>
aggregate

Aggregate (name or ID)

host

Host to remove from <aggregate>

aggregate set

Set aggregate properties

openstack aggregate set
    [--name <name>]
    [--zone <availability-zone>]
    [--property <key=value>]
    [--no-property]
    <aggregate>
--name <name>

Set aggregate name

--zone <availability-zone>

Set availability zone name

--property <key=value>

Property to set on <aggregate> (repeat option to set multiple properties)

--no-property

Remove all properties from <aggregate> (specify both –property and –no-property to overwrite the current properties)

aggregate

Aggregate to modify (name or ID)

aggregate show

Display aggregate details

openstack aggregate show <aggregate>
aggregate

Aggregate to display (name or ID)

aggregate unset

Unset aggregate properties

openstack aggregate unset [--property <key>] <aggregate>
--property <key>

Property to remove from aggregate (repeat option to remove multiple properties)

aggregate

Aggregate to modify (name or ID)

compute agent

compute agent create

Create compute agent.

The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

openstack compute agent create
    <os>
    <architecture>
    <version>
    <url>
    <md5hash>
    <hypervisor>
os

Type of OS

architecture

Type of architecture

version

Version

url

URL

md5hash

MD5 hash

hypervisor

Type of hypervisor

compute agent delete

Delete compute agent(s).

The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

openstack compute agent delete <id> [<id> ...]
id

ID of agent(s) to delete

compute agent list

List compute agents.

The compute agent functionality is hypervisor specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

openstack compute agent list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--hypervisor <hypervisor>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--hypervisor <hypervisor>

Type of hypervisor

compute agent set

Set compute agent properties.

The compute agent functionality is hypervisor-specific and is only supported by the XenAPI hypervisor driver. It was removed from nova in the 23.0.0 (Wallaby) release.

openstack compute agent set
    [--agent-version <version>]
    [--url <url>]
    [--md5hash <md5hash>]
    <id>
--agent-version <version>

Version of the agent

--url <url>

URL of the agent

--md5hash <md5hash>

MD5 hash of the agent

id

ID of the agent

compute service

compute service delete

Delete compute service(s)

openstack compute service delete <service> [<service> ...]
service

Compute service(s) to delete (ID only). If using --os-compute-api-version 2.53 or greater, the ID is a UUID which can be retrieved by listing compute services using the same 2.53+ microversion. If deleting a compute service, be sure to stop the actual compute process on the physical host before deleting the service with this command. Failing to do so can lead to the running service re-creating orphaned compute_nodes table records in the database.

compute service list

List compute services.

Using --os-compute-api-version 2.53 or greater will return the ID as a UUID value which can be used to uniquely identify the service in a multi-cell deployment.

openstack compute service list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--host <host>]
    [--service <service>]
    [--long]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--host <host>

List services on specified host (name only)

--service <service>

List only specified service binaries (name only). For example, nova-compute, nova-conductor, etc.

--long

List additional fields in output

compute service set

Set compute service properties

openstack compute service set
    [--enable | --disable]
    [--disable-reason <reason>]
    [--up | --down]
    <host>
    <service>
--enable

Enable service

--disable

Disable service

--disable-reason <reason>

Reason for disabling the service (in quotes). Should be used with –disable option.

--up

Force up service. Requires --os-compute-api-version 2.11 or greater.

--down

Force down service. Requires --os-compute-api-version 2.11 or greater.

host

Name of host

service

Name of service (Binary name), for example nova-compute

console connection

Server console connection information

console connection show

Show server’s remote console connection information

openstack console connection show <token>
token

Nova console token to lookup

console log

Server console text dump

console log show

Show server’s console output

openstack console log show [--lines <num-lines>] <server>
--lines <num-lines>

Number of lines to display from the end of the log (default=all)

server

Server to show console log (name or ID)

console url

Server remote console URL

console url show

Show server’s remote console URL

openstack console url show
    [--novnc | --xvpvnc | --spice | --spice-direct | --rdp | --serial | --mks]
    <server>
--novnc

Show noVNC console URL (default)

--xvpvnc

Show xvpvnc console URL

--spice

Show SPICE console URL

--spice-direct

Show SPICE direct protocol native console URL

--rdp

Show RDP console URL

--serial

Show serial console URL

--mks

Show WebMKS console URL

server

Server to show URL (name or ID)

flavor

flavor create

Create new flavor

openstack flavor create
    [--id <id>]
    [--ram <size-mb>]
    [--disk <size-gb>]
    [--ephemeral <size-gb>]
    [--swap <size-mb>]
    [--vcpus <vcpus>]
    [--rxtx-factor <factor>]
    [--public | --private]
    [--property <key=value>]
    [--project <project>]
    [--description <description>]
    [--project-domain <project-domain>]
    <flavor-name>
--id <id>

Unique flavor ID

--ram <size-mb>

Memory size in MB (default 256M)

--disk <size-gb>

Disk size in GB (default 0G)

--ephemeral <size-gb>

Ephemeral disk size in GB (default 0G)

--swap <size-mb>

Additional swap space size in MB (default 0M)

--vcpus <vcpus>

Number of vcpus (default 1)

--rxtx-factor <factor>

RX/TX factor

--public

Flavor is available to other projects (default)

--private

Flavor is not available to other projects

--property <key=value>

Property to add for this flavor (repeat option to set multiple properties)

--project <project>

Allow <project> to access private flavor (name or ID) (Must be used with –private option)

--description <description>

Description for the flavor.(Supported by API versions ‘2.55’ - ‘2.latest’

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

flavor-name

New flavor name

flavor delete

Delete flavor(s)

openstack flavor delete <flavor> [<flavor> ...]
flavor

Flavor(s) to delete (name or ID)

flavor list

List flavors

openstack flavor list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--public | --private | --all]
    [--min-disk <min-disk>]
    [--min-ram <min-ram>]
    [--long]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--public

List only public flavors (default)

--private

List only private flavors

--all

List all flavors, whether public or private

--min-disk <min-disk>

Filters the flavors by a minimum disk space, in GiB.

--min-ram <min-ram>

Filters the flavors by a minimum RAM, in MiB.

--long

List additional fields in output

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

flavor set

Set flavor properties

openstack flavor set
    [--no-property]
    [--property <key=value>]
    [--project <project>]
    [--project-domain <project-domain>]
    [--description <description>]
    <flavor>
--no-property

Remove all properties from this flavor (specify both –no-property and –property to remove the current properties before setting new properties.)

--property <key=value>

Property to add or modify for this flavor (repeat option to set multiple properties)

--project <project>

Set flavor access to project (name or ID) (admin only)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

--description <description>

Set description for the flavor.(Supported by API versions ‘2.55’ - ‘2.latest’

flavor

Flavor to modify (name or ID)

flavor show

Display flavor details

openstack flavor show <flavor>
flavor

Flavor to display (name or ID)

flavor unset

Unset flavor properties

openstack flavor unset
    [--property <key>]
    [--project <project>]
    [--project-domain <project-domain>]
    <flavor>
--property <key>

Property to remove from flavor (repeat option to unset multiple properties)

--project <project>

Remove flavor access from project (name or ID) (admin only)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

flavor

Flavor to modify (name or ID)

host

The physical computer running a hypervisor.

host list

DEPRECATED: List hosts

openstack host list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--zone <zone>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--zone <zone>

Only return hosts in the availability zone

host set

DEPRECATED: Set host properties

openstack host set
    [--enable | --disable]
    [--enable-maintenance | --disable-maintenance]
    <host>
--enable

Enable the host

--disable

Disable the host

--enable-maintenance

Enable maintenance mode for the host

--disable-maintenance

Disable maintenance mode for the host

host

Host to modify (name only)

host show

DEPRECATED: Display host details

openstack host show
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <host>
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

host

Name of host

hypervisor stats

hypervisor stats show

Display hypervisor stats details

openstack hypervisor stats show

hypervisor

hypervisor list

List hypervisors

openstack hypervisor list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--matching <hostname>]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
    [--long]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--matching <hostname>

Filter hypervisors using <hostname> substringHypervisor Type and Host IP are not returned when using microversion 2.52 or lower

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

--long

List additional fields in output

hypervisor show

Display hypervisor details

openstack hypervisor show <hypervisor>
hypervisor

Hypervisor to display (name or ID)

keypair

The badly named keypair is really the public key of an OpenSSH key pair to be used for access to created servers. You can also create a private key for access to a created server by not passing any argument to the keypair create command.

keypair create

Create new public or private key for server ssh access

openstack keypair create
    [--public-key <file> | --private-key <file>]
    [--type <type>]
    [--user <user>]
    [--user-domain <user-domain>]
    <name>
--public-key <file>

Filename for public key to add. If not used, generates a private key in ssh-ed25519 format. To generate keys in other formats, including the legacy ssh-rsa format, you must use an external tool such as ssh-keygen and specify this argument.

--private-key <file>

Filename for private key to save. If not used, print private key in console.

--type <type>

Keypair type (supported by –os-compute-api-version 2.2 or above)

--user <user>

The owner of the keypair (admin only) (name or ID) (supported by –os-compute-api-version 2.10 or above)

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

name

New public or private key name

keypair delete

Delete public or private key(s)

openstack keypair delete
    [--user <user>]
    [--user-domain <user-domain>]
    <key>
    [<key> ...]
--user <user>

The owner of the keypair. (admin only) (name or ID). Requires --os-compute-api-version 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

key

Name of key(s) to delete (name only)

keypair list

List key fingerprints

openstack keypair list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--user <user>]
    [--user-domain <user-domain>]
    [--project <project>]
    [--project-domain <project-domain>]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--user <user>

Show keypairs for another user (admin only) (name or ID). Requires --os-compute-api-version 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

--project <project>

Show keypairs for all users associated with project (admin only) (name or ID). Requires --os-compute-api-version 2.10 or greater.

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

keypair show

Display key details

openstack keypair show
    [--public-key]
    [--user <user>]
    [--user-domain <user-domain>]
    <key>
--public-key

Show only bare public key paired with the generated key

--user <user>

The owner of the keypair. (admin only) (name or ID). Requires --os-compute-api-version 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

key

Public or private key to display (name only)

server backup

A server backup is a disk image created in the Image store from a running server instance. The backup command manages the number of archival copies to retain.

server backup create

Create a server backup image

openstack server backup create
    [--name <image-name>]
    [--type <backup-type>]
    [--rotate <count>]
    [--wait]
    <server>
--name <image-name>

Name of the backup image (default: server name)

--type <backup-type>

Used to populate the backup_type property of the backup image (default: empty)

--rotate <count>

Number of backups to keep (default: 1)

--wait

Wait for backup image create to complete

server

Server to back up (name or ID)

server event

Server event are event record for server operations. They consist of: type (create, delete, reboot and so on), result (success, error), start time, finish time and so on. These are important for server maintenance.

server event list

List recent events of a server.

Specify --os-compute-api-version 2.21 or higher to show events for a deleted server, specified by ID only.

openstack server event list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--long]
    [--changes-since <changes-since>]
    [--changes-before <changes-before>]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
    <server>
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--long

List additional fields in output

--changes-since <changes-since>

List only server events changed later or equal to a certain point of time. The provided time should be an ISO 8061 formatted time, e.g. 2016-03-04T06:27:59Z. (supported with –os-compute-api-version 2.58 or above)

--changes-before <changes-before>

List only server events changed earlier or equal to a certain point of time. The provided time should be an ISO 8061 formatted time, e.g. 2016-03-04T06:27:59Z. (supported with –os-compute-api-version 2.66 or above)

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

server

Server to list events (name or ID)

server event show

Show server event details.

Specify --os-compute-api-version 2.21 or higher to show event details for a deleted server, specified by ID only. Specify --os-compute-api-version 2.51 or higher to show event details for non-admin users.

openstack server event show <server> <request-id>
server

Server to show event details (name or ID)

request-id

Request ID of the event to show (ID only)

server group

Server groups provide a mechanism to group servers according to certain policy.

server group create

Create a new server group.

openstack server group create
    [--policy <policy>]
    [--rule <key=value>]
    <name>
--policy <policy>

Add a policy to <name> Specify –os-compute-api-version 2.15 or higher for the ‘soft-affinity’ or ‘soft-anti-affinity’ policy.

--rule <key=value>

A rule for the policy. Currently, only the ‘max_server_per_host’ rule is supported for the ‘anti-affinity’ policy.

name

New server group name

server group delete

Delete existing server group(s).

openstack server group delete <server-group> [<server-group> ...]
server-group

server group(s) to delete (name or ID)

server group list

List all server groups.

openstack server group list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--all-projects]
    [--long]
    [--limit <limit>]
    [--offset <offset>]
    [--max-items <max-items>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--all-projects

Display information from all projects (admin only)

--long

List additional fields in output

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the maximum value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--offset <offset>

The (zero-based) offset of the first item in the collection to return.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

server group show

Display server group details.

openstack server group show <server-group>
server-group

server group to display (name or ID)

server image

A server image is a disk image created from a running server instance. The image is created in the Image store.

server image create

Create a new server disk image from an existing server

openstack server image create
    [--name <image-name>]
    [--property <key=value>]
    [--wait]
    <server>
--name <image-name>

Name of new disk image (default: server name)

--property <key=value>

Set a new property to meta_data.json on the metadata server (repeat option to set multiple values)

--wait

Wait for operation to complete

server

Server to create image (name or ID)

server migration

A server migration provides a way to move an instance from one host to another. There are four types of migration operation supported: live migration, cold migration, resize and evacuation.

server migration abort

Cancel an ongoing live migration.

This command requires --os-compute-api-version 2.24 or greater.

openstack server migration abort <server> <migration>
server

Server (name or ID)

migration

Migration (ID)

server migration confirm

Confirm server migration.

Confirm (verify) success of the migration operation and release the old server.

openstack server migration confirm <server>
server

Server (name or ID)

server migration force complete

Force an ongoing live migration to complete.

This command requires --os-compute-api-version 2.22 or greater.

openstack server migration force complete <server> <migration>
server

Server (name or ID)

migration

Migration (ID)

server migration list

List server migrations

openstack server migration list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--server <server>]
    [--host <host>]
    [--status <status>]
    [--type <type>]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
    [--changes-since <changes-since>]
    [--changes-before <changes-before>]
    [--project <project>]
    [--project-domain <project-domain>]
    [--user <user>]
    [--user-domain <user-domain>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--server <server>

Filter migrations by server (name or ID)

--host <host>

Filter migrations by source or destination host

--status <status>

Filter migrations by status

--type <type>

Filter migrations by type

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

--changes-since <changes-since>

List only migrations changed later or equal to a certain point of time. The provided time should be an ISO 8061 formatted time, e.g. 2016-03-04T06:27:59Z. (supported with –os-compute-api-version 2.59 or above)

--changes-before <changes-before>

List only migrations changed earlier or equal to a certain point of time. The provided time should be an ISO 8061 formatted time, e.g. 2016-03-04T06:27:59Z. (supported with –os-compute-api-version 2.66 or above)

--project <project>

Filter migrations by project (name or ID) (supported with –os-compute-api-version 2.80 or above)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

--user <user>

Filter migrations by user (name or ID) (supported with –os-compute-api-version 2.80 or above)

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

server migration revert

Revert server migration.

Revert the migration operation. Release the new server and restart the old one.

openstack server migration revert <server>
server

Server (name or ID)

server migration show

Show an in-progress live migration for a given server.

Note that it is not possible to show cold migrations or completed live-migrations. Use ‘openstack server migration list’ to get details for these.

openstack server migration show <server> <migration>
server

Server (name or ID)

migration

Migration (ID)

server share

server share list

List all the shares attached to a server.

Requires --os-compute-api-version 2.97 or later.

openstack server share list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    <server>
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

server

Server to list share mapping for (name or ID)

server share show

Show detail of a share attachment to a server.

Requires --os-compute-api-version 2.97 or later.

openstack server share show <server> <share>
server

Server to show share mapping for (name or ID)

share

Share to show details for (name or ID)

server volume

server volume list

List all the volumes attached to a server.

openstack server volume list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    server
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

server

Server to list volume attachments for (name or ID)

server volume set

Update a volume attachment on the server.

openstack server volume set
    [--delete-on-termination | --preserve-on-termination]
    server
    volume
--delete-on-termination

Delete the volume when the server is destroyed (supported by –os-compute-api-version 2.85 or above)

--preserve-on-termination

Preserve the volume when the server is destroyed (supported by –os-compute-api-version 2.85 or above)

server

Server to update volume for (name or ID)

volume

Volume to update attachment for (name or ID)

server volume update

DEPRECATED: Use ‘server volume set’ instead.

openstack server volume update
    [--delete-on-termination | --preserve-on-termination]
    server
    volume
--delete-on-termination

Delete the volume when the server is destroyed (supported by –os-compute-api-version 2.85 or above)

--preserve-on-termination

Preserve the volume when the server is destroyed (supported by –os-compute-api-version 2.85 or above)

server

Server to update volume for (name or ID)

volume

Volume to update attachment for (name or ID)

server

server add fixed ip

Add fixed IP address to server

openstack server add fixed ip
    [--fixed-ip-address <ip-address>]
    [--tag <tag>]
    <server>
    <network>
--fixed-ip-address <ip-address>

Requested fixed IP address

--tag <tag>

Tag for the attached interface. (supported by –os-compute-api-version 2.49 or above)

server

Server to receive the fixed IP address (name or ID)

network

Network to allocate the fixed IP address from (name or ID)

server add floating ip

Add floating IP address to server

openstack server add floating ip
    [--fixed-ip-address <ip-address>]
    <server>
    <ip-address>
--fixed-ip-address <ip-address>

Fixed IP address to associate with this floating IP address. The first server port containing the fixed IP address will be used

server

Server to receive the floating IP address (name or ID)

ip-address

Floating IP address to assign to the first available server port (IP only)

server add network

Add network to server

openstack server add network [--tag <tag>] <server> <network>
--tag <tag>

Tag for the attached interface. (supported by –os-compute-api-version 2.49 or above)

server

Server to add the network to (name or ID)

network

Network to add to the server (name or ID)

server add port

Add port to server

openstack server add port [--tag <tag>] <server> <port>
--tag <tag>

Tag for the attached interface (supported by –os-compute-api-version 2.49 or later)

server

Server to add the port to (name or ID)

port

Port to add to the server (name or ID)

server add security group

Add security group(s) to server

openstack server add security group
    <server>
    <security-group>
    [<security-group> ...]
server

Server (name or ID)

security-group

Security group(s) to add to the server (name or ID) (repeat option to add multiple groups)

server add share

Add a share to a server.

Requires --os-compute-api-version 2.97 or later.

openstack server add share [--tag <tag>] <server> <share>
--tag <tag>

Optional tag used to mount the share, if not provided the share uuid is used as tag by default

server

Server to add share to (name or ID)

share

Share to add (name or ID)

server add volume

Add volume to server.

Specify --os-compute-api-version 2.20 or higher to add a volume to a server with status SHELVED or SHELVED_OFFLOADED.

openstack server add volume
    [--device <device>]
    [--tag <tag>]
    [--enable-delete-on-termination | --disable-delete-on-termination]
    <server>
    <volume>
--device <device>

Server internal device name for volume

--tag <tag>

Tag for the attached volume (supported by –os-compute-api-version 2.49 or above)

--enable-delete-on-termination

Delete the volume when the server is destroyed (supported by –os-compute-api-version 2.79 or above)

--disable-delete-on-termination

Do not delete the volume when the server is destroyed (supported by –os-compute-api-version 2.79 or above)

server

Server (name or ID)

volume

Volume to add (name or ID)

server create

Create a new server

openstack server create
    --flavor <flavor>
    [--image <image> | --image-property <key=value> | --volume <volume> | --snapshot <snapshot>]
    [--boot-from-volume <volume-size>]
    [--block-device-mapping <dev-name=mapping>]
    [--block-device <block-device>]
    [--swap <swap>]
    [--ephemeral <size=size[,format=format]
    >]
    [--network <network>]
    [--port <port>]
    [--no-network]
    [--auto-network]
    [--nic <net-id=net-uuid,port-id=port-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,tag=tag,auto,none>]
    [--password <password>]
    [--no-security-group | --security-group <security-group>]
    [--key-name <key-name>]
    [--property <key=value>]
    [--file <dest-filename=source-filename>]
    [--user-data <user-data>]
    [--description <description>]
    [--availability-zone <zone-name>]
    [--host <host>]
    [--hypervisor-hostname <hypervisor-hostname>]
    [--server-group <server-group>]
    [--hint <key=value>]
    [--use-config-drive | --no-config-drive | --config-drive <config-drive-volume>|True]
    [--min <count>]
    [--max <count>]
    [--tag <tag>]
    [--hostname <hostname>]
    [--wait]
    [--trusted-image-cert <trusted-cert-id>]
    <server-name>
--flavor <flavor>

Create server with this flavor (name or ID)

--image <image>

Create server boot disk from this image (name or ID)

--image-property <key=value>

Create server using the image that matches the specified property. Property must match exactly one property.

--volume <volume>

Create server using this volume as the boot disk (name or ID) This option automatically creates a block device mapping with a boot index of 0. On many hypervisors (libvirt/kvm for example) this will be device vda. Do not create a duplicate mapping using –block-device-mapping for this volume.

--snapshot <snapshot>

Create server using this snapshot as the boot disk (name or ID) This option automatically creates a block device mapping with a boot index of 0. On many hypervisors (libvirt/kvm for example) this will be device vda. Do not create a duplicate mapping using –block-device-mapping for this volume.

--boot-from-volume <volume-size>

When used in conjunction with the --image or --image-property option, this option automatically creates a block device mapping with a boot index of 0 and tells the compute service to create a volume of the given size (in GB) from the specified image and use it as the root disk of the server. The root volume will not be deleted when the server is deleted. This option is mutually exclusive with the --volume and --snapshot options.

--block-device-mapping <dev-name=mapping>

Deprecated Create a block device on the server. Block device mapping in the format <dev-name>=<id>:<type>:<size(GB)>:<delete-on-terminate> <dev-name>: block device name, like: vdb, xvdc (required) <id>: Name or ID of the volume, volume snapshot or image (required) <type>: volume, snapshot or image; default: volume (optional) <size(GB)>: volume size if create from image or snapshot (optional) <delete-on-terminate>: true or false; default: false (optional) Replaced by –block-device

--block-device <block-device>

Create a block device on the server. Either a path to a JSON file or a CSV-serialized string describing the block device mapping. The following keys are accepted for both: uuid=<uuid>: UUID of the volume, snapshot or ID (required if using source image, snapshot or volume), source_type=<source_type>: source type (one of: image, snapshot, volume, blank), destination_type=<destination_type>: destination type (one of: volume, local) (optional), disk_bus=<disk_bus>: device bus (one of: uml, lxc, virtio, …) (optional), device_type=<device_type>: device type (one of: disk, cdrom, etc. (optional), device_name=<device_name>: name of the device (optional), volume_size=<volume_size>: size of the block device in MiB (for swap) or GiB (for everything else) (optional), guest_format=<guest_format>: format of device (optional), boot_index=<boot_index>: index of disk used to order boot disk (required for volume-backed instances), delete_on_termination=<true|false>: whether to delete the volume upon deletion of server (optional), tag=<tag>: device metadata tag (optional), volume_type=<volume_type>: type of volume to create (name or ID) when source if blank, image or snapshot and dest is volume (optional)

--swap <swap>

Create and attach a local swap block device of <swap_size> MiB.

--ephemeral <size=size[,format=format]>

Create and attach a local ephemeral block device of <size> GiB and format it to <format>.

--network <network>

Create a NIC on the server and connect it to network. Specify option multiple times to create multiple NICs. This is a wrapper for the ‘–nic net-id=<network>’ parameter that provides simple syntax for the standard use case of connecting a new server to a given network. For more advanced use cases, refer to the ‘–nic’ parameter.

--port <port>

Create a NIC on the server and connect it to port. Specify option multiple times to create multiple NICs. This is a wrapper for the ‘–nic port-id=<port>’ parameter that provides simple syntax for the standard use case of connecting a new server to a given port. For more advanced use cases, refer to the ‘–nic’ parameter.

--no-network

Do not attach a network to the server. This is a wrapper for the ‘–nic none’ option that provides a simple syntax for disabling network connectivity for a new server. For more advanced use cases, refer to the ‘–nic’ parameter. (supported by –os-compute-api-version 2.37 or above)

--auto-network

Automatically allocate a network to the server. This is the default network allocation policy. This is a wrapper for the ‘–nic auto’ option that provides a simple syntax for enabling automatic configuration of network connectivity for a new server. For more advanced use cases, refer to the ‘–nic’ parameter. (supported by –os-compute-api-version 2.37 or above)

--nic <net-id=net-uuid,port-id=port-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,tag=tag,auto,none>

Create a NIC on the server. NIC in the format: net-id=<net-uuid>: attach NIC to network with this UUID, port-id=<port-uuid>: attach NIC to port with this UUID, v4-fixed-ip=<ip-addr>: IPv4 fixed address for NIC (optional), v6-fixed-ip=<ip-addr>: IPv6 fixed address for NIC (optional), tag: interface metadata tag (optional) (supported by –os-compute-api-version 2.43 or above), none: (v2.37+) no network is attached, auto: (v2.37+) the compute service will automatically allocate a network.

Specify option multiple times to create multiple NICs. Specifying a –nic of auto or none cannot be used with any other –nic value. Either net-id or port-id must be provided, but not both.

--password <password>

Set the password to this server. This option requires cloud support.

--no-security-group

Do not associate a security group with ports attached to this server. This does not affect the security groups associated with pre-existing ports.

--security-group <security-group>

Security group to associate with ports attached to this server (name or ID) (repeat option to set multiple groups)

--key-name <key-name>

Keypair to inject into this server

--property <key=value>

Set a property on this server (repeat option to set multiple values)

--file <dest-filename=source-filename>

File(s) to inject into image before boot (repeat option to set multiple files) (supported by –os-compute-api-version 2.57 or below)

--user-data <user-data>

User data file to serve from the metadata server

--description <description>

Set description for the server (supported by –os-compute-api-version 2.19 or above)

--availability-zone <zone-name>

Select an availability zone for the server. Host and node are optional parameters. Availability zone in the format <zone-name>:<host-name>:<node-name>, <zone-name>::<node-name>, <zone-name>:<host-name> or <zone-name>

--host <host>

Requested host to create servers. (admin only) (supported by –os-compute-api-version 2.74 or above)

--hypervisor-hostname <hypervisor-hostname>

Requested hypervisor hostname to create servers. (admin only) (supported by –os-compute-api-version 2.74 or above)

--server-group <server-group>

Server group to create the server within (this is an alias for ‘–hint group=<server-group-id>’)

--hint <key=value>

Hints for the scheduler

--use-config-drive

Enable config drive.

--no-config-drive

Disable config drive.

--config-drive <config-drive-volume>|True

Deprecated Use specified volume as the config drive, or ‘True’ to use an ephemeral drive. Replaced by ‘–use-config-drive’.

--min <count>

Minimum number of servers to launch (default=1)

--max <count>

Maximum number of servers to launch (default=1)

--tag <tag>

Tags for the server. Specify multiple times to add multiple tags. (supported by –os-compute-api-version 2.52 or above)

--hostname <hostname>

Hostname configured for the server in the metadata service. If unset, a hostname will be automatically generated from the server name. A utility such as cloud-init is required to propagate the hostname in the metadata service to the guest OS itself. (supported by –os-compute-api-version 2.90 or above)

--wait

Wait for build to complete

--trusted-image-cert <trusted-cert-id>

Trusted image certificate IDs used to validate certificates during the image signature verification process. May be specified multiple times to pass multiple trusted image certificate IDs. (supported by –os-compute-api-version 2.63 or above)

server-name

New server name

server evacuate

Evacuate a server to a different host.

This command is used to recreate a server after the host it was on has failed. It can only be used if the compute service that manages the server is down. This command should only be used by an admin after they have confirmed that the instance is not running on the failed host.

If the server instance was created with an ephemeral root disk on non-shared storage the server will be rebuilt using the original glance image preserving the ports and any attached data volumes.

If the server uses boot for volume or has its root disk on shared storage the root disk will be preserved and reused for the evacuated instance on the new host.

openstack server evacuate
    [--wait]
    [--host <host>]
    [--password <password> | --shared-storage]
    <server>
--wait

Wait for evacuation to complete

--host <host>

Set the preferred host on which to rebuild the evacuated server. The host will be validated by the scheduler. (supported by –os-compute-api-version 2.29 or above)

--password <password>

Set the password on the evacuated instance. This option is mutually exclusive with the –shared-storage option. This option requires cloud support.

--shared-storage

Indicate that the instance is on shared storage. This will be auto-calculated with –os-compute-api-version 2.14 and greater and should not be used with later microversions. This option is mutually exclusive with the –password option

server

Server (name or ID)

server delete

Delete server(s)

openstack server delete
    [--force]
    [--all-projects]
    [--wait]
    <server>
    [<server> ...]
--force

Force delete server(s)

--all-projects

Delete server(s) in another project by name (admin only)(can be specified using the ALL_PROJECTS envvar)

--wait

Wait for delete to complete

server

Server(s) to delete (name or ID)

server dump create

Create a dump file in server(s)

Trigger crash dump in server(s) with features like kdump in Linux. It will create a dump file in the server(s) dumping the server(s)’ memory, and also crash the server(s). This is contingent on guest operating system support, and the location of the dump file inside the guest will depend on the exact guest operating system.

This command requires --os-compute-api-version 2.17 or greater.

openstack server dump create <server> [<server> ...]
server

Server(s) to create dump file (name or ID)

server list

List servers

openstack server list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--reservation-id <reservation-id>]
    [--ip <ip-address-regex>]
    [--ip6 <ip-address-regex>]
    [--name <name-regex>]
    [--instance-name <server-name>]
    [--status <status>]
    [--flavor <flavor>]
    [--image <image>]
    [--host <hostname>]
    [--all-projects]
    [--project <project>]
    [--project-domain <project-domain>]
    [--user <user>]
    [--user-domain <user-domain>]
    [--deleted]
    [--availability-zone AVAILABILITY_ZONE]
    [--key-name KEY_NAME]
    [--config-drive | --no-config-drive]
    [--progress PROGRESS]
    [--vm-state <state>]
    [--task-state <state>]
    [--power-state <state>]
    [--long]
    [-n | --name-lookup-one-by-one]
    [--limit <limit>]
    [--marker <marker>]
    [--max-items <max-items>]
    [--changes-before <changes-before>]
    [--changes-since <changes-since>]
    [--locked | --unlocked]
    [--tags <tag>]
    [--not-tags <tag>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--reservation-id <reservation-id>

Only return instances that match the reservation

--ip <ip-address-regex>

Regular expression to match IP addresses

--ip6 <ip-address-regex>

Regular expression to match IPv6 addresses. Note that this option only applies for non-admin users when using --os-compute-api-version 2.5 or greater.

--name <name-regex>

Regular expression to match names

--instance-name <server-name>

Regular expression to match instance name (admin only)

--status <status>

Search by server status

--flavor <flavor>

Search by flavor (name or ID)

--image <image>

Search by image (name or ID)

--host <hostname>

Search by hostname

--all-projects

Include all projects (admin only) (can be specified using the ALL_PROJECTS envvar)

--project <project>

Search by project (admin only) (name or ID)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

--user <user>

Search by user (name or ID) (admin only before microversion 2.83)

--user-domain <user-domain>

Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.

--deleted

Only display deleted servers (admin only)

--availability-zone <AVAILABILITY_ZONE>

Search by availability zone (admin only before microversion 2.83)

--key-name <KEY_NAME>

Search by keypair name (admin only before microversion 2.83)

--config-drive

Only display servers with a config drive attached (admin only before microversion 2.83)

--no-config-drive

Only display servers without a config drive attached (admin only before microversion 2.83)

--progress <PROGRESS>

Search by progress value (%%) (admin only before microversion 2.83)

--vm-state <state>

Search by vm_state value (admin only before microversion 2.83)

--task-state <state>

Search by task_state value (admin only before microversion 2.83)

--power-state <state>

Search by power_state value (admin only before microversion 2.83)

--long

List additional fields in output

-n, --no-name-lookup

Skip flavor and image name lookup. Mutually exclusive with “–name-lookup-one-by-one” option.

--name-lookup-one-by-one

When looking up flavor and image names, look them up one by one as needed instead of all together (default). Mutually exclusive with “–no-name-lookup|-n” option.

--limit <limit>

The maximum number of entries to return per page. If the value exceeds the server-defined maximum, then the server-defined value will be used. Note that this controls the page size, not the total number of entries returned. Use –max-items to limit the total number of entries returned.

--marker <marker>

The first position in the collection to return results from. This should be a value that was returned in a previous request.

--max-items <max-items>

The maximum number of entries to return in total, paging through multiple requests if needed. Use –limit to control the page size.

--changes-before <changes-before>

List only servers changed before a certain point of time. The provided time should be an ISO 8061 formatted time (e.g., 2016-03-05T06:27:59Z). (supported by –os-compute-api-version 2.66 or above)

--changes-since <changes-since>

List only servers changed after a certain point of time. The provided time should be an ISO 8061 formatted time (e.g., 2016-03-04T06:27:59Z).

--locked

Only display locked servers (supported by –os-compute-api-version 2.73 or above)

--unlocked

Only display unlocked servers (supported by –os-compute-api-version 2.73 or above)

--tags <tag>

Only list servers with the specified tag. Specify multiple times to filter on multiple tags. (supported by –os-compute-api-version 2.26 or above)

--not-tags <tag>

Only list servers without the specified tag. Specify multiple times to filter on multiple tags. (supported by –os-compute-api-version 2.26 or above)

server lock

Lock server(s)

A non-admin user will not be able to execute actions.

openstack server lock [--reason <reason>] <server> [<server> ...]
--reason <reason>

Reason for locking the server(s) (supported by –os-compute-api-version 2.73 or above)

server

Server(s) to lock (name or ID)

server migrate

Migrate server to different host.

There are two types of migration operation: a cold migration and a live migration.

A cold migration operation is implemented as a resize operation using the same flavor as the old server. This means that, like resize, migrate works by shutting down the original server, creating a new server using the same flavor and copying the contents of the original disk into a new one. As with resize, the migrate operation is a two-step process for the user: the first step is to perform the migrate, and the second step 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.

By comparison, a live migration operation does not involve shutting the server down, and is a one-step process that does not require a confirmation or revert to finish.

openstack server migrate
    [--live-migration]
    [--host <hostname>]
    [--shared-migration | --block-migration]
    [--disk-overcommit | --no-disk-overcommit]
    [--wait]
    <server>
--live-migration

Live migrate the server; use the --host option to specify a target host for the migration which will be validated by the scheduler

--host <hostname>

Migrate the server to the specified host. (supported with –os-compute-api-version 2.30 or above when used with the –live-migration option) (supported with –os-compute-api-version 2.56 or above when used without the –live-migration option)

--shared-migration

Perform a shared live migration (default before –os-compute-api-version 2.25, auto after)

--block-migration

Perform a block live migration (auto-configured from –os-compute-api-version 2.25)

--disk-overcommit

Allow disk over-commit on the destination host (supported with –os-compute-api-version 2.24 or below)

--no-disk-overcommit

Do not over-commit disk on the destination host (default) (supported with –os-compute-api-version 2.24 or below)

--wait

Wait for migrate to complete

server

Server (name or ID)

server migrate confirm

DEPRECATED: Use ‘server migration confirm’ instead.

openstack server migrate confirm <server>
server

Server (name or ID)

server migrate revert

DEPRECATED: Use ‘server migration revert’ instead.

openstack server migrate revert <server>
server

Server (name or ID)

server pause

Pause server(s)

openstack server pause <server> [<server> ...]
server

Server(s) to pause (name or ID)

server reboot

Perform a hard or soft server reboot

openstack server reboot [--hard | --soft] [--wait] <server>
--hard

Perform a hard reboot

--soft

Perform a soft reboot

--wait

Wait for reboot to complete

server

Server (name or ID)

server rebuild

Rebuild server

openstack server rebuild
    [--image <image>]
    [--name <name>]
    [--password <password>]
    [--property <key=value>]
    [--description <description>]
    [--preserve-ephemeral | --no-preserve-ephemeral]
    [--key-name <key-name> | --no-key-name]
    [--user-data <user-data> | --no-user-data]
    [--trusted-image-cert <trusted-cert-id> | --no-trusted-image-certs]
    [--hostname <hostname>]
    [--reimage-boot-volume]
    [--no-reimage-boot-volume]
    [--wait]
    <server>
--image <image>

Recreate server from the specified image (name or ID). Defaults to the currently used one.

--name <name>

Set the new name of the rebuilt server

--password <password>

Set the password on the rebuilt server. This option requires cloud support.

--property <key=value>

Set a new property on the rebuilt server (repeat option to set multiple values)

--description <description>

Set a new description on the rebuilt server (supported by –os-compute-api-version 2.19 or above)

--preserve-ephemeral

Preserve the default ephemeral storage partition on rebuild.

--no-preserve-ephemeral

Do not preserve the default ephemeral storage partition on rebuild.

--key-name <key-name>

Set the key name of key pair on the rebuilt server. Cannot be specified with the –key-unset option. (supported by –os-compute-api-version 2.54 or above)

--no-key-name

Unset the key name of key pair on the rebuilt server. Cannot be specified with the –key-name option. (supported by –os-compute-api-version 2.54 or above)

--user-data <user-data>

Add a new user data file to the rebuilt server. Cannot be specified with the –no-user-data option. (supported by –os-compute-api-version 2.57 or above)

--no-user-data

Remove existing user data when rebuilding server. Cannot be specified with the –user-data option. (supported by –os-compute-api-version 2.57 or above)

--trusted-image-cert <trusted-cert-id>

Trusted image certificate IDs used to validate certificates during the image signature verification process. May be specified multiple times to pass multiple trusted image certificate IDs. Cannot be specified with the –no-trusted-certs option. (supported by –os-compute-api-version 2.63 or above)

--no-trusted-image-certs

Remove any existing trusted image certificates from the server. Cannot be specified with the –trusted-certs option. (supported by –os-compute-api-version 2.63 or above)

--hostname <hostname>

Hostname configured for the server in the metadata service. A separate utility running in the guest is required to propagate changes to this value to the guest OS itself. (supported by –os-compute-api-version 2.90 or above)

--reimage-boot-volume

Rebuild a volume-backed server. This will wipe the root volume data and overwrite it with the provided image. Defaults to False. (supported by –os-compute-api-version 2.93 or above)

--no-reimage-boot-volume

Do not rebuild a volume-backed server. (supported by –os-compute-api-version 2.93 or above)

--wait

Wait for rebuild to complete

server

Server (name or ID)

server remove fixed ip

Remove fixed IP address from server

openstack server remove fixed ip <server> <ip-address>
server

Server to remove the fixed IP address from (name or ID)

ip-address

Fixed IP address to remove from the server (IP only)

server remove floating ip

Remove floating IP address from server

openstack server remove floating ip <server> <ip-address>
server

Server to remove the floating IP address from (name or ID)

ip-address

Floating IP address to remove from server (IP only)

server remove network

Remove all ports of a network from server

openstack server remove network <server> <network>
server

Server to remove the port from (name or ID)

network

Network to remove from the server (name or ID)

server remove port

Remove port from server

openstack server remove port <server> <port>
server

Server to remove the port from (name or ID)

port

Port to remove from the server (name or ID)

server remove security group

Remove security group from server

openstack server remove security group
    <server>
    <security-group>
    [<security-group> ...]
server

Server (name or ID)

security-group

Security group(s) to remove from server (name or ID) (repeat option to remove multiple groups)

server remove share

Remove a share from a server.

Requires --os-compute-api-version 2.97 or later.

openstack server remove share <server> <share>
server

Server to remove share from (name or ID)

share

Share to remove (name or ID)

server remove volume

Remove volume from server.

Specify --os-compute-api-version 2.20 or higher to remove a volume from a server with status SHELVED or SHELVED_OFFLOADED.

openstack server remove volume <server> <volume>
server

Server (name or ID)

volume

Volume to remove (name or ID)

server rescue

Put server in rescue mode.

Specify --os-compute-api-version 2.87 or higher to rescue a server booted from a volume.

openstack server rescue
    [--image <image>]
    [--password <password>]
    <server>
--image <image>

Image (name or ID) to use for the rescue mode (defaults to the currently used one)

--password <password>

Set the password on the rescued instance (requires cloud support)

server

Server (name or ID)

server resize

Scale server to a new flavor.

A resize operation is implemented by creating a new server and copying the contents of the original disk into a new one. It is a two-step process for the user: the first step is to perform the resize, and the second step 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.

openstack server resize
    (--flavor <flavor> | --confirm | --revert)
    [--wait]
    <server>
--flavor <flavor>

Resize server to specified flavor

--confirm

Deprecated Confirm server resize is complete. Replaced by the ‘openstack server resize confirm’ and ‘openstack server migration confirm’ commands

--revert

Deprecated Restore server state before resize. Replaced by the ‘openstack server resize revert’ and ‘openstack server migration revert’ commands

--wait

Wait for resize to complete

server

Server (name or ID)

server resize confirm

Confirm server resize.

Confirm (verify) success of resize operation and release the old server.

openstack server resize confirm <server>
server

Server (name or ID)

server resize revert

Revert server resize.

Revert the resize operation. Release the new server and restart the old one.

openstack server resize revert <server>
server

Server (name or ID)

server restore

Restore server(s)

openstack server restore <server> [<server> ...]
server

Server(s) to restore (name or ID)

server resume

Resume server(s)

openstack server resume <server> [<server> ...]
server

Server(s) to resume (name or ID)

server set

Set server properties

openstack server set
    [--name <new-name>]
    [--password PASSWORD | --no-password]
    [--property <key=value>]
    [--auto-approve]
    [--state <state>]
    [--description <description>]
    [--tag <tag>]
    [--hostname <hostname>]
    [--pinned-availability-zone <availability-zone>]
    <server>
--name <new-name>

New server name

--password <PASSWORD>

Set the server password. This option requires cloud support.

--no-password

Clear the admin password for the server from the metadata service; note that this action does not actually change the server password

--property <key=value>

Property to add/change for this server (repeat option to set multiple properties)

--auto-approve

Allow server state override without asking for confirmation

--state <state>

New server state.**WARNING** Resetting the state is intended to work around servers stuck in an intermediate state, such as deleting. If the server is in an error state then this is almost never the correct command to run and you should prefer hard reboot where possible. In particular, if the server is in an error state due to a move operation, setting the state can result in instances that are no longer usable. Proceed with caution. (admin only)

--description <description>

New server description (supported by –os-compute-api-version 2.19 or above)

--tag <tag>

Tag for the server. Specify multiple times to add multiple tags. (supported by –os-compute-api-version 2.26 or above)

--hostname <hostname>

Hostname configured for the server in the metadata service. A separate utility running in the guest is required to propagate changes to this value to the guest OS itself. (supported by –os-compute-api-version 2.90 or above)

--pinned-availability-zone <availability-zone>

Pin the server to the given availability zone. The server must currently be in the given zone. To unpin, use “server unset –pinned-availability-zone” (supported by –os-compute-api-version 2.104 or above)

server

Server (name or ID)

server shelve

Shelve and optionally offload server(s).

Shelving a server creates a snapshot of the server and stores this snapshot before shutting down the server. This shelved server can then be offloaded or deleted from the host, freeing up remaining resources on the host, such as network interfaces. Shelved servers can be unshelved, restoring the server from the snapshot. Shelving is therefore useful where users wish to retain the UUID and IP of a server, without utilizing other resources or disks.

Most clouds are configured to automatically offload shelved servers immediately or after a small delay. For clouds where this is not configured, or where the delay is larger, offloading can be manually specified. This is an admin-only operation by default.

openstack server shelve [--offload] [--wait] <server> [<server> ...]
--offload

Remove the shelved server(s) from the host (admin only). Invoking this option on an unshelved server(s) will result in the server being shelved first

--wait

Wait for shelve and/or offload operation to complete

server

Server(s) to shelve (name or ID)

server show

Show server details.

Specify --os-compute-api-version 2.47 or higher to see the embedded flavor information for the server.

openstack server show [--diagnostics | --topology] <server>
--diagnostics

Display server diagnostics information

--topology

Include topology information in the output (supported by –os-compute-api-version 2.78 or above)

server

Server (name or ID)

server ssh

SSH to server

openstack server ssh
    [-4 | -6]
    [--public | --private | --address-type <address-type>]
    <server>
    [-- <standard ssh args> ...]
-4

Use only IPv4 addresses

-6

Use only IPv6 addresses

--public

Use public IP address

--private

Use private IP address

--address-type <address-type>

Use other IP address (public, private, etc)

server

Server (name or ID)

-- <standard ssh args

Any argument or option that ssh allows. Use – once between openstackclient args and SSH args.

server start

Start server(s)

openstack server start [--all-projects] <server> [<server> ...]
--all-projects

Start server(s) in another project by name (admin only) (can be specified using the ALL_PROJECTS envvar)

server

Server(s) to start (name or ID)

server stop

Stop server(s)

openstack server stop [--all-projects] <server> [<server> ...]
--all-projects

Stop server(s) in another project by name (admin only) (can be specified using the ALL_PROJECTS envvar)

server

Server(s) to stop (name or ID)

server suspend

Suspend server(s)

openstack server suspend <server> [<server> ...]
server

Server(s) to suspend (name or ID)

server unlock

Unlock server(s)

openstack server unlock <server> [<server> ...]
server

Server(s) to unlock (name or ID)

server unpause

Unpause server(s)

openstack server unpause <server> [<server> ...]
server

Server(s) to unpause (name or ID)

server unrescue

Restore server from rescue mode

openstack server unrescue <server>
server

Server (name or ID)

server unset

Unset server properties and tags

openstack server unset
    [--property <key> | --all-properties]
    [--description]
    [--tag <tag> | --all-tags]
    [--pinned-availability-zone]
    <server>
--property <key>

Property key to remove from server (repeat option to remove multiple values)

--all-properties

Remove all properties

--description

Unset server description (supported by –os-compute-api-version 2.19 or above)

--tag <tag>

Tag to remove from the server. Specify multiple times to remove multiple tags. (supported by –os-compute-api-version 2.26 or above)

--all-tags

Remove all tags (supported by –os-compute-api-version 2.26 or above)

--pinned-availability-zone

Unpin the server from its availability zone (supported by –os-compute-api-version 2.104 or above)

server

Server (name or ID)

server unshelve

Unshelve server(s)

openstack server unshelve
    [--availability-zone AVAILABILITY_ZONE | --no-availability-zone]
    [--host HOST]
    [--wait]
    <server>
    [<server> ...]
--availability-zone <AVAILABILITY_ZONE>

Name of the availability zone in which to unshelve a SHELVED_OFFLOADED server (supported by –os-compute-api-version 2.77 or above)

--no-availability-zone

Unpin the availability zone of a SHELVED_OFFLOADED server. Server will be unshelved on a host without availability zone constraint (supported by –os-compute-api-version 2.91 or above)

--host <HOST>

Name of the destination host in which to unshelve a SHELVED_OFFLOADED server (supported by –os-compute-api-version 2.91 or above)

--wait

Wait for unshelve operation to complete

server

Server(s) to unshelve (name or ID)

usage

usage list

List resource usage per project

openstack usage list
    [--sort-column SORT_COLUMN]
    [--sort-ascending | --sort-descending]
    [--start <start>]
    [--end <end>]
--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

sort the column(s) in ascending order

--sort-descending

sort the column(s) in descending order

--start <start>

Usage range start date, ex 2012-01-20 (default: 4 weeks ago)

--end <end>

Usage range end date, ex 2012-01-20 (default: tomorrow)

usage show

Show resource usage for a single project

openstack usage show
    [--project <project>]
    [--project-domain <project-domain>]
    [--start <start>]
    [--end <end>]
--project <project>

Name or ID of project to show usage for

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

--start <start>

Usage range start date, ex 2012-01-20 (default: 4 weeks ago)

--end <end>

Usage range end date, ex 2012-01-20 (default: tomorrow)