server

Compute v2

server add fixed ip

Add fixed IP address to server

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

Requested fixed IP address

server

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

network

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

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

server add network

Add network to server

openstack server add network <server> <network>
server

Server to add the network to (name or ID)

network

Network to add to the server (name or ID)

This command is provided by the python-openstackclient plugin.

server add port

Add port to server

openstack server add port <server> <port>
server

Server to add the port to (name or ID)

port

Port to add to the server (name or ID)

This command is provided by the python-openstackclient plugin.

server add security group

Add security group to server

openstack server add security group <server> <group>
server

Server (name or ID)

group

Security group to add (name or ID)

This command is provided by the python-openstackclient plugin.

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>]
    [--enable-delete-on-termination | --disable-delete-on-termination]
    <server>
    <volume>
--device <device>

Server internal device name for volume

--enable-delete-on-termination

Specify if the attached volume should be deleted when the server is destroyed. (Supported with --os-compute-api-version 2.79 or greater.)

--disable-delete-on-termination

Specify if the attached volume should not be deleted when the server is destroyed. (Supported with --os-compute-api-version 2.79 or greater.)

server

Server (name or ID)

volume

Volume to add (name or ID)

This command is provided by the python-openstackclient plugin.

server create

Create a new server

openstack server create
    (--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>
--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

server-name

New server name

This command is provided by the python-openstackclient plugin.

server delete

Delete server(s)

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

Wait for delete to complete

server

Server(s) to delete (name or ID)

This command is provided by the python-openstackclient plugin.

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.

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

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

This command is provided by the python-openstackclient plugin.

server list

List servers

openstack server list
    [--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]
--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

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

This command is provided by the python-openstackclient plugin.

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

server

Server(s) to lock (name or ID)

This command is provided by the python-openstackclient plugin.

server migrate

Migrate server to different host.

A migrate operation is implemented as a resize operation using the same flavor as the old server. This means that, like resize, migrate works by 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.

openstack server migrate
    [--live-migration]
    [--live <hostname> | --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.

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

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server migrate confirm

Confirm server migrate.

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

openstack server migrate confirm <server>
server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server migrate revert

Revert server migrate.

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

openstack server migrate revert <server>
server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server pause

Pause server(s)

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

Server(s) to pause (name or ID)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

server rebuild

Rebuild server

openstack server rebuild
    [--image <image>]
    [--password <password>]
    [--property <key=value>]
    [--description <description>]
    [--wait]
    [--key-name <key-name> | --key-unset]
    <server>
--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’)

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

server remove security group

Remove security group from server

openstack server remove security group <server> <group>
server

Name or ID of server to use

group

Name or ID of security group to remove from server

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

server rescue

Put server in rescue mode

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

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

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

Confirm server resize is complete

--revert

Restore server state before resize

--wait

Wait for resize to complete

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

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)

This command is provided by the python-openstackclient plugin.

server restore

Restore server(s)

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

Server(s) to restore (name or ID)

This command is provided by the python-openstackclient plugin.

server resume

Resume server(s)

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

Server(s) to resume (name or ID)

This command is provided by the python-openstackclient plugin.

server set

Set server properties

openstack server set
    [--name <new-name>]
    [--root-password]
    [--property <key=value>]
    [--state <state>]
    [--description <description>]
    <server>
--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)

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server shelve

Shelve server(s)

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

Server(s) to shelve (name or ID)

This command is provided by the python-openstackclient plugin.

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] <server>
--diagnostics

Display server diagnostics information

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server ssh

SSH to server

openstack server ssh
    [--login <login-name>]
    [--port <port>]
    [--identity <keyfile>]
    [--option <config-options>]
    [-4 | -6]
    [--public | --private | --address-type <address-type>]
    <server>
--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)

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server start

Start server(s).

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

Server(s) to start (name or ID)

This command is provided by the python-openstackclient plugin.

server stop

Stop server(s).

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

Server(s) to stop (name or ID)

This command is provided by the python-openstackclient plugin.

server suspend

Suspend server(s)

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

Server(s) to suspend (name or ID)

This command is provided by the python-openstackclient plugin.

server unlock

Unlock server(s)

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

Server(s) to unlock (name or ID)

This command is provided by the python-openstackclient plugin.

server unpause

Unpause server(s)

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

Server(s) to unpause (name or ID)

This command is provided by the python-openstackclient plugin.

server unrescue

Restore server from rescue mode

openstack server unrescue <server>
server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server unset

Unset server properties

openstack server unset [--property <key>] [--description] <server>
--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)

server

Server (name or ID)

This command is provided by the python-openstackclient plugin.

server unshelve

Unshelve server(s)

openstack server unshelve
    [--availability-zone AVAILABILITY_ZONE]
    <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)

server

Server(s) to unshelve (name or ID)

This command is provided by the python-openstackclient plugin.