Nova Image has no associated data
我們使用
$ glance image-list | grep xxx
發現該鏡像是存在的、然後我們去/var/lib/glance/images
目錄下查看、發現鏡像只有幾個?
drwxr-xr-x 2 glance glance 4096 Aug 1 17:07 ./
drwxr-xr-x 4 glance glance 4096 Jul 15 2018 ../
-rw-r----- 1 glance glance 810436096 Jul 29 15:32 226ab70b-c028-4329-8dbb-a087703fce7b
-rw-r----- 1 glance glance 1484259328 Aug 1 17:07 3946c59b-36d2-4a14-92be-6b04a8279d55
-rw-r----- 1 glance glance 3068592128 Jul 15 20:24 55ff0d76-0f89-409a-89ac-2469ee54948d
-rw-r----- 1 glance glance 1013153792 Jul 13 23:22 774f0557-2a87-4390-96ee-7f8723c6a17a
-rw-r----- 1 glance glance 2302410752 Jul 30 17:04 c131dc20-10d8-4648-a202-a3d2c6cd7a49
目錄下的文件是以鏡像ID
命名的
可能是刪除了鏡像文件以後、沒有對數據庫進行清理,我們首先要刪除該鏡像然後重新上傳鏡像
$ openstack image create "cirros" --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public
保存鏡像
$ openstack image save --file router.img dfeef3ba-2aad-4139-baa0-a339701ba500
其中 router.img
是我們要保存的鏡像的名字,後面的 id
是鏡像的 ID