source admin-openrc.sh
keystone user-create --name=demo --pass=123456
keystone tenant-create --name=demo --description="Demo Tenant"
keystone user-role-add --user=demo --role=_member_ --tenant=demo
source demo-openrc.sh
ssh-keygen
nova keypair-add --pub-key ~/.ssh/id_rsa.pub demo-key
neutron net-create demo-net
neutron subnet-create demo-net --name demo-subnet --gateway 192.168.1.1 192.168.1.0/24
neutron router-create demo-router
neutron router-interface-add demo-router demo-subnet
neutron net-list
+--------------------------------------+-----------+-----------------------------------------------------+
| id | name | subnets |
+--------------------------------------+-----------+-----------------------------------------------------+
| fd39c0bb-f3f5-45dc-8f61-0b516114731f | demo-net | fb8687e8-1d64-4ed1-afc3-955454090682 192.168.1.0/24 |
| f3376efe-2024-4fa8-9cd5-0c10f2174655 | net04_ext | b39c4183-fe7e-4c71-b934-539a469691f2 |
+--------------------------------------+-----------+-----------------------------------------------------+
neutron router-gateway-set demo-router net04_ext
nova boot --flavor m1.tiny --image cirros-0.3.0-x86_64-disk --nic net-id=fd39c0bb-f3f5-45dc-8f61-0b516114731f --security-group default --key-name demo-key demo-instance1
nova list
+--------------------------------------+----------------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------+--------+------------+-------------+----------+
| 8423000d-56be-41ff-8a5b-bcf5c5472cf6 | demo-instance1 | BUILD | spawning | NOSTATE | |
+--------------------------------------+----------------+--------+------------+-------------+----------+
nova show 8423000d-56be-41ff-8a5b-bcf5c5472cf6
+--------------------------------------+-----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+-----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2015-12-30T09:57:16.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2015-12-30T09:56:01Z |
| demo-net network | 192.168.1.2 |
| flavor | m1.tiny (1) |
| hostId | 8bfc62fe3673abca838ee2a0f1eab68b771c1469709a7408c4ff98dd |
| id | 8423000d-56be-41ff-8a5b-bcf5c5472cf6 |
| image | cirros-0.3.0-x86_64-disk (bafeb4c4-781a-49f7-8c9d-9b9db7604db1) |
| key_name | demo-key |
| metadata | {} |
| name | demo-instance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | e234241403d744dfba9ce21f6371fc0e |
| updated | 2015-12-30T09:57:17Z |
| user_id | db35fe5dcc3049dd9c297a6d37ff5b0d |
+--------------------------------------+-----------------------------------------------------------------+
nova get-vnc-console demo-instance1 novnc
+-------+----------------------------------------------------------------------------------+
| Type | Url |
+-------+----------------------------------------------------------------------------------+
| novnc | http://168.1.22.30:6080/vnc_auto.html?token=ba5ee3f7-56d2-4113-8b66-b356201dbef6 |
+-------+----------------------------------------------------------------------------------+
ping 192.168.1.1
ping 218.85.157.99