openstack调整云主机报错:Openstack resize instance no valid host was found

调整云主机时,直接报错HTTP400,“No valid host was found. No valid host found for resize (HTTP 400)”

然后我搜了一下,有位小哥说了答案:因为nova配置文件默认不允许在相同的节点调度,允许调度后就正常了,也就是

allow_resize_to_same_host to true in /etc/nova/nova.conf 

以下是小哥的链接:

Openstack resize instance no valid host was found

Today I had to resize an instance in my OpenStack and noticed that I couldn’t do that because of an error: “No valid host was found. No valid host found for resize (HTTP 400)“. Soon enough I understood OpenStack was trying to resize the instance by using another host, however my setup is a all-in-one node.

The solution
is rather simple: set the property allow_resize_to_same_host to true in /etc/nova/nova.conf . After this restart nova-compute and nova-api by doing

# systemctl restart openstack-nova-compute
# systemctl restart openstack-nova-api
Also be careful, if you set up to save the root disk inside of Cinder (boot and create volume). I still haven’t found a way to resize using Nova. Inexplicably the request times out and the instance enters the state VM_ERROR. The workaround I used is:

Delete the instance while keeping the volume that contains the root.
Create a new instance booting from the root volume of the precedent.
Re-assign floating IP.
EDIT: After a few tweaks and a reboot I can now resize instances with root disk inside Cinder. It was probably due to a malfunction in the cinder-scheduler component.

此条目发表在OpenStack分类目录,贴了标签。将固定链接加入收藏夹。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注