Python glance在哪里存储Openstack中的图像

Python glance在哪里存储Openstack中的图像,python,linux,cloud,openstack,openstack-horizon,Python,Linux,Cloud,Openstack,Openstack Horizon,当我SSH连接到glance服务器时,var/lib/glance/images中没有图像 root@Glance:/var/lib/glance# ls glance.sqlite image-cache images 所有文件夹都是空的,glance.sqlite为27kb 那么所有的图像都在哪里呢?我的目标是找到它们并复制到另一个Openstack。为什么不试试 glance image-list glance image-download your_image_id_here &g

当我
SSH
连接到glance服务器时,var/lib/glance/images中没有图像

root@Glance:/var/lib/glance# ls
glance.sqlite  image-cache  images
所有文件夹都是空的,
glance.sqlite
为27kb

那么所有的图像都在哪里呢?我的目标是找到它们并复制到另一个Openstack。

为什么不试试

glance image-list
glance image-download your_image_id_here > your_image_name.your_image_format
范例

glance image-download 5dde2692-e20c-4c16-a5ff-e9478e14114c > cirros_32bit.qcow2
然后你可以把它们放在你想放的任何地方

确保您已获取凭据,或者必须手动将其作为选项传递给glance命令

export OS_USERNAME=your_username
export OS_PASSWORD=your_password
export OS_TENANT_NAME=your_tenant_name
export OS_AUTH_URL=http://your_keystone_ip:35357/v2.0

同时,图像位于/var/lib/glance/images/

下。如果您确实想找到图像的位置,可以在DB中找到它。 如果您使用的是devstack

#mysql -h localhost -u root -p
mysql> use glance;
mysql> select value from image_locations where image_id="your image ID";

您可以在“值”列下找到位置。

非常感谢您,您的简短回答帮助我整理了有关openstack的知识。我知道所有东西都可以在文档中找到,但到目前为止对我来说有点复杂。你帮了我很多(linux初学者)。