You are on page 1of 4

OpenStack Docs: Launch an instance on the private network https://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-p...

demo

$ source demo-openrc.sh

$ nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+---------
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Fac
+-----+-----------+-----------+------+-----------+------+-------+---------
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0
+-----+-----------+-----------+------+-----------+------+-------+---------

m1.tiny

$ nova image-list
+--------------------------------------+--------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+--------+--------+--------+
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | ACTIVE | |
+--------------------------------------+--------+--------+--------+

cirros

$ neutron net-list
+--------------------------------------+---------+------------------------
| id | name | subnets
+--------------------------------------+---------+------------------------
| 0e62efcd-8cee-46c7-b163-d8df05c3c5ad | public | 5cc70da8-4ee7-4565-be53
| 7c6f9b37-76b4-463e-98d8-27e5686ed083 | private | 3482f524-8bff-4871-80d4
+--------------------------------------+---------+------------------------

private

$ nova secgroup-list
+--------------------------------------+---------+-------------+
| Id | Name | Description |
+--------------------------------------+---------+-------------+
| ad8d4ea5-3cad-4f7d-b164-ada67ec59473 | default | default |
+--------------------------------------+---------+-------------+

default

1 of 4 6/19/2020, 10:56 PM
OpenStack Docs: Launch an instance on the private network https://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-p...

PRIVATE_NET_ID private

$ nova boot --flavor m1.tiny --image cirros --nic net-id


--security-group default --key-name mykey private-instance
+--------------------------------------+----------------------------------
| Property | Value
+--------------------------------------+----------------------------------
| OS-DCF:diskConfig | MANUAL
| OS-EXT-AZ:availability_zone | nova
| 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 | oMeLMk9zVGpk
| config_drive |
| created | 2015-09-17T22:36:05Z
| flavor | m1.tiny (1)
| hostId |
| id | 113c5892-e58e-4093-88c7-e33f502ea
| image | cirros (38047887-61a7-41ea-9b49-2
| key_name | mykey
| metadata | {}
| name | private-instance
| os-extended-volumes:volumes_attached | []
| progress | 0
| security_groups | default
| status | BUILD
| tenant_id | f5b2ccaa75ac413591f12fcaa096aa5c
| updated | 2015-09-17T22:36:05Z
| user_id | 684286a9079845359882afc3aa5011fb
+--------------------------------------+----------------------------------

$ nova list
+--------------------------------------+------------------+--------+------
| ID | Name | Status | Task
+--------------------------------------+------------------+--------+------
| 113c5892-e58e-4093-88c7-e33f502eaaa4 | private-instance | ACTIVE | -
| 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | public-instance | ACTIVE | -
+--------------------------------------+------------------+--------+------

BUILD ACTIVE

$ nova get-vnc-console private-instance novnc


+-------+-----------------------------------------------------------------
| Type | Url
+-------+-----------------------------------------------------------------
| novnc | http://controller:6080/vnc_auto.html?token=2f6dd985-f906-4bfc-b5
+-------+-----------------------------------------------------------------

controller controller

ping

private

$ ping -c 4 172.16.1.1
PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
64 bytes from 172.16.1.1: icmp_req=1 ttl=64 time=0.357 ms
64 bytes from 172.16.1.1: icmp_req=2 ttl=64 time=0.473 ms
64 bytes from 172.16.1.1: icmp_req=3 ttl=64 time=0.504 ms
64 bytes from 172.16.1.1: icmp_req=4 ttl=64 time=0.470 ms

--- 172.16.1.1 ping statistics ---


4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.357/0.451/0.504/0.055 ms

2 of 4 6/19/2020, 10:56 PM
OpenStack Docs: Launch an instance on the private network https://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-p...

$ ping -c 4 openstack.org
PING openstack.org (174.143.194.225) 56(84) bytes of data.
64 bytes from 174.143.194.225: icmp_req=1 ttl=53 time=17.4 ms
64 bytes from 174.143.194.225: icmp_req=2 ttl=53 time=17.5 ms
64 bytes from 174.143.194.225: icmp_req=3 ttl=53 time=17.7 ms
64 bytes from 174.143.194.225: icmp_req=4 ttl=53 time=17.5 ms

--- openstack.org ping statistics ---


4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 17.431/17.575/17.734/0.143 ms

public

$ neutron floatingip-create public


Created a new floatingip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| fixed_ip_address | |
| floating_ip_address | 203.0.113.104 |
| floating_network_id | 9bce64a3-a963-4c05-bfcd-161f708042d1 |
| id | 05e36754-e7f3-46bb-9eaa-3521623b3722 |
| port_id | |
| router_id | |
| status | DOWN |
| tenant_id | 7cf50047f8df4824bc76c2fdf66d11ec |
+---------------------+--------------------------------------+

$ nova floating-ip-associate private-instance 203.0.113.104

$ nova list
+--------------------------------------+------------------+--------+------
| ID | Name | Status | Task
+--------------------------------------+------------------+--------+------
| 113c5892-e58e-4093-88c7-e33f502eaaa4 | private-instance | ACTIVE | -
| 181c52ba-aebc-4c32-a97d-2e8e82e4eaaf | public-instance | ACTIVE | -
+--------------------------------------+------------------+--------+------

$ ping -c 4 203.0.113.104
PING 203.0.113.104 (203.0.113.104) 56(84) bytes of data.
64 bytes from 203.0.113.104: icmp_req=1 ttl=63 time=3.18 ms
64 bytes from 203.0.113.104: icmp_req=2 ttl=63 time=0.981 ms
64 bytes from 203.0.113.104: icmp_req=3 ttl=63 time=1.06 ms
64 bytes from 203.0.113.104: icmp_req=4 ttl=63 time=0.929 ms

--- 203.0.113.104 ping statistics ---


4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.929/1.539/3.183/0.951 ms

$ ssh cirros@203.0.113.104
The authenticity of host '203.0.113.104 (203.0.113.104)' can't be establis
RSA key fingerprint is ed:05:e9:e7:52:a0:ff:83:68:94:c7:d1:f2:f8:e2:e9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '203.0.113.104' (RSA) to the list of known host
$

cirros cubswin:)

3 of 4 6/19/2020, 10:56 PM
OpenStack Docs: Launch an instance on the private network https://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-p...

4 of 4 6/19/2020, 10:56 PM

You might also like