制作的windows镜像至少7G以上,通过命令行上传(实际走的还是http通讯)服务器经常返回502。
502 Bad Gateway: Bad Gateway: The proxy server received an invalid: response from an upstream server.: Apache/2.4.18 (Ubuntu) Server at 192.168.18.61 Port 80 (HTTP 502)
经验证,通过以下方式可以轻松上传大镜像
1.首先创建一个dummy文件(0 byte)
cd /opt/image/
touch dummy
2.后把dummy文件作为镜像上传(秒速)
glance image-create --name win7 --file /opt/image/dummy --disk-format qcow2 --container-format bare --visibility