本帖最后由 nettman 于 2014-1-19 00:57 编辑
1.错误日志:
2012-10-25 03:10:35 INFO nova.virt.libvirt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] [instance: fecb44a4-5094-465d-91e1-0c051cd271eb] Called setup_basic_filtering in nwfilter
2012-10-25 03:10:35 INFO nova.virt.libvirt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] [instance: fecb44a4-5094-465d-91e1-0c051cd271eb] Ensuring static filters
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using cidr u’0.0.0.0/0′
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using fw_rules: ['-m state --state INVALID -j DROP', '-m state --state ESTABLISHED,RELATED -j ACCEPT', '-j $provider', u'-s 10.0.0.1 -p udp --sport 67 --dport 68 -j ACCEPT', u'-s 10.0.0.0/24 -j ACCEPT', u'-j ACCEPT -p tcp -m multiport --dports 1:65535 -s 0.0.0.0/0']
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using cidr u’0.0.0.0/0′
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using fw_rules: ['-m state --state INVALID -j DROP', '-m state --state ESTABLISHED,RELATED -j ACCEPT', '-j $provider', u'-s 10.0.0.1 -p udp --sport 67 --dport 68 -j ACCEPT', u'-s 10.0.0.0/24 -j ACCEPT', u'-j ACCEPT -p tcp -m multiport --dports 1:65535 -s 0.0.0.0/0', u'-j ACCEPT -p udp -m multiport --dports 1:65535 -s 0.0.0.0/0']
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using cidr u’0.0.0.0/0′
2012-10-25 03:10:56 INFO nova.virt.firewall [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] Using fw_rules: ['-m state --state INVALID -j DROP', '-m state --state ESTABLISHED,RELATED -j ACCEPT', '-j $provider', u'-s 10.0.0.1 -p udp --sport 67 --dport 68 -j ACCEPT', u'-s 10.0.0.0/24 -j ACCEPT', u'-j ACCEPT -p tcp -m multiport --dports 1:65535 -s 0.0.0.0/0', u'-j ACCEPT -p udp -m multiport --dports 1:65535 -s 0.0.0.0/0', u'-j ACCEPT -p icmp -s 0.0.0.0/0']
2012-10-25 03:11:02 INFO nova.compute.manager [req-e805b920-1164-48d5-a9f7-0f97f7f69ba9 None None] [instance: db03b184-b44b-4305-986f-845295ed07e1] Rebooting instance after nova-compute restart.
2012-10-25 03:11:03 INFO nova.virt.libvirt.connection [-] [instance: fecb44a4-5094-465d-91e1-0c051cd271eb] Instance rebooted successfully.
2012-10-25 03:11:03 CRITICAL nova [-] Domain not found: no domain with matching name ‘instance-00000010′ 复制代码
2.编辑libvirt/connection.py
/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.pyreboot happens, as the guest OS cannot ignore this action.
"""
- virt_dom = self._conn.lookupByName(instance['name'])
+ # NOTE: In case of no domain up
+ try:
+ virt_dom = self._conn.lookupByName(instance['name'])
+ except Exception, e:
+ virt_dom = None
if not xml:
- xml = virt_dom.XMLDesc(0)
+ if virt_dom:
+ xml = virt_dom.XMLDesc(0)
+ else:
+ xml = self.to_xml(instance, network_info)
- self.destroy(instance, network_info, cleanup=False)
+ if virt_dom:
+ self.destroy(instance, network_info, cleanup=False)
self.plug_vifs(instance, network_info)
self.firewall_driver.setup_basic_filtering(instance, network_info)
self.firewall_driver.prepare_instance_filter(instance, network_info)
复制代码
3.最后请切换到/path/to/instances/
cd instance-000000XXX
virsh define libvirt.xml
4.reboot instance