代码之家  ›  专栏  ›  技术社区  ›  aircraft

我的虚拟机无法调整大小,但味道仍然存在

  •  2
  • aircraft  · 技术社区  · 7 年前

    image description
    (来源: openstack.org )

    /var/log/nova-api.log :

    2017-10-11 16:53:07.796 24060 INFO nova.osapi_compute.wsgi.server [-] 118.113.57.187 "GET / HTTP/1.1" status: 200 len: 502 time: 0.0013940
    2017-10-11 16:53:08.129 24060 INFO nova.api.openstack.wsgi [req-24f954ef-4e99-41d4-9700-26fa7204c863 - - - - -] HTTP Exception Thrown :***Cloud hosting type flavor: 2Core1GB40GB1M did not found*** 。
    2017-10-11 16:53:08.131 24060 INFO nova.osapi_compute.wsgi.server [req-24f954ef-4e99-41d4-9700-26fa7204c863 - - - - -] 118.113.57.187 "GET /v2.1/99a50773b170406b8902227118bb72bf/flavors/flavor:%202Core1GB40GB1M HTTP/1.1" status: 404 len: 485 time: 0.2736869
    2017-10-11 16:53:08.248 24060 INFO nova.osapi_compute.wsgi.server [req-b7d1d426-b110-4931-90aa-f9cceeddb187 - - - - -] 118.113.57.187 "GET /v2.1/99a50773b170406b8902227118bb72bf/flavors HTTP/1.1" status: 200 len: 1913 time: 0.0570610
    2017-10-11 16:53:08.565 24060 INFO nova.osapi_compute.wsgi.server [req-8cbc33a5-1a78-4ba7-8869-cf01536f784b - - - - -] 118.113.57.187 "POST /v2.1/99a50773b170406b8902227118bb72bf/flavors HTTP/1.1" status: 200 len: 875 time: 0.2515521
    2017-10-11 16:53:10.433 24059 INFO nova.api.openstack.wsgi [req-42faeebb-d3ad-4e09-90e8-8da64f688fb9 - - - - -] HTTP Exception Thrown:***Can not find valid host,....***。
    2017-10-11 16:53:10.435 24059 INFO nova.osapi_compute.wsgi.server [req-42faeebb-d3ad-4e09-90e8-8da64f688fb9 - - - - -] 118.113.57.187 "POST /v2.1/99a50773b170406b8902227118bb72bf/servers/f9bef431-0635-4c74-9af5-cf61ed4d3ae4/action HTTP/1.1" status: 400 len: 564 time: 1.6831121
    

    无论味道如何,虚拟机都无法调整大小,但味道是存在的。

    2 回复  |  直到 3 年前
        1
  •  2
  •   aircraft    7 年前

    因为我的openstack是一个服务器,所以我不能迁移VM(调整大小的本质是迁移),所以我在我的 nova.conf 的[默认值]:

    allow_resize_to_same_host=True
    

    并重新启动nova相关服务,我成功了:

    # systemctl restart openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
    # systemctl restart openstack-nova-compute.service 
    
        2
  •  0
  •   Carlos Cavero ABU    7 年前

    对于两个节点的配置(控制器和计算),我需要包括更多的参数,正如所解释的那样 here :

    更新nova。控制器和计算机中的conf文件,使用以下行进行计算

       allow_migrate_to_same_host = True
       scheduler_default_filters = AllHostsFilter
       allow_resize_to_same_host = True
    

    重新启动“控制器”节点的以下服务

    • nova-api
    • nova-cert
    • nova-consoleauth
    • nova-scheduler 
    • nova-conductor
    • nova-novncproxy
    

    重新启动计算节点的以下服务:

    • nova-compute