openstack-havana云平台实验(8)
时间:2016-10-10 09:32 来源:潇湘夜雨 作者:华嵩阳 点击:次
| accessIPv4 | |
| accessIPv6 | |
| adminPass | rxL8q7YBMybk |
| config_drive | |
| created | 2016-10-06T05:28:46Z |
| flavor | flavor.cirros (6) |
| hostId | |
| id | be58a7d8-8196-4d87-93b1-834e31e476cc |
| image | cirros-0.3.0-x86_64 (46e5df15-8adb-46c7-aa4c-a57f2da8acc5) |
| key_name | testkey |
| metadata | {} |
| name | cirros1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | a8fbb58fe9c24de38d3290573ecf565a |
| updated | 2016-10-06T05:28:46Z |
| user_id | f3468a352821476ea3bf6bb8f327f560 |
+--------------------------------------+------------------------------------------------------------+
[root@node1 ~(keystone_admin)]# nova list
+--------------------------------------+---------+--------+------------+-------------+------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+------------------------+
| be58a7d8-8196-4d87-93b1-834e31e476cc | cirros1 | BUILD | spawning | NOSTATE | private=172.18.109.194 |
+--------------------------------------+---------+--------+------------+------------
+--------------------------------------+---------+--------+------------+-------------+------------------------+
正在创建中
[root@node1 ~(keystone_admin)]# nova list
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+------------------------+
| be58a7d8-8196-4d87-93b1-834e31e476cc | cirros1 | ACTIVE | - | Running | private=172.18.109.194 |
已经创建成功!
基于nova控制台连接至VM实例cirros1:
[root@node1 ~(keystone_admin)]# nova console-log cirros1
instance-id: i-00000001
public-ipv4:
local-ipv4 : 172.18.109.194
wget: server returned error: HTTP/1.1 404 Not Found
cloud-userdata: failed to read user data url: http://169.254.169.254/2009-04-04/user-data
WARN: /etc/rc3.d/S99-cloud-userdata failed
____ ____ ____
/ __/ __ ____ ____ / __ \/ __/
/ /__ / // __// __// /_/ /\ \
\___//_//_/ /_/ \____/___/
http://launchpad.net/cirros
login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.
cirros login:
另外,也可以通过ssh连接至VM实例cirros1,而且由于控制节点已经直接向cirrors中注入了ssh公钥,
连接至VM实例时不再需要提供密码即可建立SSH会话。
[root@node1 ~(keystone_admin)]# ssh -l cirros 172.18.109.194
The authenticity of host '172.18.109.194 (172.18.109.194)' can't be established.
RSA key fingerprint is c3:23:d2:ab:c0:75:1a:1e:70:7a:e1:7e:60:bf:5d:5e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.18.109.194' (RSA) to the list of known hosts.
$ #登录成功
$ pwd
/home/cirros
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether fa:16:3e:4f:0e:25 brd ff:ff:ff:ff:ff:ff
inet 172.18.109.194/26 brd 172.18.109.255 scope global eth0
inet6 fe80::f816:3eff:fe4f:e25/64 scope link
valid_lft forever preferred_lft forever
$ sodu su root #切换到root用户
[root@node1 ~(keystone_admin)]# nova stop cirros1 关闭虚拟机
[root@node1 ~(keystone_admin)]# nova list
+--------------------------------------+---------+--------+--------------+-------------+------------------------+ (责任编辑:liangzh) |