python-openstackclient/doc/source/command-objects/server.rst
Pedro Navarro ee062922d1 Improving the help of the lock command.
The lock command allows you to block the actions
on the server for the non-admin users. Improving
the help so that api users understands better
what locking a server implies.

Change-Id: I925c946751602dc0f6bd1d31b514bc20bca585fa
Closes-Bug: #1366279
2015-02-01 13:15:49 -08:00

11 KiB

server

Compute v2

server add security group

Add security group to server

server add security group

os server add security group
    <server>
    <group>

<server>

Server (name or ID)

<group>

Security group to add (name or ID)

server add volume

Add volume to server

server add volume

os server add volume
    [--device <device>]
    <server>
    <volume>

--device <device>

Server internal device name for volume

<server>

Server (name or ID)

<volume>

Volume to add (name or ID)

server create

Create a new server

server create

os server create
    --image <image> | --volume <volume>
    --flavor <flavor>
    [--security-group <security-group-list> [...] ]
    [--key-name <key-name>]
    [--property <key=value> [...] ]
    [--file <dest-filename=source-filename>] [...] ]
    [--user-data <user-data>]
    [--availability-zone <zone-name>]
    [--block-device-mapping <dev-name=mapping> [...] ]
    [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr> [...] ]
    [--hint <key=value> [...] ]
    [--config-drive <value>|True ]
    [--min <count>]
    [--max <count>]
    [--wait]
    <server-name>

--image <image>

Create server from this image

--volume <volume>

Create server from this volume

--flavor <flavor>

Create server with this flavor

--security-group <security-group-name>

Security group to assign to this server (repeat for multiple groups)

--key-name <key-name>

Keypair to inject into this server (optional extension)

--property <key=value>

Set a property on this server (repeat for multiple values)

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

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

--user-data <user-data>

User data file to serve from the metadata server

--availability-zone <zone-name>

Select an availability zone for the server

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

Map block devices; map is <id>:<type>:<size(GB)>:<delete_on_terminate> (optional extension)

--nic <nic-config-string>

Specify NIC configuration (optional extension)

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

server delete

Delete server(s)

server delete

os server delete
    <server> [<server> ...]

<server>

Server to delete (name or ID)

server list

List servers

os server list
    [--reservation-id <reservation-id>]
    [--ip <ip-address-regex>]
    [--ip6 <ip6-address-regex>]
    [--name <name-regex>]
    [--instance-name <instance-name-regex>]
    [--status <status>]
    [--flavor <flavor>]
    [--image <image>]
    [--host <hostname>]
    [--all-projects]
    [--long]

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

--name <name-regex>

Regular expression to match names

--instance-name <server-name-regex>

Regular expression to match instance name (admin only)

--status <status>

Search by server status

--flavor <flavor>

Search by flavor ID

--image <image>

Search by image ID

--host <hostname>

Search by hostname

--all-projects

Include all projects (admin only)

--long

List additional fields in output

server lock

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

server lock

os server lock
    <server>

<server>

Server (name or ID)

server migrate

Migrate server to different host

server migrate

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

--live <hostname>

Target hostname

--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 resize to complete

<server>

Server to migrate (name or ID)

server pause

Pause server

server pause

os server pause
    <server>

<server>

Server (name or ID)

server reboot

Perform a hard or soft server reboot

server reboot

os 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

server rebuild

os server rebuild
    --image <image>
    [--password <password>]
    [--wait]
    <server>

--image <image>

Recreate server from this image

--password <password>

Set the password on the rebuilt instance

--wait

Wait for rebuild to complete

<server>

Server (name or ID)

server remove security group

Remove security group from server

server remove security group

os 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

server remove volume

Remove volume from server

server remove volume

os server remove volume
    <server>
    <volume>

<server>

Server (name or ID)

<volume>

Volume to remove (name or ID)

server rescue

Put server in rescue mode

server rescure

os server rescue
    <server>

<server>

Server (name or ID)

server resize

Scale server to a new flavor

server resize

os server resize
    --flavor <flavor>
    [--wait]
    <server>

os server resize
    --verify | --revert
    <server>

--flavor <flavor>

Resize server to specified flavor

--verify

Verify server resize is complete

--revert

Restore server state before resize

--wait

Wait for resize to complete

<server>

Server (name or ID)

A resize operation is implemented by creating a new server and copying the contents of the original disk into a new one. It is also a two-step process for the user: the first is to perform the resize, the second is to either confirm (verify) success and release the old server, or to declare a revert to release the new server and restart the old one.

server resume

Resume server

server resume

os server resume
    <server>

<server>

Server (name or ID)

server set

Set server properties

server set

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

<server>

Server (name or ID)

server show

Show server details

server show

os server show
    [--diagnostics]
    <server>

--diagnostics

Display server diagnostics information

<server>

Server (name or ID)

server ssh

Ssh to server

server ssh

os server ssh
    [--login <login-name>]
    [--port <port>]
    [--identity <keyfile>]
    [--option <config-options>]
    [--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)

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

server suspend

Suspend server

server suspend

os server suspend
    <server>

<server>

Server (name or ID)

server unlock

Unlock server

server unlock

os server unlock
    <server>

<server>

Server (name or ID)

server unpause

Unpause server

server unpause

os server unpause
    <server>

<server>

Server (name or ID)

server unrescue

Restore server from rescue mode

server unrescue

os server unrescue
    <server>

<server>

Server (name or ID)

server unset

Unset server properties

server unset

os server unset
    --property <key>
    [--property <key>] ...
    <server>

--property <key>

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

<server>

Server (name or ID)