(2).设置安全组:
[root@openstack ~]# nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+-----------+--------------+
| tcp | 22 | 22 | 0.0.0.0/0 | |
+-------------+-----------+---------+-----------+--------------+
[root@openstack ~]# nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+-----------+--------------+
| icmp | -1 | -1 | 0.0.0.0/0 | |
+-------------+-----------+---------+-----------+--------------+
(3).查看当前可用镜像:
[root@openstack ~]# nova image-list
+--------------------------------------+---------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------------------+---------------+--------+--------+
| a7327fef-aa62-4bb5-ab61-d11fb8ff4d65 | centos6.4_20G | ACTIVE | |
+--------------------------------------+---------------+--------+--------+
(5).查看实例运行状态:
[root@openstack ~]# nova list
+--------------------------------------+-------+--------+------------+-------------+---------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------+--------+------------+-------------+---------------------+
| f469964e-9700-466d-9845-eeb2ff1ab183 | vm-00 | ACTIVE | - | Running | vmnet=10.1.1.2 |
+--------------------------------------+-------+--------+------------+-------------+---------------------+
创建新用户
(1).为新用户创建一个tenant:
[root@openstack~]# keystone tenant-create --name=manager --description='Manager Tenant'
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+-------------+----------------------------------+
| Property | Value |
+-------------+----------------------------------+
| description | Manager Tenant |
| enabled | True |
| id | abc5551b3e854e27a5c295b6b548e1f6 |
| name | manager |
+-------------+----------------------------------+
(2).创建新用户:
[root@openstack~]# keystone user-create --name=manager --pass=password --email=manager@chensh.net
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | manager@chensh.net |
| enabled | True |
| id | 325191b6c6f64e768db7cc098fdeefd8 |
| name | manager |
| username | manager |
+----------+----------------------------------+
(3).创建一个角色:
[root@openstack~]# keystone role-create --name=manager
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| id | 1c86f264fe14469d91a26e3b848f2fe4 |
| name | manager |
+----------+----------------------------------+
(4).关联用户、tenant和角色:
[root@openstack~]# keystone user-role-add --user=manager --tenant=manager --role=manager
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
(5).将nova用户赋予新角色:
[root@openstack~]# keystone user-role-add --user=nova --tenant=service --role=manager
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).