This section outlines a number of common commands that can be run when operating with instances (for example, virtual machines). For more detailed information and explanation of each task, refer to Chapter 5, Nova – OpenStack Compute.
Ensure that you have the OpenStack clients installed as described in the first recipes of this chapter.
Carry out the following to launch and manipulate running instances:
To launch in an instance from the command line, you need the following information:
Carry out the following steps to launch an instance from the command line:
openstack image list
openstack network list
openstack flavor list
openstack security group list
openstack keypair list
openstack server create --image IMAGE --flavor FLAVOR --security-group SECGROUP --nic net-id=NETWORK_UUID --key-name KEYPAIR_NAME INSTANCE_NAME
To list the OpenStack instances launched, issue the following command:
openstack server list
To create a snapshot of a running instance, carry out the following command:
openstack server image create --name snapshotRunningWebserver1 myRunningWebserver1
To alter the flavor of a running instance and respawn with the new settings, carry out the following commands:
openstack server resize --flavor m1.small myWebserver1
VERIFY_RESIZE
:openstack server list
This shows output like the following:
openstack server resize --confirm myWebserver1
3.135.197.250