[英]Failed to add image. Got error: openstack glance
Following glance command to add image is failing 以下glance命令添加图像失败
glance add name="CirrOS 0.3.1" disk-format=qcow2 container-format=bare is-public=true < cirros-0.3.1-x86_64-disk.img
and the error recieved 并且收到错误
Uploading image 'CirrOS 0.3.1'
=============================================================[100%] 5.68M/s, ETA 0h 0m 0s
Failed to add image. Got error:
Data supplied was not valid.
Details: 400 Bad Request
The server could not comply with the request since it is either malformed or otherwise incorrect.
Failed to activate image. Got error: Data supplied was not valid. Details: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect. Failed to update image metadata. Got error: Data supplied was not valid. Details: Invalid disk format 'None' for image.
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
Not sure which argument went wrong any help appreciated 不知道哪个论点出了错,任何帮助都值得赞赏
this is my file 这是我的档案
ubuntu@ubuntu:~/images$ file cirros-0.3.1-x86_64-disk.img
cirros-0.3.1-x86_64-disk.img: QEMU QCOW Image (v2), 41126400 bytes
One of these options should work: 这些选项之一应该起作用:
The command argument names should use underscores ( _
) instead of dashes ( -
): 命令参数名称应使用下划线(
_
)而不是破折号( -
):
glance add name="CirrOS 0.3.1" disk_format=qcow2 container_format=bare is_public=true < cirros-0.3.1-x86_64-disk.img
Alternatively it might be that the command arguments need to be prefixed with --
: 或者,命令参数可能需要以
--
开头。
glance add --name="CirrOS 0.3.1" --disk-format=qcow2 --container-format=bare --is-public=true < cirros-0.3.1-x86_64-disk.img
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.