Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

Chapter 5. Compute Service Command-line Client

The nova client is the command-line interface (CLI) for the OpenStack Compute API and its extensions. This chapter documents nova version 6.0.0.
For help on a specific nova command, enter:
$ nova help COMMAND

5.1. nova Usage

usage: nova [--version] [--debug] [--os-cache] [--timings]
            [--os-region-name <region-name>] [--service-type <service-type>]
            [--service-name <service-name>]
            [--os-endpoint-type <endpoint-type>]
            [--os-compute-api-version <compute-api-ver>]
            [--bypass-url <bypass-url>] [--insecure]
            [--os-cacert <ca-certificate>] [--os-cert <certificate>]
            [--os-key <key>] [--timeout <seconds>] [--os-auth-type <name>]
            [--os-auth-url OS_AUTH_URL] [--os-domain-id OS_DOMAIN_ID]
            [--os-domain-name OS_DOMAIN_NAME] [--os-project-id OS_PROJECT_ID]
            [--os-project-name OS_PROJECT_NAME]
            [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
            [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
            [--os-trust-id OS_TRUST_ID]
            [--os-default-domain-id OS_DEFAULT_DOMAIN_ID]
            [--os-default-domain-name OS_DEFAULT_DOMAIN_NAME]
            [--os-user-id OS_USER_ID] [--os-username OS_USERNAME]
            [--os-user-domain-id OS_USER_DOMAIN_ID]
            [--os-user-domain-name OS_USER_DOMAIN_NAME]
            [--os-password OS_PASSWORD]
            <subcommand> ...

Subcommands

absolute-limits


        DEPRECATED, use limits instead.

add-fixed-ip


        Add new IP address on a network to server.

add-floating-ip


        DEPRECATED, use floating-ip-associate instead.

add-secgroup


        Add a Security Group to a server.

agent-create


        Create new agent build.

agent-delete


        Delete existing agent build.

agent-list


        List all builds.

agent-modify


        Modify existing agent build.

aggregate-add-host


        Add the host to the specified aggregate.

aggregate-create


        Create a new aggregate with the specified
      details.

aggregate-delete


        Delete the aggregate.

aggregate-details


        DEPRECATED, use aggregate-show instead.

aggregate-list


        Print a list of all aggregates.

aggregate-remove-host


        Remove the specified host from the specified
      aggregate.

aggregate-set-metadata


        Update the metadata associated with the
      aggregate.

aggregate-show


        Show details of the specified aggregate.

aggregate-update


        Update the aggregate's name and optionally
      availability zone.

availability-zone-list


        List all the availability zones.

backup


        Backup a server by creating a 'backup' type
      snapshot.

boot


        Boot a new server.

clear-password


        Clear the admin password for a server from the
      metadata server. This action does not actually
      change the instance server password.

cloudpipe-configure


        Update the VPN IP/port of a cloudpipe
      instance.

cloudpipe-create


        Create a cloudpipe instance for the given
      project.

cloudpipe-list


        Print a list of all cloudpipe instances.

console-log


        Get console log output of a server.

credentials


        Show user credentials returned from auth.

delete


        Immediately shut down and delete specified
      server(s).

diagnostics


        Retrieve server diagnostics.

dns-create


        DEPRECATED: Create a DNS entry for domain,
      name, and IP.

dns-create-private-domain


        DEPRECATED: Create the specified DNS domain.

dns-create-public-domain


        DEPRECATED: Create the specified DNS domain.

dns-delete


        DEPRECATED: Delete the specified DNS entry.

dns-delete-domain


        DEPRECATED: Delete the specified DNS domain.

dns-domains


        DEPRECATED: Print a list of available dns
      domains.

dns-list


        DEPRECATED: List current DNS entries for
      domain and IP or domain and name.

endpoints


        Discover endpoints that get returned from the
      authenticate services.

evacuate


        Evacuate server from failed host.

fixed-ip-get


        DEPRECATED: Retrieve info on a fixed IP.

fixed-ip-reserve


        DEPRECATED: Reserve a fixed IP.

fixed-ip-unreserve


        DEPRECATED: Unreserve a fixed IP.

flavor-access-add


        Add flavor access for the given tenant.

flavor-access-list


        Print access information about the given
      flavor.

flavor-access-remove


        Remove flavor access for the given tenant.

flavor-create


        Create a new flavor.

flavor-delete


        Delete a specific flavor

flavor-key


        Set or unset extra_spec for a flavor.

flavor-list


        Print a list of available 'flavors' (sizes of
      servers).

flavor-show


        Show details about the given flavor.

floating-ip-associate


        Associate a floating IP address to a server.

floating-ip-bulk-create


        DEPRECATED: Bulk create floating IPs by range
      (nova-network only).

floating-ip-bulk-delete


        DEPRECATED: Bulk delete floating IPs by range
      (nova-network only).

floating-ip-bulk-list


        DEPRECATED: List all floating IPs (nova-
      network only).

floating-ip-create


        DEPRECATED: Allocate a floating IP for the
      current tenant.

floating-ip-delete


        DEPRECATED: De-allocate a floating IP.

floating-ip-disassociate


        Disassociate a floating IP address from a
      server.

floating-ip-list


        DEPRECATED: List floating IPs.

floating-ip-pool-list


        DEPRECATED: List all floating IP pools.

get-mks-console


        Get an MKS console to a server. (Supported by
      API versions '2.8' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

get-password


        Get the admin password for a server. This
      operation calls the metadata service to query
      metadata information and does not read
      password information from the server itself.

get-rdp-console


        Get a rdp console to a server.

get-serial-console


        Get a serial console to a server.

get-spice-console


        Get a spice console to a server.

get-vnc-console


        Get a vnc console to a server.

host-action


        Perform a power action on a host.

host-describe


        Describe a specific host.

host-list


        List all hosts by service.

host-update


        Update host settings.

hypervisor-list


        List hypervisors. (Supported by API versions
      '2.0' - '2.latest') [hint: use '--os-compute-
      api-version' flag to show help message for
      proper version]

hypervisor-servers


        List servers belonging to specific
      hypervisors.

hypervisor-show


        Display the details of the specified
      hypervisor.

hypervisor-stats


        Get hypervisor statistics over all compute
      nodes.

hypervisor-uptime


        Display the uptime of the specified
      hypervisor.

image-create


        Create a new image by taking a snapshot of a
      running server.

image-delete


        DEPRECATED: Delete specified image(s).

image-list


        DEPRECATED: Print a list of available images
      to boot from.

image-meta


        DEPRECATED: Set or delete metadata on an
      image.

image-show


        DEPRECATED: Show details about the given
      image.

interface-attach


        Attach a network interface to a server.

interface-detach


        Detach a network interface from a server.

interface-list


        List interfaces attached to a server.

keypair-add


        Create a new key pair for use with servers.

keypair-delete


        Delete keypair given by its name. (Supported
      by API versions '2.0' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

keypair-list


        Print a list of keypairs for a user (Supported
      by API versions '2.0' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

keypair-show


        Show details about the given keypair.
      (Supported by API versions '2.0' - '2.latest')
      [hint: use '--os-compute-api-version' flag to
      show help message for proper version]

limits


        Print rate and absolute limits.

list


        List active servers.

list-secgroup


        List Security Group(s) of a server.

live-migration


        Migrate running server to a new machine.

live-migration-abort


        Abort an on-going live migration. (Supported
      by API versions '2.24' - '2.latest') [hint:
      use '--os-compute-api-version' flag to show
      help message for proper version]

live-migration-force-complete


      Force on-going live migration to complete.
      (Supported by API versions '2.22' -
      '2.latest') [hint: use '--os-compute-api-
      version' flag to show help message for proper
      version]

lock


        Lock a server. A normal (non-admin) user will
      not be able to execute actions on a locked
      server.

meta


        Set or delete metadata on a server.

migrate


        Migrate a server. The new host will be
      selected by the scheduler.

network-associate-host


        DEPRECATED: Associate host with network.

network-associate-project


        DEPRECATED: Associate project with network.

network-create


        DEPRECATED: Create a network.

network-delete


        DEPRECATED: Delete network by label or id.

network-disassociate


        DEPRECATED: Disassociate host and/or project
      from the given network.

network-list


        DEPRECATED: Print a list of available
      networks.

network-show


        DEPRECATED: Show details about the given
      network.

pause


        Pause a server.

quota-class-show


        List the quotas for a quota class.

quota-class-update


        Update the quotas for a quota class.
      (Supported by API versions '2.0' - '2.latest')
      [hint: use '--os-compute-api-version' flag to
      show help message for proper version]

quota-defaults


        List the default quotas for a tenant.

quota-delete


        Delete quota for a tenant/user so their quota
      will Revert back to default.

quota-show


        List the quotas for a tenant/user.

quota-update


        Update the quotas for a tenant/user.
      (Supported by API versions '2.0' - '2.latest')
      [hint: use '--os-compute-api-version' flag to
      show help message for proper version]

rate-limits


        DEPRECATED, use limits instead.

reboot


        Reboot a server.

rebuild


        Shutdown, re-image, and re-boot a server.

refresh-network


        Refresh server network information.

remove-fixed-ip


        Remove an IP address from a server.

remove-floating-ip


        DEPRECATED, use floating-ip-disassociate
      instead.

remove-secgroup


        Remove a Security Group from a server.

rename


        DEPRECATED, use update instead.

rescue


        Reboots a server into rescue mode, which
      starts the machine from either the initial
      image or a specified image, attaching the
      current boot disk as secondary.

reset-network


        Reset network of a server.

reset-state


        Reset the state of a server.

resize


        Resize a server.

resize-confirm


        Confirm a previous resize.

resize-revert


        Revert a previous resize (and return to the
      previous VM).

resume


        Resume a server.

root-password


        DEPRECATED, use set-password instead.

scrub


        DEPRECATED: Delete networks and security
      groups associated with a project.

secgroup-add-default-rule


        DEPRECATED: Add a rule to the set of rules
      that will be added to the 'default' security
      group for new tenants (nova-network only).

secgroup-add-group-rule


        DEPRECATED: Add a source group rule to a
      security group.

secgroup-add-rule


        DEPRECATED: Add a rule to a security group.

secgroup-create


        DEPRECATED: Create a security group.

secgroup-delete


        DEPRECATED: Delete a security group.

secgroup-delete-default-rule


      DEPRECATED: Delete a rule from the set of
      rules that will be added to the 'default'
      security group for new tenants (nova-network
      only).

secgroup-delete-group-rule


        DEPRECATED: Delete a source group rule from a
      security group.

secgroup-delete-rule


        DEPRECATED: Delete a rule from a security
      group.

secgroup-list


        DEPRECATED: List security groups for the
      current tenant.

secgroup-list-default-rules


      DEPRECATED: List rules that will be added to
      the 'default' security group for new tenants.

secgroup-list-rules


        DEPRECATED: List rules for a security group.

secgroup-update


        DEPRECATED: Update a security group.

server-group-create


        Create a new server group with the specified
      details.

server-group-delete


        Delete specific server group(s).

server-group-get


        Get a specific server group.

server-group-list


        Print a list of all server groups.

server-migration-list


        Get the migrations list of specified server.
      (Supported by API versions '2.23' -
      '2.latest') [hint: use '--os-compute-api-
      version' flag to show help message for proper
      version]

server-migration-show


        Get the migration of specified server.
      (Supported by API versions '2.23' -
      '2.latest') [hint: use '--os-compute-api-
      version' flag to show help message for proper
      version]

server-tag-add


        Add single tag to a server. (Supported by API
      versions '2.26' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

server-tag-delete


        Delete single tag from a server. (Supported by
      API versions '2.26' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

server-tag-delete-all


        Delete all tags from a server. (Supported by
      API versions '2.26' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

server-tag-list


        Get list of tags from a server. (Supported by
      API versions '2.26' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

server-tag-set


        Set list of tags to a server. (Supported by
      API versions '2.26' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

service-delete


        Delete the service.

service-disable


        Disable the service.

service-enable


        Enable the service.

service-force-down


        Force service to down. (Supported by API
      versions '2.11' - '2.latest') [hint: use
      '--os-compute-api-version' flag to show help
      message for proper version]

service-list


        Show a list of all running services. Filter by
      host & binary.

set-password


        Change the admin password for a server.

shelve


        Shelve a server.

shelve-offload


        Remove a shelved server from the compute node.

show


        Show details about the given server.

ssh


        SSH into a server.

start


        Start the server(s).

stop


        Stop the server(s).

suspend


        Suspend a server.

trigger-crash-dump


        Trigger crash dump in an instance. (Supported
      by API versions '2.17' - '2.latest') [hint:
      use '--os-compute-api-version' flag to show
      help message for proper version]

unlock


        Unlock a server.

unpause


        Unpause a server.

unrescue


        Restart the server from normal boot disk
      again.

unshelve


        Unshelve a server.

update


        Update the name or the description for a
      server.

usage


        Show usage data for a single tenant.

usage-list


        List usage data for all tenants.

version-list


        List all API versions.

virtual-interface-list


        Show virtual interface info about the given
      server.

volume-attach


        Attach a volume to a server.

volume-attachments


        List all the volumes attached to a server.

volume-detach


        Detach a volume from a server.

volume-update


        Update volume attachment.

x509-create-cert


        Create x509 cert for a user in tenant.

x509-get-root-cert


        Fetch the x509 root cert.

bash-completion


        Prints all of the commands and options to
      stdout so that the nova.bash_completion script
      doesn't have to hard code them.

help


        Display help about this program or one of its
      subcommands.

baremetal-interface-list


        DEPRECATED: List network interfaces associated
      with a baremetal node.

baremetal-node-list


        DEPRECATED: Print list of available baremetal
      nodes.

baremetal-node-show


        DEPRECATED: Show information about a baremetal
      node.

cell-capacities


        Get cell capacities for all cells or a given
      cell.

cell-show


        Show details of a given cell.

force-delete


        Force delete a server.

restore


        Restore a soft-deleted server.

host-evacuate


        Evacuate all instances from failed host.

host-evacuate-live


        Live migrate all instances of the specified
      host to other available hosts.

host-servers-migrate


        Cold migrate all instances off the specified
      host to other available hosts.

instance-action


        Show an action.

instance-action-list


        List actions on a server.

list-extensions


        List all the os-api extensions that are
      available.

host-meta


        Set or Delete metadata on all instances of a
      host.

migration-list


        Print a list of migrations.

net


        DEPRECATED, use tenant-network-show instead.

net-create


        DEPRECATED, use tenant-network-create instead.

net-delete


        DEPRECATED, use tenant-network-delete instead.

net-list


        DEPRECATED, use tenant-network-list instead.

tenant-network-create


        DEPRECATED: Create a tenant network.

tenant-network-delete


        DEPRECATED: Delete a tenant network.

tenant-network-list


        DEPRECATED: List tenant networks.

tenant-network-show


        DEPRECATED: Show a tenant network.