- 取得 demo 的令牌
[root@controller ~]# source demo.token
- 查看 instance
[root@controller ~]# openstack server list
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
| 7b50da3e-1895-460d-b9aa-325c66931631 | win7-test1 | SHUTOFF | selfservice=192.168.10.11 | win7 | m1.crt |
| bfaefe36-2310-4241-bbea-e02e1a4a482f | cirros1 | SHUTOFF | selfservice=192.168.10.5 | cirros | m1.nano |
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
- 刪除 instance win7-test1
[root@controller ~]# openstack server delete win7-test1
[root@controller ~]# openstack server list
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
| bfaefe36-2310-4241-bbea-e02e1a4a482f | cirros1 | SHUTOFF | selfservice=192.168.10.5 | cirros | m1.nano |
+--------------------------------------+--------------+---------+---------------------------+----------+---------+
- 取得 admin 的令牌
[root@controller ~]# source admin.token
- 列出 images
[root@controller ~]# openstack image list
+--------------------------------------+-----------------+--------+
| ID | Name | Status |
+--------------------------------------+-----------------+--------+
| 5bb44bde-d1e8-4937-b0fc-d3cdab6929c5 | cirros | active |
| ba1684d2-def8-4325-a2a4-ab7689baf0ab | crt2-20191002 | active |
| e4bea3db-581a-472d-a0dd-37b1e7055bbf | crtusb | active |
| be9ab170-d0b4-46ec-8eda-e073b03f00a0 | esm | active |
| 5c7046c9-9196-4668-a7e3-50acaf32d41f | fsa | active |
| dc6f8495-0f44-4502-8812-5f8e6b1bdf77 | gitlab-20181121 | active |
| 609332b6-0440-4606-8981-8b4732c893bc | kvm7 | active |
| 95544249-56c6-4b30-91db-0f7d05f4d695 | kvm7-14g | active |
| c2e0bf58-c685-449d-bfb2-4d16c7d9567e | win7 | active |
+--------------------------------------+-----------------+--------+
- 刪除 image win7
[root@controller ~]# openstack image delete win7
- 列出所有 images,win7 已刪除。
[root@controller ~]# openstack image list
+--------------------------------------+-----------------+--------+
| ID | Name | Status |
+--------------------------------------+-----------------+--------+
| 5bb44bde-d1e8-4937-b0fc-d3cdab6929c5 | cirros | active |
| ba1684d2-def8-4325-a2a4-ab7689baf0ab | crt2-20191002 | active |
| e4bea3db-581a-472d-a0dd-37b1e7055bbf | crtusb | active |
| be9ab170-d0b4-46ec-8eda-e073b03f00a0 | esm | active |
| 5c7046c9-9196-4668-a7e3-50acaf32d41f | fsa | active |
| dc6f8495-0f44-4502-8812-5f8e6b1bdf77 | gitlab-20181121 | active |
| 609332b6-0440-4606-8981-8b4732c893bc | kvm7 | active |
| 95544249-56c6-4b30-91db-0f7d05f4d695 | kvm7-14g | active |
+--------------------------------------+-----------------+--------+