next up previous contents
Next: 存取 Instance cirros Up: Instance Previous: 新增 Instance 前確認   Contents

使用 Selfservice network 新增 Instance cirros

  1. 載入用戶 demo 的環境變數。
    [root@controller ~]# . demo.token
    
  2. 以 flavor m1.nano, image cirros, network selfservice, security group default 新增 server。
    [root@controller ~]# openstack server create --flavor m1.nano --image cirros \
    --nic net-id=37d0dee7-d573-4f3b-863d-c92c05b6dbbb \
    --security-group default \
    --key-name mykey cirros1
    +-----------------------------+-----------------------------------------------+
    | Field                       | Value                                         |
    +-----------------------------+-----------------------------------------------+
    | OS-DCF:diskConfig           | MANUAL                                        |
    | OS-EXT-AZ:availability_zone |                                               |
    | OS-EXT-STS:power_state      | NOSTATE                                       |
    | OS-EXT-STS:task_state       | scheduling                                    |
    | OS-EXT-STS:vm_state         | building                                      |
    | OS-SRV-USG:launched_at      | None                                          |
    | OS-SRV-USG:terminated_at    | None                                          |
    | accessIPv4                  |                                               |
    | accessIPv6                  |                                               |
    | addresses                   |                                               |
    | adminPass                   | KN4nA7xQgkYx                                  |
    | config_drive                |                                               |
    | created                     | 2018-05-26T13:32:56Z                          |
    | flavor                      | m1.nano (0)                                   |
    | hostId                      |                                               |
    | id                          | bfaefe36-2310-4241-bbea-e02e1a4a482f          |
    | image                       | cirros (5bb44bde-d1e8-4937-b0fc-d3cdab6929c5) |
    | key_name                    | mykey                                         |
    | name                        | cirros1                                       |
    | progress                    | 0                                             |
    | project_id                  | 92d1ec3e04384ad599c1a8f5aed73663              |
    | properties                  |                                               |
    | security_groups             | name='1f149288-87c2-43b5-a3b3-89eb153c9249'   |
    | status                      | BUILD                                         |
    | updated                     | 2018-05-26T13:32:56Z                          |
    | user_id                     | 0d7bb3820384452abb97ec0b40c445b1              |
    | volumes_attached            |                                               |
    +-----------------------------+-----------------------------------------------+
    
  3. 列出 instance cirros1,狀態是 ACTIVE。
    [root@controller ~]# openstack server list
    +--------------------------------------+---------+--------+--------------------------+--------+---------+
    | ID                                   | Name    | Status | Networks                 | Image  | Flavor  |
    +--------------------------------------+---------+--------+--------------------------+--------+---------+
    | bfaefe36-2310-4241-bbea-e02e1a4a482f | cirros1 | ACTIVE | selfservice=192.168.10.5 | cirros | m1.nano |
    +--------------------------------------+---------+--------+--------------------------+--------+---------+
    



2018-09-19