This article shows some
This article assumes that you have installed the python-novaclient, and that the client works with your Cloud Servers account.
help command lists all available commands:
Add the name of a command after
nova help to see its syntax. For example,
to see the syntax of the boot command, run:
nova help boot
Note that not every command listed in nova help works with Rackspace Cloud Servers. The nova client works with OpenStack, including the Rackspace Cloud. However, some of the commands refer to operations that we haven't implemented on Cloud Servers, while others enable you to manage a full OpenStack installation.
Note: If you want to refer to a server or image by name and the name has a space in it, put the name in quotes so that the client takes it as a single argument.
You can use the following commands for most operations with Cloud Servers:
list command returns a list of the servers on your account. You can use list without arguments, but options are available to limit the list by a range of IP addresses or to show you servers with a particular status.
The output shows the unique ID of the server in the first column, followed by the server name, the server status, and, finally, the network addresses associated with the server.
nova list --status active
image-create command takes a snapshot of a server. The first argument is the name or ID of the server, and the second argument is the name that you want to assign to the new snapshot.
nova image-create servername backupname
flavor-list command displays a list of available server flavors. A flavor describes the options of memory, disk space, and CPUs that you can allocate for the server.
The response has the following information for the flavors:
- Flavor ID
- Flavor name
- Memory allocation (in megabytes)
- Swap allocation (if any, also in megabytes)
- Disk space allocated to the server (in gigabytes)
- Number of virtual CPUs for the instance
- Network throughput cap factor associated with the flavor
boot command to create a new cloud server. At its simplest, you tell the boot command what flavor to use with the
--flavor option, what image to use as the base with the
--image option, and then include the name of the server that you're creating as an argument for the command.
The output of the boot command lists data about the new server, including the root or administrator password.
nova boot --flavor 1 --image 758d32fe-9f2c-470a-a082-ba6832a06431 servername
reboot command uses the name or ID of the target server as its argument. By default, the server performs a soft reboot, where the OS gracefully reboots the server. You can do a hard reboot (like switching the power off and on again) with the
nova reboot --hard servername
delete command uses the name or ID of the server as its argument. Use this command with caution.
nova delete servername
show command returns details about a server: flavor, the image it was built from, network addresses, and other details.
nova show servername
resize command to switch a server to another flavor. When you call the command, the first argument is the server name or ID, and the second argument is the flavor name or ID.
nova resize does not work for virtual cloud servers or Rackspace Standard servers with manual disk allocation enabled. For more information on changing the size of a virtual cloud server, see Changing the Size of Your Performance Cloud Server.
You cannot resize a server to a smaller flavor if it has more allocated disk space than the smaller flavor can use.
nova resize servername "512MB instance"
After a resize completes, you must confirm the resize success before the resize becomes permanent. Use the
resize-confirm command with a server name or ID.
nova resize-confirm servername
After a resize completes, you might discover a problem with the server that indicates the resize introduced a problem. In this case, you can enter the
resize-revert command to roll the server back to its original flavor.
nova resize-revert servername
rebuild command takes an existing server and rebuilds it using an image. The first argument is the server name or ID, and the second argument is the name or ID of the image you chose.
You can include the
-rebuild_password option to set a root password, instead of having one randomly generated.
nova rebuild --rebuild_password PASSWORD servername "Fedora 16"
rescue command sets a server into rescue mode, enabling you to access and modify the file system while the server is inactive. The output of the command is the root password used by the rescue instance.
nova rescue servername
unrescue command to take a server out of rescue mode and make it boot normally.
nova unrescue servername
Change the root password for an instance by using the
nova set-password servername
meta command to set or delete metadata on a server. The metadata is in
key=value form. You can view the metadata set on a server with the
The command has the folloiwng arguments:
- The name or ID of the server
- The action:
- The key-value pair that defines the metadata
nova meta servername set "role=development"
limits command to list the limits set on your account. The limits can include the following options:
- The maximum number of metadata pairs you can associate with an image or server
- The maximum number and size of personalities (files) that you can install on a server when you create it
- The maximum number of servers allowed on your account
- The maximum amount of memory that you can allocate in total to all the servers on your account
Use the Feedback tab to make any comments or ask questions. You can also start a conversation with us.
Updated 3 months ago