分享

无法创建虚拟机

低调 发表于 2017-4-24 17:19:01 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 8682
本机使用Ubuntu16.04虚拟机搭建ocata
以下是错误日志
root@controller:/var/log/nova# tail -100 nova-conductor.log
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager [req-bc808c42-0f87-426e-9035-6a8b39049d4f a4ab79f4583f4934acccd52f5f965f4c 3ae4e0d8b2814b1fbe599834e661eaef - - -] Failed to schedule instances
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager Traceback (most recent call last):
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 866, in schedule_and_build_instances
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     request_specs[0].to_legacy_filter_properties_dict())
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 597, in _schedule_instances
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     hosts = self.scheduler_client.select_destinations(context, spec_obj)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/utils.py", line 371, in wrapped
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return func(*args, **kwargs)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/__init__.py", line 51, in select_destinations
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return self.queryclient.select_destinations(context, spec_obj)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/__init__.py", line 37, in __run_method
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return getattr(self.instance, __name)(*args, **kwargs)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/query.py", line 32, in select_destinations
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return self.scheduler_rpcapi.select_destinations(context, spec_obj)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/rpcapi.py", line 129, in select_destinations
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return cctxt.call(ctxt, 'select_destinations', **msg_args)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 169, in call
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     retry=self.retry)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 97, in _send
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     timeout=timeout, retry=retry)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 458, in send
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     retry=retry)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 449, in _send
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     raise result
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager NoValidHost_Remote: No valid host was found. There are not enough hosts available.
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager Traceback (most recent call last):
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 218, in inner
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     return func(*args, **kwargs)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 98, in select_destinations
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     dests = self.driver.select_destinations(ctxt, spec_obj)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager   File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 79, in select_destinations
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager     raise exception.NoValidHost(reason=reason)
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager NoValidHost: No valid host was found. There are not enough hosts available.
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:53.332 2680 ERROR nova.conductor.manager
2017-04-24 14:34:55.470 2680 WARNING nova.scheduler.utils [req-bc808c42-0f87-426e-9035-6a8b39049d4f a4ab79f4583f4934acccd52f5f965f4c 3ae4e0d8b2814b1fbe599834e661eaef - - -] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 218, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/nova/scheduler/manager.py", line 98, in select_destinations
    dests = self.driver.select_destinations(ctxt, spec_obj)

  File "/usr/lib/python2.7/dist-packages/nova/scheduler/filter_scheduler.py", line 79, in select_destinations
    raise exception.NoValidHost(reason=reason)

NoValidHost: No valid host was found. There are not enough hosts available.

2017-04-24 14:34:55.507 2680 WARNING nova.scheduler.utils [req-bc808c42-0f87-426e-9035-6a8b39049d4f a4ab79f4583f4934acccd52f5f965f4c 3ae4e0d8b2814b1fbe599834e661eaef - - -] [instance: 592c1d3f-fbe9-45d2-b92d-4b1cc5ca5c9a] Setting instance to ERROR state.

计算节点的nova-compute.log显示:nova-schuduler.client.report[...]Unable to refresh my resource provider record.

ERROR nova-schuduler.client.report[...] Failed to create resource provider record in placement API for UUID ...
<title> 404 Not Found
<p>The request URL /placement/resource_providers was not found on this server.

已有(4)人评论

跳转到指定楼层
sstutu 发表于 2017-4-24 17:32:27
原因比较多。
首先查看下所有的服务是否正常.
[mw_shl_code=bash,true]openstack compute service list[/mw_shl_code]
然后再看看配置
比如 /etc/nova/nova.conf

ram_allocation_ratio 改为3.0
重启Nova的服务。
回复

使用道具 举报

低调 发表于 2017-4-24 21:25:38
sstutu 发表于 2017-4-24 17:32
原因比较多。
首先查看下所有的服务是否正常.
[mw_shl_code=bash,true]openstack compute service list[/ ...

你好,非常感谢你的回复。我按照你的建议试了一下,发现还是无法创建。并且在还创建虚拟机之前,计算节点的nova-compute就有错误日志,
2017-04-24 21:12:30.575 1507 ERROR nova.scheduler.client.report [req-d970e00a-eaba-4bf5-8452-3cde5243e6d2 - - - - -] Failed to create resource provider record in placement API for UUID 50da6811-e3b2-431a-b7a1-f14592b9da5a. Got 404: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /placement/resource_providers was not found on this server.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at 192.168.10.106 Port 80</address>
</body></html>
.
2017-04-24 21:12:30.576 1507 WARNING nova.scheduler.client.report [req-d970e00a-eaba-4bf5-8452-3cde5243e6d2 - - - - -] Unable to refresh my resource provider record
2017-04-24 21:12:30.684 1507 INFO nova.compute.resource_tracker [req-d970e00a-eaba-4bf5-8452-3cde5243e6d2 - - - - -] Final resource view: name=compute phys_ram=2853MB used_ram=512MB phys_disk=58GB used_disk=0GB total_vcpus=1 used_vcpus=0 pci_stats=[]

感觉是计算节点无法将自己的资源信息传到控制节点,但是在控制节点的日志中有这个计算节点每隔一段时间的更新成功的日志。
请问这个是什么原因?

回复

使用道具 举报

2017 发表于 2017-4-24 22:14:11
低调 发表于 2017-4-24 21:25
你好,非常感谢你的回复。我按照你的建议试了一下,发现还是无法创建。并且在还创建虚拟机之前,计算节点 ...

phys_ram=2853MB used_ram=512MB phys_disk=58GB used_disk=0GB total_vcpus=1 used_vcpus=0 pci_stats=[]首先需要排除基本的问题,也就是服务和配置。排除这两个,可以参考这个帖子

实例启动error,非菜鸡提问,非弱智问题【已解决】
http://www.aboutyun.com/forum.php?mod=viewthread&tid=21535



回复

使用道具 举报

低调 发表于 2017-4-27 20:44:22
非常感谢你的建议和帮助!我终于解决了这个问题,我把按官网创建的openstack endpoint create --region RegionOne placement public http://controller/placement 改为openstack endpoint create --region RegionOne placement public http://controller:8778,下面的internal 、admin同样修改,8778来源于/etc/apache2/sites-available/nova-placement-api.conf。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条