检查 glance-cirros 镜像权限开放代码是什么?
时间: 2024-06-01 17:13:07 浏览: 15
这个问题属于技术问题,答案是: `glance image-create --name cirros --disk-format qcow2 --container-format bare --visibility public --file cirros-0.3.5-x86_64-disk.img`。
相关问题
通过OpenStack命令将glance-cirros镜像指定demo项目进行共享使用
1. 首先,使用以下命令登录到OpenStack:
```
$ source admin-openrc.sh
$ openstack login
```
2. 然后,使用以下命令创建一个名为“demo”的项目:
```
$ openstack project create --description "Demo Project" demo
```
3. 使用以下命令切换到“demo”项目:
```
$ source demo-openrc.sh
```
4. 接下来,使用以下命令将“glance-cirros”镜像添加到“demo”项目中:
```
$ openstack image set --property project_id=demo <glance-cirros-image-id>
```
其中,<glance-cirros-image-id>是“glance-cirros”镜像的ID。
5. 最后,使用以下命令将“glance-cirros”镜像设置为公共可见:
```
$ openstack image set --public <glance-cirros-image-id>
```
这样,“demo”项目中的用户就可以访问和使用“glance-cirros”镜像了。
在OpenStack平台的admin项目中使用cirros-0.3.4-x86_64-disk.img镜像文件创建名为glance-cirros的镜像,通过OpenStack命令将glance-cirros镜像指定demo项目进行共享使用
1. 将cirros-0.3.4-x86_64-disk.img镜像文件上传到OpenStack平台中的glance镜像服务中。
```
$ openstack image create --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public glance-cirros
```
2. 将glance-cirros镜像共享给demo项目。
```
$ openstack image set --property visibility=shared glance-cirros
$ openstack image add project demo glance-cirros
```
现在,demo项目就可以使用glance-cirros镜像了。
相关推荐
![rtf](https://img-home.csdnimg.cn/images/20210720083624.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)