Search

Chapter 70. server

download PDF

This chapter describes the commands under the server command.

70.1. server add fixed ip

Add fixed IP address to server

Usage:

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

Table 70.1. Positional arguments
ValueSummary

<server>

Server to receive the fixed ip address (name or id)

<network>

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

Table 70.2. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--fixed-ip-address <ip-address>

Requested fixed ip address

70.2. server add floating ip

Add floating IP address to server

Usage:

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

Table 70.3. Positional arguments
ValueSummary

<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)

Table 70.4. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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

70.3. server add network

Add network to server

Usage:

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

Table 70.5. Positional arguments
ValueSummary

<server>

Server to add the network to (name or id)

<network>

Network to add to the server (name or id)

Table 70.6. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.4. server add port

Add port to server

Usage:

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

Table 70.7. Positional arguments
ValueSummary

<server>

Server to add the port to (name or id)

<port>

Port to add to the server (name or id)

Table 70.8. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.5. server add security group

Add security group to server

Usage:

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

Table 70.9. Positional arguments
ValueSummary

<server>

Server (name or id)

<group>

Security group to add (name or id)

Table 70.10. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.6. 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``.

Usage:

openstack server add volume [-h] [--device <device>] <server> <volume>

Table 70.11. Positional arguments
ValueSummary

<server>

Server (name or id)

<volume>

Volume to add (name or id)

Table 70.12. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--device <device>

Server internal device name for volume

70.7. server backup create

Create a server backup image

Usage:

openstack server backup create [-h] [-f {json,shell,table,value,yaml}]
                                      [-c COLUMN] [--noindent]
                                      [--prefix PREFIX]
                                      [--max-width <integer>] [--fit-width]
                                      [--print-empty] [--name <image-name>]
                                      [--type <backup-type>]
                                      [--rotate <count>] [--wait]
                                      <server>

Table 70.13. Positional arguments
ValueSummary

<server>

Server to back up (name or id)

Table 70.14. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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

Table 70.15. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.16. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.17. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.18. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.8. server create

Create a new server

Usage:

openstack server create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--noindent] [--prefix PREFIX]
                               [--max-width <integer>] [--fit-width]
                               [--print-empty]
                               (--image <image> | --image-property <key=value> | --volume <volume>)
                               --flavor <flavor>
                               [--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>]
                               [--boot-from-volume <volume-size>]
                               [--block-device-mapping <dev-name=mapping>]
                               [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid,auto,none>]
                               [--network <network>] [--port <port>]
                               [--hint <key=value>]
                               [--config-drive <config-drive-volume>|True]
                               [--min <count>] [--max <count>] [--wait]
                               <server-name>

Table 70.19. Positional arguments
ValueSummary

<server-name>

New server name

Table 70.20. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--image <image>

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

--image-property <key=value>

Image property to be matched

--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.

--flavor <flavor>

Create server with this flavor (name or id)

--security-group <security-group>

Security group to assign to this server (name or id) (repeat option to set multiple groups)

--key-name <key-name>

Keypair to inject into this server (optional extension)

--property <key=value>

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

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

File to inject into image before boot (repeat option to set multiple files)

--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 <host>

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

--hypervisor-hostname <hypervisor-hostname>

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

--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`` option.

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

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) (optional extension)

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

Create a nic on the server. specify option multiple times to create multiple NICs. Either net-id or port- id must be provided, but not both. net-id: attach NIC to network with this UUID, port-id: attach NIC to port with this UUID, v4-fixed-ip: IPv4 fixed address for NIC (optional), v6-fixed-ip: IPv6 fixed address for NIC (optional), none: (v2.37+) no network is attached, auto: (v2.37+) the compute service will automatically allocate a network. Specifying a --nic of auto or none cannot be used with any other --nic value.

--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.

--hint <key=value>

Hints for the scheduler (optional extension)

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

Use specified volume as the config drive, or true to use an ephemeral drive

--min <count>

Minimum number of servers to launch (default=1)

--max <count>

Maximum number of servers to launch (default=1)

--wait

Wait for build to complete

Table 70.21. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.22. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.23. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.24. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.9. server delete

Delete server(s)

Usage:

openstack server delete [-h] [--wait] <server> [<server> ...]

Table 70.25. Positional arguments
ValueSummary

<server>

Server(s) to delete (name or id)

Table 70.26. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--wait

Wait for delete to complete

70.10. 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). OSC sees the dump file (server dump) as a kind of resource. This command requires ``--os-compute-api- version`` 2.17 or greater.

Usage:

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

Table 70.27. Positional arguments
ValueSummary

<server>

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

Table 70.28. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.11. 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.

Usage:

openstack server event list [-h] [-f {csv,json,table,value,yaml}]
                                   [-c COLUMN]
                                   [--quote {all,minimal,none,nonnumeric}]
                                   [--noindent] [--max-width <integer>]
                                   [--fit-width] [--print-empty]
                                   [--sort-column SORT_COLUMN] [--long]
                                   <server>

Table 70.29. Positional arguments
ValueSummary

<server>

Server to list events (name or id)

Table 70.30. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--long

List additional fields in output

Table 70.31. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

--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

Table 70.32. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Table 70.33. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.34. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.12. 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.

Usage:

openstack server event show [-h] [-f {json,shell,table,value,yaml}]
                                   [-c COLUMN] [--noindent] [--prefix PREFIX]
                                   [--max-width <integer>] [--fit-width]
                                   [--print-empty]
                                   <server> <request-id>

Table 70.35. Positional arguments
ValueSummary

<server>

Server to show event details (name or id)

<request-id>

Request id of the event to show (id only)

Table 70.36. Command arguments
ValueSummary

-h, --help

Show this help message and exit

Table 70.37. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.38. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.39. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.40. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.13. server group create

Create a new server group.

Usage:

openstack server group create [-h] [-f {json,shell,table,value,yaml}]
                                     [-c COLUMN] [--noindent]
                                     [--prefix PREFIX] [--max-width <integer>]
                                     [--fit-width] [--print-empty]
                                     [--policy <policy>] [--rule <key=value>]
                                     <name>

Table 70.41. Positional arguments
ValueSummary

<name>

New server group name

Table 70.42. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--policy <policy>

Add a policy to <name> (affinity or anti-affinity, defaults to affinity). 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.

Table 70.43. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.44. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.45. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.46. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.14. server group delete

Delete existing server group(s).

Usage:

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

Table 70.47. Positional arguments
ValueSummary

<server-group>

Server group(s) to delete (name or id)

Table 70.48. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.15. server group list

List all server groups.

Usage:

openstack server group list [-h] [-f {csv,json,table,value,yaml}]
                                   [-c COLUMN]
                                   [--quote {all,minimal,none,nonnumeric}]
                                   [--noindent] [--max-width <integer>]
                                   [--fit-width] [--print-empty]
                                   [--sort-column SORT_COLUMN]
                                   [--all-projects] [--long]

Table 70.49. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--all-projects

Display information from all projects (admin only)

--long

List additional fields in output

Table 70.50. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

--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

Table 70.51. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Table 70.52. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.53. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.16. server group show

Display server group details.

Usage:

openstack server group show [-h] [-f {json,shell,table,value,yaml}]
                                   [-c COLUMN] [--noindent] [--prefix PREFIX]
                                   [--max-width <integer>] [--fit-width]
                                   [--print-empty]
                                   <server-group>

Table 70.54. Positional arguments
ValueSummary

<server-group>

Server group to display (name or id)

Table 70.55. Command arguments
ValueSummary

-h, --help

Show this help message and exit

Table 70.56. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.57. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.58. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.59. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.17. server image create

Create a new server disk image from an existing server

Usage:

openstack server image create [-h] [-f {json,shell,table,value,yaml}]
                                     [-c COLUMN] [--noindent]
                                     [--prefix PREFIX] [--max-width <integer>]
                                     [--fit-width] [--print-empty]
                                     [--name <image-name>] [--wait]
                                     <server>

Table 70.60. Positional arguments
ValueSummary

<server>

Server to create image (name or id)

Table 70.61. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--name <image-name>

Name of new disk image (default: server name)

--wait

Wait for operation to complete

Table 70.62. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.63. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.64. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.65. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.18. server list

List servers

Usage:

openstack server list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
                             [--quote {all,minimal,none,nonnumeric}]
                             [--noindent] [--max-width <integer>]
                             [--fit-width] [--print-empty]
                             [--sort-column SORT_COLUMN]
                             [--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>]
                             [--long] [-n | --name-lookup-one-by-one]
                             [--marker <server>] [--limit <num-servers>]
                             [--deleted] [--changes-before <changes-before>]
                             [--changes-since <changes-since>]
                             [--locked | --unlocked]

Table 70.66. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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)

--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 (admin only) (name or id)

--user-domain <user-domain>

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

--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 upone by one as needed instead of all together (default). Mutually exclusive with "--no-name- lookup|-n" option.

--marker <server>

The last server of the previous page. display list of servers after marker. Display all servers if not specified. When used with ``--deleted``, the marker must be an ID, otherwise a name or ID can be used.

--limit <num-servers>

Maximum number of servers to display. if limit equals -1, all servers will be displayed. If limit is greater than osapi_max_limit option of Nova API, osapi_max_limit will be used instead.

--deleted

Only display deleted servers (admin only).

--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 API versions 2.66 - 2.latest)

--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. requires ``--os-compute- api-version`` 2.73 or greater.

--unlocked

Only display unlocked servers. requires ``--os- compute-api-version`` 2.73 or greater.

Table 70.67. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

--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

Table 70.68. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Table 70.69. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.70. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.19. server lock

Lock server(s). A non-admin user will not be able to execute actions

Usage:

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

Table 70.71. Positional arguments
ValueSummary

<server>

Server(s) to lock (name or id)

Table 70.72. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--reason <reason>

Reason for locking the server(s). requires ``--os- compute-api-version`` 2.73 or greater.

70.20. server migrate

Migrate server to different host

Usage:

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

Table 70.73. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.74. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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.

--live <hostname>

deprecated this option is problematic in that it requires a host and prior to compute API version 2.30, specifying a host during live migration will bypass validation by the scheduler which could result in failures to actually migrate the server to the specified host or over-subscribe the host. Use the ``--live-migration`` option instead. If both this option and ``--live-migration`` are used, ``--live- migration`` takes priority.

--host <hostname>

Migrate the server to the specified host. requires ``--os-compute-api-version`` 2.30 or greater when used with the ``--live-migration`` option, otherwise requires ``--os-compute-api-version`` 2.56 or greater.

--shared-migration

Perform a shared live migration (default)

--block-migration

Perform a block live migration

--disk-overcommit

Allow disk over-commit on the destination host

--no-disk-overcommit

Do not over-commit disk on the destination host (default)

--wait

Wait for migrate to complete

70.21. server pause

Pause server(s)

Usage:

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

Table 70.75. Positional arguments
ValueSummary

<server>

Server(s) to pause (name or id)

Table 70.76. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.22. server reboot

Perform a hard or soft server reboot

Usage:

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

Table 70.77. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.78. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--hard

Perform a hard reboot

--soft

Perform a soft reboot

--wait

Wait for reboot to complete

70.23. server rebuild

Rebuild server

Usage:

openstack server rebuild [-h] [-f {json,shell,table,value,yaml}]
                                [-c COLUMN] [--noindent] [--prefix PREFIX]
                                [--max-width <integer>] [--fit-width]
                                [--print-empty] [--image <image>]
                                [--password <password>]
                                [--property <key=value>]
                                [--description <description>] [--wait]
                                [--key-name <key-name> | --key-unset]
                                <server>

Table 70.79. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.80. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--image <image>

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

--password <password>

Set the password on the rebuilt instance

--property <key=value>

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

--description <description>

New description for the server (supported by --os- compute-api-version 2.19 or above

--wait

Wait for rebuild to complete

--key-name <key-name>

Set the key name of key pair on the rebuilt instance. Cannot be specified with the --key-unset option. (Supported by API versions 2.54 - 2.latest)

--key-unset

Unset the key name of key pair on the rebuilt instance. Cannot be specified with the --key-name option. (Supported by API versions 2.54 - 2.latest)

Table 70.81. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.82. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.83. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.84. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.24. server remove fixed ip

Remove fixed IP address from server

Usage:

openstack server remove fixed ip [-h] <server> <ip-address>

Table 70.85. Positional arguments
ValueSummary

<server>

Server to remove the fixed ip address from (name or id)

<ip-address>

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

Table 70.86. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.25. server remove floating ip

Remove floating IP address from server

Usage:

openstack server remove floating ip [-h] <server> <ip-address>

Table 70.87. Positional arguments
ValueSummary

<server>

Server to remove the floating ip address from (name or id)

<ip-address>

Floating ip address to remove from server (ip only)

Table 70.88. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.26. server remove network

Remove all ports of a network from server

Usage:

openstack server remove network [-h] <server> <network>

Table 70.89. Positional arguments
ValueSummary

<server>

Server to remove the port from (name or id)

<network>

Network to remove from the server (name or id)

Table 70.90. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.27. server remove port

Remove port from server

Usage:

openstack server remove port [-h] <server> <port>

Table 70.91. Positional arguments
ValueSummary

<server>

Server to remove the port from (name or id)

<port>

Port to remove from the server (name or id)

Table 70.92. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.28. server remove security group

Remove security group from server

Usage:

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

Table 70.93. Positional arguments
ValueSummary

<server>

Name or id of server to use

<group>

Name or id of security group to remove from server

Table 70.94. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.29. 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``.

Usage:

openstack server remove volume [-h] <server> <volume>

Table 70.95. Positional arguments
ValueSummary

<server>

Server (name or id)

<volume>

Volume to remove (name or id)

Table 70.96. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.30. server rescue

Put server in rescue mode

Usage:

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

Table 70.97. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.98. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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

70.31. server resize confirm

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

Usage:

openstack server resize confirm [-h] <server>

Table 70.99. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.100. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.32. server resize revert

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

Usage:

openstack server resize revert [-h] <server>

Table 70.101. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.102. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.33. 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 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.

Usage:

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

Table 70.103. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.104. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--flavor <flavor>

Resize server to specified flavor

--confirm

Confirm server resize is complete

--revert

Restore server state before resize

--wait

Wait for resize to complete

70.34. server restore

Restore server(s)

Usage:

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

Table 70.105. Positional arguments
ValueSummary

<server>

Server(s) to restore (name or id)

Table 70.106. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.35. server resume

Resume server(s)

Usage:

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

Table 70.107. Positional arguments
ValueSummary

<server>

Server(s) to resume (name or id)

Table 70.108. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.36. server set

Set server properties

Usage:

openstack server set [-h] [--name <new-name>] [--root-password]
                            [--property <key=value>] [--state <state>]
                            [--description <description>]
                            <server>

Table 70.109. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.110. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--name <new-name>

New server name

--root-password

Set new root password (interactive only)

--property <key=value>

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

--state <state>

New server state (valid value: active, error)

--description <description>

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

70.37. server shelve

Shelve server(s)

Usage:

openstack server shelve [-h] <server> [<server> ...]

Table 70.111. Positional arguments
ValueSummary

<server>

Server(s) to shelve (name or id)

Table 70.112. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.38. server show

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

Usage:

openstack server show [-h] [-f {json,shell,table,value,yaml}]
                             [-c COLUMN] [--noindent] [--prefix PREFIX]
                             [--max-width <integer>] [--fit-width]
                             [--print-empty] [--diagnostics]
                             <server>

Table 70.113. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.114. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--diagnostics

Display server diagnostics information

Table 70.115. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated

Table 70.116. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 70.117. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 70.118. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

70.39. server ssh

SSH to server

Usage:

openstack server ssh [-h] [--login <login-name>] [--port <port>]
                            [--identity <keyfile>] [--option <config-options>]
                            [-4 | -6]
                            [--public | --private | --address-type <address-type>]
                            <server>

Table 70.119. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.120. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--login <login-name>

Login name (ssh -l option)

--port <port>

Destination port (ssh -p option)

--identity <keyfile>

Private key file (ssh -i option)

--option <config-options>

Options in ssh_config(5) format (ssh -o option)

-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)

70.40. server start

Start server(s).

Usage:

openstack server start [-h] <server> [<server> ...]

Table 70.121. Positional arguments
ValueSummary

<server>

Server(s) to start (name or id)

Table 70.122. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.41. server stop

Stop server(s).

Usage:

openstack server stop [-h] <server> [<server> ...]

Table 70.123. Positional arguments
ValueSummary

<server>

Server(s) to stop (name or id)

Table 70.124. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.42. server suspend

Suspend server(s)

Usage:

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

Table 70.125. Positional arguments
ValueSummary

<server>

Server(s) to suspend (name or id)

Table 70.126. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.43. server unlock

Unlock server(s)

Usage:

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

Table 70.127. Positional arguments
ValueSummary

<server>

Server(s) to unlock (name or id)

Table 70.128. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.44. server unpause

Unpause server(s)

Usage:

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

Table 70.129. Positional arguments
ValueSummary

<server>

Server(s) to unpause (name or id)

Table 70.130. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.45. server unrescue

Restore server from rescue mode

Usage:

openstack server unrescue [-h] <server>

Table 70.131. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.132. Command arguments
ValueSummary

-h, --help

Show this help message and exit

70.46. server unset

Unset server properties

Usage:

openstack server unset [-h] [--property <key>] [--description] <server>

Table 70.133. Positional arguments
ValueSummary

<server>

Server (name or id)

Table 70.134. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--property <key>

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

--description

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

70.47. server unshelve

Unshelve server(s)

Usage:

openstack server unshelve [-h] [--availability-zone AVAILABILITY_ZONE]
                                 <server> [<server> ...]

Table 70.135. Positional arguments
ValueSummary

<server>

Server(s) to unshelve (name or id)

Table 70.136. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--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)

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.