Instance Creation from Scratch using CLI
Attention
These instructions may or may not apply to current openstack release. User help command to check current options.
Note
- This was performed on Centos7.
- Here we will create most of the components of the infrastructure and combine them to launch an instance.
1. Create a Project
[root@openstackserver2 ~(keystone_admin)]# openstack project create myTestProject1
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | e01d75d53e9d402c9fe23510f7e671a7 |
| name | myTestProject1 |
+-------------+----------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# openstack project show myTestProject1
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | None |
| enabled | True |
| id | e01d75d53e9d402c9fe23510f7e671a7 |
| name | myTestProject1 |
+-------------+----------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# openstack project list
+----------------------------------+---------------+
| ID | Name |
+----------------------------------+---------------+
| 227c51fa7faa4f18a52236daeb9a177a | services |
| 459a2bfbf0904a62b59bbd49edc2c8e1 | demo |
| a5044fa62e76494a9ebce751141b7de9 | admin |
| e01d75d53e9d402c9fe23510f7e671a7 | myTestProject1|
+----------------------------------+---------------+
[root@openstackserver2 ~(keystone_admin)]#
2. Create a user and assign it to Project/Tenant
[root@openstackserver2 ~(keystone_admin)]# keystone user-list
+----------------------------------+------------+---------+----------------------+
| id | name | enabled | email |
+----------------------------------+------------+---------+----------------------+
| c57d2f7cadc3487d83693fb59081397c | admin | True | root@localhost |
| 84ec58b72bf549bea99a8f063ce763f7 | ceilometer | True | ceilometer@localhost |
| a303eb04b0894a56b0418451e2048ead | cinder | True | cinder@localhost |
| f0667ae432704794886c8f9b81502c9d | demo | True | |
| 691452c4c88044a7a82f9e55e9df4a72 | glance | True | glance@localhost |
| 22c0d0c9f87a4a3d92faee2cfb6cef6e | neutron | True | neutron@localhost |
| 4027a8de8c594782bad8cc314ff8f20d | nova | True | nova@localhost |
| 1df0ea69bb174af58365331129c6aea8 | swift | True | swift@localhost |
+----------------------------------+------------+---------+----------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# keystone user-create --name user1 --pass suresh --tenant myTestProject1 --enabled true
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | |
| enabled | True |
| id | f35dcb06f1ea47339f110e627eab4543 |
| name | user1 |
| tenantId | 89d5713ba63e453985b3e78e9121857c |
| username | user1 |
+----------+----------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# keystone user-list
+----------------------------------+------------+---------+----------------------+
| id | name | enabled | email |
+----------------------------------+------------+---------+----------------------+
| c57d2f7cadc3487d83693fb59081397c | admin | True | root@localhost |
| 84ec58b72bf549bea99a8f063ce763f7 | ceilometer | True | ceilometer@localhost |
| a303eb04b0894a56b0418451e2048ead | cinder | True | cinder@localhost |
| f0667ae432704794886c8f9b81502c9d | demo | True | |
| 691452c4c88044a7a82f9e55e9df4a72 | glance | True | glance@localhost |
| 22c0d0c9f87a4a3d92faee2cfb6cef6e | neutron | True | neutron@localhost |
| 4027a8de8c594782bad8cc314ff8f20d | nova | True | nova@localhost |
| 1df0ea69bb174af58365331129c6aea8 | swift | True | swift@localhost |
| f35dcb06f1ea47339f110e627eab4543 | user1 | True | |
+----------------------------------+------------+---------+----------------------+
[root@openstackserver2 ~(keystone_admin)]#
3. Verify the current available instances
[root@openstackserver2 ~(keystone_admin)]# nova list
+--------------------------------------+-----------+---------+------------+-------------+-------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+---------+------------+-------------+-------------------+
| fdbb9258-ecc4-4dba-bf26-92208d22dea3 | instance1 | SHUTOFF | - | Shutdown | private=10.0.0.26 |
| 06673885-02c0-47e1-b40d-b3895a736090 | instance2 | SHUTOFF | - | Shutdown | private=10.0.0.27 |
+--------------------------------------+-----------+---------+------------+-------------+-------------------+
[root@openstackserver2 ~(keystone_admin)]#
4. Switch to the new user that you have created
- Here we export the values of some variables like OS_USERNAME, OS_PASSWORD, thus system is able to identify the user.
- Make sure you update correct values for the variables OS_USERNAME and OS_PASSWORD
[root@openstackserver2 ~(keystone_admin)]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=suresh
export OS_AUTH_URL=http://192.168.65.131:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne
[root@openstackserver2 ~(keystone_admin)]# cp keystonerc_admin keystonerc_user1
[root@openstackserver2 ~(keystone_admin)]# vim keystonerc_user1
[root@openstackserver2 ~(keystone_admin)]# cat keystonerc_user1
unset OS_SERVICE_TOKEN
export OS_USERNAME=user1
export OS_PASSWORD=suresh
export OS_AUTH_URL=http://192.168.65.131:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '
export OS_TENANT_NAME=myTestProject1
export OS_REGION_NAME=RegionOne
[root@openstackserver2 ~(keystone_admin)]# source keystonerc_user1
[root@openstackserver2 ~(keystone_admin)]#
5. Verify your instances
Info
Since I switched to user1, so I would be able to view only those instances and netwoks (and other) that are owned by user user1
[root@openstackserver2 ~(keystone_admin)]# nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
[root@openstackserver2 ~(keystone_admin)]#
6. Create and verify the network
[root@openstackserver2 ~(keystone_admin)]# neutron net-list
+--------------------------------------+--------+---------------------------------------+
| id | name | subnets |
+--------------------------------------+--------+---------------------------------------+
| 57ae0d70-997d-40c5-8a47-7db3c84f5a54 | public | ee52672c-16d2-48c8-a975-78950c0d361a |
+--------------------------------------+--------+---------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# neutron net-create myNetwork
Created a new network:
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| admin_state_up | True |
| id | 65ba3cc2-bb52-4beb-9659-f7b6edd93d13 |
| mtu | 0 |
| name | myNetwork |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 89d5713ba63e453985b3e78e9121857c |
+-----------------+--------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# neutron net-list
+--------------------------------------+-----------+---------------------------------------+
| id | name | subnets |
+--------------------------------------+-----------+---------------------------------------+
| 57ae0d70-997d-40c5-8a47-7db3c84f5a54 | public | ee52672c-16d2-48c8-a975-78950c0d361a |
| 65ba3cc2-bb52-4beb-9659-f7b6edd93d13 | myNetwork | |
+--------------------------------------+-----------+---------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
7. Create and assign subnet to the network
[root@openstackserver2 ~(keystone_admin)]# neutron subnet-list
[root@openstackserver2 ~(keystone_admin)]# neutron subnet-create myNetwork 20.0.0.0/24 --name mySubnet
Created a new subnet:
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "20.0.0.2", "end": "20.0.0.254"} |
| cidr | 20.0.0.0/24 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 20.0.0.1 |
| host_routes | |
| id | 0a00d111-d9c4-447b-ba92-e72588153e8a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | mySubnet |
| network_id | 65ba3cc2-bb52-4beb-9659-f7b6edd93d13 |
| subnetpool_id | |
| tenant_id | 89d5713ba63e453985b3e78e9121857c |
+-------------------+--------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# neutron net-list
+--------------------------------------+-----------+--------------------------------------------------+
| id | name | subnets |
+--------------------------------------+-----------+--------------------------------------------------+
| 65ba3cc2-bb52-4beb-9659-f7b6edd93d13 | myNetwork | 0a00d111-d9c4-447b-ba92-e72588153e8a 20.0.0.0/24 |
| 57ae0d70-997d-40c5-8a47-7db3c84f5a54 | public | ee52672c-16d2-48c8-a975-78950c0d361a |
+--------------------------------------+-----------+--------------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]# neutron subnet-list
+--------------------------------------+----------+-------------+--------------------------------------------+
| id | name | cidr | allocation_pools |
+--------------------------------------+----------+-------------+--------------------------------------------+
| 0a00d111-d9c4-447b-ba92-e72588153e8a | mySubnet | 20.0.0.0/24 | {"start": "20.0.0.2", "end": "20.0.0.254"} |
+--------------------------------------+----------+-------------+--------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]#
8. Create security group and set rules
Info
I have allowed almost all the connections here, you can configure the security rules as per your requirements.
[root@openstackserver2 ~(keystone_admin)]# openstack security group list
+--------------------------------------+---------+------------------------+
| ID | Name | Description |
+--------------------------------------+---------+------------------------+
| 1fbae9b6-2b64-4d06-a09f-bcb334811166 | default | Default security group |
+--------------------------------------+---------+------------------------+
[root@openstackserver2 ~(keystone_admin)]# openstack security group create mySecGroup
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| description | mySecGroup |
| id | 28d1b91d-2ddc-4fc2-a178-87609f6f5e07 |
| name | mySecGroup |
| rules | [] |
| tenant_id | 89d5713ba63e453985b3e78e9121857c |
+-------------+--------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# openstack security group list
+--------------------------------------+------------+------------------------+
| ID | Name | Description |
+--------------------------------------+------------+------------------------+
| 1fbae9b6-2b64-4d06-a09f-bcb334811166 | default | Default security group |
| 28d1b91d-2ddc-4fc2-a178-87609f6f5e07 | mySecGroup | mySecGroup |
+--------------------------------------+------------+------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# openstack security group rule list mySecGroup
[root@openstackserver2 ~(keystone_admin)]# openstack security group rule create --proto tcp --src-ip 0.0.0.0/0 --dst-port 1:65000 mySecGroup
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| group | {} |
| id | 11a35bd9-fccc-454c-b0b1-253b8b7ec0dc |
| ip_protocol | tcp |
| ip_range | 0.0.0.0/0 |
| parent_group_id | 28d1b91d-2ddc-4fc2-a178-87609f6f5e07 |
| port_range | 1:65000 |
+-----------------+--------------------------------------+
[root@openstackserver2 ~(keystone_admin)]# openstack security group rule create --proto udp --src-ip 0.0.0.0/0 --dst-port 1:65000 mySecGroup
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| group | {} |
| id | 5b81fb3e-2434-4b9c-a858-170df4bfc993 |
| ip_protocol | udp |
| ip_range | 0.0.0.0/0 |
| parent_group_id | 28d1b91d-2ddc-4fc2-a178-87609f6f5e07 |
| port_range | 1:65000 |
+-----------------+--------------------------------------+
[root@openstackserver2 ~(keystone_admin)]# openstack security group rule create --proto icmp --src-ip 0.0.0.0/0 --dst-port 1:65000 mySecGroup
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| group | {} |
| id | 9930db25-e30c-4b97-a552-3405b0202a10 |
| ip_protocol | icmp |
| ip_range | 0.0.0.0/0 |
| parent_group_id | 28d1b91d-2ddc-4fc2-a178-87609f6f5e07 |
| port_range | |
+-----------------+--------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# openstack security group rule list mySecGroup
+--------------------------------------+-------------+-----------+------------+
| ID | IP Protocol | IP Range | Port Range |
+--------------------------------------+-------------+-----------+------------+
| 11a35bd9-fccc-454c-b0b1-253b8b7ec0dc | tcp | 0.0.0.0/0 | 1:65000 |
| 5b81fb3e-2434-4b9c-a858-170df4bfc993 | udp | 0.0.0.0/0 | 1:65000 |
| 9930db25-e30c-4b97-a552-3405b0202a10 | icmp | 0.0.0.0/0 | |
+--------------------------------------+-------------+-----------+------------+
[root@openstackserver2 ~(keystone_admin)]#
9. Create keypair and copy the key to a file
[root@openstackserver2 ~(keystone_admin)]# nova keypair-list
+------+-------------+
| Name | Fingerprint |
+------+-------------+
+------+-------------+
[root@openstackserver2 ~(keystone_admin)]# nova keypair-add myKey
-----BEGIN RSA PRIVATE KEY-----
MIIEqAIBAAKCAQEAxH/EdLeQGSCiZxSug89n0RAa3ACP9jNMN7hfHHSLXVXLRoX/
AoF7YhKp+np4svAFwe0/fcDDi9YdlLlcHDTqeM+k4fhNF+oDEQABzkP8+53FGDvv
3cylVUp5tL7oDqzfexPdGteZbM3wfY56hWLsywmrywhcBd0xd8+dmpgsIh9OXFFC
moYUfXkFFpyLlEobd+j6cRytEXpL/u2jQmxc6E3Y41HvZk0jRrKK15wE7mIS8GMz
N9Kuspgvt2Rd9SmJQ6bBEcwl8h/MkxAjmqMBbp849i0Jvx8axDDqauuDqWXVRyVj
w5L1tD/PSfDq8+b6MGverEDs4T+oH83zdEB0dQIDAQABAoIBAB6NdzBmskMV7ep1
LsVT5GJ/TI3UkI3JYBpx0mgMPvceNeMbRpFPLK4NFNzbWhUIePy0NOEKrdz6R9Mu
FwJTv/lU3+A6yVHkkuF7zMwTiixdVZ31A9DK1xIx6EaQQGi3vG/YoNJhn3tpcfEz
zB0dSpAvSsTg4d4PjHeCkpDNBF+xlKxnbyW2Amv4D4HnGMevqTn1GNpCuLu+LnWV
XYoiUNIlvXV2P76Vj74+mNyTXNjeiupaP3Jjcgej1ewhIIbHZCZzZtjJsqMwZ3lX
cAoor4fBjnjKiJ2syolxm0DG+HbM6WZuB1lXzLU26L4uh6ojJmZGY1lTM8BI4/Vw
RCw0kSkCggCBANuelDmfjg2wQM+KvJ37st8xhYNTnOKbPY44hGUYW4bUCM2H9Zyt
+AFlYvPlVZPwJRzZG7JP24W16kXbhLdyVlR/yFgXLffdDkJPxcrICkg2BHWrT2Sl
D8mHSZqxxJSkNSkjbyhwyBW1W3zdQACTWFPJMfQjwhFyKpaILKCGXeYnAoIAgQDl
DLiszTduz141MhI03+C4sSbZXGrDanT19IptQbwmG73+qjPyIKjIWQl4N47PJaVT
hlewBS+TOojkyPR8W4kFSYhbgiqHmOLYc3PqV+EVqVPpROld8vvd+B01CIi66+6x
/AhJtZig3K82tkS9vhf1AFqvgIr9T+oAmeKz8O5uAwKCAIAIvjJmbNyp3Ndnq71A
iNGhIwaOqNh5CPcVX1id8a9LGcvT6tKzTxWtcIzU6s9SWWAQ2u/IVHeHxisyZr/M
0cdwC7o9D4cr8+fqaeSU4wvNviDFUnGRrySGwFUEzIjn5fWb0qZNNNgyTQr8WI6A
t1zv0PWlI3tJWIMrhPZJ2a+JRwKCAIEAxiIaAgjHAcjJsnRswWZEKx+6/l1uUTpe
kIAH2nj5e3GWCZxLsRBFUIGMqnxMwa3L9JOKeM4TmGUTE+0taAF6ZqN0G8xeY8uB
t0EvrTB1mVpPJsMgp89PxnQhN8X5GNCMO1RMCw7WR5h+zHIgxo2QhbPXvmcQVA1z
2y9CpussJOcCggCASiA7NXZNmlynPRico+k4TO5VRahW6k0jTTj9hBdFhNJdfiKM
WU9alqKIpy6vWDyg1oFs8p0Afq/i9A5LbemqfIY3mU4CAgHbE12pgvJailHPTbMd
ZsORrHuOsoC0TNk6k+LonGqWGUPQwimJjLI0BWSrRe4VWfT97BRRSYdNGXs=
-----END RSA PRIVATE KEY-----
[root@openstackserver2 ~(keystone_admin)]# vim mykey.pem
[root@openstackserver2 ~(keystone_admin)]# cat mykey.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEqAIBAAKCAQEAxH/EdLeQGSCiZxSug89n0RAa3ACP9jNMN7hfHHSLXVXLRoX/
AoF7YhKp+np4svAFwe0/fcDDi9YdlLlcHDTqeM+k4fhNF+oDEQABzkP8+53FGDvv
3cylVUp5tL7oDqzfexPdGteZbM3wfY56hWLsywmrywhcBd0xd8+dmpgsIh9OXFFC
moYUfXkFFpyLlEobd+j6cRytEXpL/u2jQmxc6E3Y41HvZk0jRrKK15wE7mIS8GMz
N9Kuspgvt2Rd9SmJQ6bBEcwl8h/MkxAjmqMBbp849i0Jvx8axDDqauuDqWXVRyVj
w5L1tD/PSfDq8+b6MGverEDs4T+oH83zdEB0dQIDAQABAoIBAB6NdzBmskMV7ep1
LsVT5GJ/TI3UkI3JYBpx0mgMPvceNeMbRpFPLK4NFNzbWhUIePy0NOEKrdz6R9Mu
FwJTv/lU3+A6yVHkkuF7zMwTiixdVZ31A9DK1xIx6EaQQGi3vG/YoNJhn3tpcfEz
zB0dSpAvSsTg4d4PjHeCkpDNBF+xlKxnbyW2Amv4D4HnGMevqTn1GNpCuLu+LnWV
XYoiUNIlvXV2P76Vj74+mNyTXNjeiupaP3Jjcgej1ewhIIbHZCZzZtjJsqMwZ3lX
cAoor4fBjnjKiJ2syolxm0DG+HbM6WZuB1lXzLU26L4uh6ojJmZGY1lTM8BI4/Vw
RCw0kSkCggCBANuelDmfjg2wQM+KvJ37st8xhYNTnOKbPY44hGUYW4bUCM2H9Zyt
+AFlYvPlVZPwJRzZG7JP24W16kXbhLdyVlR/yFgXLffdDkJPxcrICkg2BHWrT2Sl
D8mHSZqxxJSkNSkjbyhwyBW1W3zdQACTWFPJMfQjwhFyKpaILKCGXeYnAoIAgQDl
DLiszTduz141MhI03+C4sSbZXGrDanT19IptQbwmG73+qjPyIKjIWQl4N47PJaVT
hlewBS+TOojkyPR8W4kFSYhbgiqHmOLYc3PqV+EVqVPpROld8vvd+B01CIi66+6x
/AhJtZig3K82tkS9vhf1AFqvgIr9T+oAmeKz8O5uAwKCAIAIvjJmbNyp3Ndnq71A
iNGhIwaOqNh5CPcVX1id8a9LGcvT6tKzTxWtcIzU6s9SWWAQ2u/IVHeHxisyZr/M
0cdwC7o9D4cr8+fqaeSU4wvNviDFUnGRrySGwFUEzIjn5fWb0qZNNNgyTQr8WI6A
t1zv0PWlI3tJWIMrhPZJ2a+JRwKCAIEAxiIaAgjHAcjJsnRswWZEKx+6/l1uUTpe
kIAH2nj5e3GWCZxLsRBFUIGMqnxMwa3L9JOKeM4TmGUTE+0taAF6ZqN0G8xeY8uB
t0EvrTB1mVpPJsMgp89PxnQhN8X5GNCMO1RMCw7WR5h+zHIgxo2QhbPXvmcQVA1z
2y9CpussJOcCggCASiA7NXZNmlynPRico+k4TO5VRahW6k0jTTj9hBdFhNJdfiKM
WU9alqKIpy6vWDyg1oFs8p0Afq/i9A5LbemqfIY3mU4CAgHbE12pgvJailHPTbMd
ZsORrHuOsoC0TNk6k+LonGqWGUPQwimJjLI0BWSrRe4VWfT97BRRSYdNGXs=
-----END RSA PRIVATE KEY-----
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# nova keypair-list
+-------+-------------------------------------------------+
| Name | Fingerprint |
+-------+-------------------------------------------------+
| myKey | 16:7d:2b:dc:63:a4:90:2d:6d:08:2a:b8:d4:f3:2c:7d |
+-------+-------------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
10. Check the vaialable Flavors
Info
There are some predefined flavors. You cab create new flavor, if you feel that existing flavors does not meet your requirements
[root@openstackserver2 ~(keystone_admin)]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
[root@openstackserver2 ~(keystone_admin)]#
11. Check the available images
[root@openstackserver2 ~(keystone_admin)]# glance image-list
+--------------------------------------+--------+
| ID | Name |
+--------------------------------------+--------+
| e4179347-c486-4e69-92b0-e9afcc652f18 | cirros |
+--------------------------------------+--------+
[root@openstackserver2 ~(keystone_admin)]#
12. Launch the instance
Info
I would have to validate if my network is working fine, so I have created two instances to check communication between them.
[root@openstackserver2 ~(keystone_admin)]# nova boot --flavor m1.tiny --image cirros --key-name=myKey --security-groups mySecGroup --nic net-id=65ba3cc2-bb52-4beb-9659-f7b6edd93d13 myInstance1
+--------------------------------------+-----------------------------------------------+
| Property | Value |
+--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | hZp5FjaTN5dx |
| config_drive | |
| created | 2016-11-17T11:46:13Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | edd4e98b-32a2-4d4d-8745-e417c9f7dfd2 |
| image | cirros (e4179347-c486-4e69-92b0-e9afcc652f18) |
| key_name | myKey |
| metadata | {} |
| name | myInstance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | mySecGroup |
| status | BUILD |
| tenant_id | 89d5713ba63e453985b3e78e9121857c |
| updated | 2016-11-17T11:46:13Z |
| user_id | f35dcb06f1ea47339f110e627eab4543 |
+--------------------------------------+-----------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
[root@openstackserver2 ~(keystone_admin)]# nova list
+--------------------------------------+-------------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+--------+------------+-------------+----------+
| edd4e98b-32a2-4d4d-8745-e417c9f7dfd2 | myInstance1 | BUILD | spawning | NOSTATE | |
+--------------------------------------+-------------+--------+------------+-------------+----------+
[root@openstackserver2 ~(keystone_admin)]# nova boot --flavor m1.tiny --image cirros --key-name myKey --security-groups mySecGroup --nic net-id=65ba3cc2-bb52-4beb-9659-f7b6edd93d13 myInstance2
+--------------------------------------+-----------------------------------------------+
| Property | Value |
+--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | gWT7p3s9LKiE |
| config_drive | |
| created | 2016-11-17T11:47:53Z |
| flavor | m1.tiny (1) |
| hostId | |
| id | ee8df4c0-aa82-4e5d-9926-e2eaed0dd18f |
| image | cirros (e4179347-c486-4e69-92b0-e9afcc652f18) |
| key_name | myKey |
| metadata | {} |
| name | myInstance2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | mySecGroup |
| status | BUILD |
| tenant_id | 89d5713ba63e453985b3e78e9121857c |
| updated | 2016-11-17T11:47:53Z |
| user_id | f35dcb06f1ea47339f110e627eab4543 |
+--------------------------------------+-----------------------------------------------+
[root@openstackserver2 ~(keystone_admin)]#
13. Verify the instances
[root@openstackserver2 ~(keystone_admin)]# nova list
+--------------------------------------+-------------+--------+------------+-------------+--------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+--------+------------+-------------+--------------------+
| edd4e98b-32a2-4d4d-8745-e417c9f7dfd2 | myInstance1 | ACTIVE | - | Running | myNetwork=20.0.0.3 |
| ee8df4c0-aa82-4e5d-9926-e2eaed0dd18f | myInstance2 | ACTIVE | - | Running | myNetwork=20.0.0.4 |
+--------------------------------------+-------------+--------+------------+-------------+--------------------+
[root@openstackserver2 ~(keystone_admin)]#