Live-Migration时命令行显示正常。
limingfu@control-node:/opt/stack/logs/screen$ vim screen-n-sch.log
limingfu@control-node:/opt/stack/logs/screen$ vim screen-n-sch.log
limingfu@control-node:/opt/stack/logs/screen$ nova live-migration vm1 compute-node-3
limingfu@control-node:/opt/stack/logs/screen$

但虚拟机没有迁移。

控制节点log----------------------------------------------------------------------------------------------------------------------

查看nova-schdule.log,报如下错误

2013-07-14 19:30:28.478 ^[[00;32mDEBUG nova.openstack.common.rpc.amqp [^[[01;36mreq-e2009685-2a58-4ffc-b38b-725e89d8ec9d ^[[00;36madmin admin^[[00;32m] ^[[01;35m^[[00;32mUNIQUE_ID is f4aab2ab003e4330b75cf41ae888d8b9.^[[00m ^[[00;33mfrom (pid=6518) _add_unique_id /opt/stack/nova/nova/openstack/common/rpc/amqp.py:322^[[00m
2013-07-14 19:30:28.480 ^[[01;31mERROR nova.openstack.common.rpc.common [^[[01;36mreq-e2009685-2a58-4ffc-b38b-725e89d8ec9d ^[[00;36madmin admin^[[01;31m] ^[[01;35m^[[01;31mFailed to publish message to topic 'compute.compute-node-3': Socket closed^[[00m
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00mTraceback (most recent call last):
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 589, in ensure
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m return method(*args, **kwargs)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 700, in _publish
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m publisher = cls(self.conf, self.channel, topic, **kwargs)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 377, in __init__
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m **options)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 324, in __init__
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.reconnect(channel)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 332, in reconnect
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m routing_key=self.routing_key)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 83, in __init__
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.revive(self._channel)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 214, in revive
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.declare()
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 100, in declare
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.exchange.declare()
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/entity.py", line 162, in declare
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m nowait=nowait, passive=passive,
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/channel.py", line 603, in exchange_declare
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m (40, 11), # Channel.exchange_declare_ok
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/abstract_channel.py", line 69, in wait
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.channel_id, allowed_methods)
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 204, in _wait_method
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.method_reader.read_method()
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/method_framing.py", line 187, in read_method
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m raise m
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00mIOError: Socket closed
^[[01;31m2013-07-14 19:30:28.480 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m
2013-07-14 19:30:28.481 ^[[00;36mINFO nova.openstack.common.rpc.common [^[[01;36mreq-e2009685-2a58-4ffc-b38b-725e89d8ec9d ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mReconnecting to AMQP server on localhost:5672^[[00m
2013-07-14 19:30:28.489 ^[[00;32mDEBUG amqp [^[[00;36m-^[[00;32m] ^[[01;35m^[[00;32mStart from server, version: 0.9, properties: {u'information': u'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': u'RabbitMQ', u'copyright': u'Copyright (C) 2007-2011 VMware, Inc.', u'capabilities': {u'exchange_exchange_bindings': True, u'consumer_cancel_notify': True, u'publisher_confirms': True, u'basic.nack': True}, u'platform': u'Erlang/OTP', u'version': u'2.7.1'}, mechanisms: [u'PLAIN', u'AMQPLAIN'], locales: [u'en_US']^[[00m ^[[00;33mfrom (pid=6518) _start /usr/local/lib/python2.7/dist-packages/amqp/connection.py:706^[[00m

查看nova-api.log,报如下错误------------------------------------------------------------------------------------------------------------

2013-07-14 19:30:28.388 ^[[01;31mERROR nova.openstack.common.rpc.common [^[[01;36mreq-e2009685-2a58-4ffc-b38b-725e89d8ec9d ^[[00;36madmin admin^[[01;31m] ^[[01;35m^[[01;31mFailed to publish message to topic 'conductor': Socket closed^[[00m
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00mTraceback (most recent call last):
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 589, in ensure
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m return method(*args, **kwargs)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 700, in _publish
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m publisher = cls(self.conf, self.channel, topic, **kwargs)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 377, in __init__
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m **options)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 324, in __init__
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.reconnect(channel)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 332, in reconnect
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m routing_key=self.routing_key)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 83, in __init__
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.revive(self._channel)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 214, in revive
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.declare()
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 100, in declare
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.exchange.declare()
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/kombu/entity.py", line 162, in declare
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m nowait=nowait, passive=passive,
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/channel.py", line 603, in exchange_declare
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m (40, 11), # Channel.exchange_declare_ok
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/abstract_channel.py", line 69, in wait
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.channel_id, allowed_methods)
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 204, in _wait_method
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m self.method_reader.read_method()
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/amqp/method_framing.py", line 187, in read_method
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m raise m
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00mIOError: Socket closed
^[[01;31m2013-07-14 19:30:28.388 TRACE nova.openstack.common.rpc.common ^[[01;35m^[[00m
2013-07-14 19:30:28.389 ^[[00;36mINFO nova.openstack.common.rpc.common [^[[01;36mreq-e2009685-2a58-4ffc-b38b-725e89d8ec9d ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mReconnecting to AMQP server on localhost:5672^[[00m

计算节点log----------------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/queue.py", line 107, inswitch
self.greenlet.switch(value)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 194, inmain
result = function(*args, **kwargs)
File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3355, in_live_migration
recover_method(context, instance, dest, block_migration)
File "/usr/lib/python2.7/contextlib.py", line 24, in__exit__
self.gen.next()
File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3349, in_live_migration
CONF.live_migration_bandwidth)
File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, indoit
result = proxy_call(self._autowrap, f, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, inproxy_call
rv = execute(f,*args,**kwargs)
File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, intworker
rv = meth(*args,**kwargs)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 951, inmigrateToURI
ifret == -1: raise libvirtError ('virDomainMigrateToURI() failed', dom=self)
libvirtError: operation failed: Failed to connect to remote libvirt URI qemu+tcp://compute-node-3/system
问题解决方法:在控制节点和计算节点的/etc/hosts中加入其它节点的ip