Nova CLI Commands - OpenStack Compute Management

Master Nova CLI commands for OpenStack compute management. Learn to list, boot, stop, start VMs, and manage network interfaces with practical examples.

Nova CLI Commands

The Nova CLI is a powerful tool for managing OpenStack compute resources. It allows administrators and users to interact with virtual machines, flavors, images, and more directly from the command line. This guide provides essential Nova commands for efficient cloud infrastructure management.

OpenStack VM Listing Commands

Understanding how to list your virtual machines is fundamental. The nova list command is your primary tool for this. As an administrator, you can view VMs across all tenants, while regular users can see their own instances.

# To list VMs on current tenant:
nova list

# To list VMs of all tenants (admin user only):
nova list --all-tenants

Booting and Managing Virtual Machines

Creating and controlling virtual machines is a core function of Nova. You can specify detailed configurations, including networks, images, flavors, and even availability zones for precise deployment.

# To boot a VM on a specific host:
nova boot --nic net-id=<net_id> \
          --image <image_id> \
          --flavor <flavor> \
          --availability-zone nova:<host_name> <vm_name>

# To stop a server:
nova stop <server>

# To start a server:
nova start <server>

Network Interface Management

Managing network connectivity for your virtual machines is crucial. Nova provides commands to attach and detach network interfaces, ensuring your instances can communicate effectively within the cloud environment.

# To attach a network interface to a specific VM:
nova interface-attach --net-id <net_id> <server>

Further OpenStack Resources

For more in-depth information on OpenStack Nova and its capabilities, refer to the official documentation: