<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=gb2312"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:SimSun;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:SimSun;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have exactly the same problem myself DeadSun.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>nova-compute on the target node is attempting to retrieve the base image from Glance. Glance in response is saying the requestor is unauthenticated.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Unfortunately I’ve not been able to find a solution. I posted a question on Launchpad but I’ve had no response yet, <a href="https://answers.launchpad.net/nova/+question/176608">https://answers.launchpad.net/nova/+question/176608</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Adrian <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> DeadSun [mailto:mwjpiero@gmail.com] <br><b>Sent:</b> Tuesday, November 01, 2011 12:55 PM<br><b>To:</b> Smith, Adrian F<br><b>Cc:</b> openstack@lists.launchpad.net<br><b>Subject:</b> Re: [Openstack] how to configure nova block_migration<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi,Adrian<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for your help.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Do I need set some flags in nova.conf?<o:p></o:p></p></div><div><p class=MsoNormal>in my nova.conf ,I set<o:p></o:p></p></div><div><p class=MsoNormal><strong><span style='font-family:SimSun'>--live_migration_uri=qemu+ssh://%s/system</span></strong><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>and I have tried it but error log show <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><strong><span style='font-family:SimSun'>(nova.compute.manager): TRACE:</span></strong><b><br><strong><span style='font-family:SimSun'>2011-11-01 16:55:59,136 DEBUG nova.rpc [-] Making asynchronous cast on compute.node1-test... from (pid=6815) cast /home/openstack/nova/nova/rpc/impl_kombu.py:746</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:55:59,140 ERROR nova.rpc [-] Exception during message handling</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: Traceback (most recent call last):</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/rpc/impl_kombu.py", line 620, in _process_data</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/compute/manager.py", line 1615, in live_migration</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: raise exc</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: RemoteError: Remote error: None None</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: None.</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE:</span></strong></b><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>and in dest node, compute.log show<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,035 DEBUG nova.utils [-] Attempting to grab semaphore "0ade7c2cf97f75d009975f4d720d1fa6c19f4897_sm" for method "call_if_not_exists"... from (pid=17799) inner /home/openstack/nova/nova/utils.py:717</span></strong><b><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,043 ERROR nova.rpc [-] Exception during message handling</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: Traceback (most recent call last):</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/rpc/impl_kombu.py", line 620, in _process_data</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/compute/manager.py", line 1569, in pre_live_migration</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: disk)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 1803, in pre_block_migration</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: size=instance_ref['local_gb'])</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 804, in _cache_image</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: call_if_not_exists(base, fn, *args, **kwargs)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/utils.py", line 730, in inner</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: retval = f(*args, **kwargs)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 802, in call_if_not_exists</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: fn(target=base, *args, **kwargs)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 816, in _fetch_image</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: images.fetch_to_raw(context, image_id, target, user_id, project_id)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/images.py", line 52, in fetch_to_raw</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: metadata = fetch(context, image_href, path_tmp, user_id, project_id)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/images.py", line 46, in fetch</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: metadata = image_service.get(context, image_id, image_file)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/image/glance.py", line 239, in get</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: image_meta, image_chunks = client.get_image(image_id)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/glance/client.py", line 83, in get_image</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: res = self.do_request("GET", "/images/%s" % image_id)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 145, in do_request</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: method, action, body=body, headers=headers, params=params)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 222, in _do_request</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: raise exception.NotAuthorized(res.read())</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: NotAuthorized: 401 Unauthorized</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE:</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE:</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: Authentication required</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE:</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,044 ERROR nova.rpc [-] Returning exception 401 Unauthorized</span></strong><br><br><strong><span style='font-family:SimSun'>This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.</span></strong><br><br><strong><span style='font-family:SimSun'>Authentication required to caller</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,044 ERROR nova.rpc [-] ['Traceback (most recent call last):\n', ' File "/home/openstack/nova/nova/rpc/impl_kombu.py", line 620, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', ' File "/home/openstack/nova/nova/compute/manager.py", line 1569, in pre_live_migration\n disk)\n', ' File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 1803, in pre_block_migration\n size=instance_ref[\'local_gb\'])\n', ' File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 804, in _cache_image\n call_if_not_exists(base, fn, *args, **kwargs)\n', ' File "/home/openstack/nova/nova/utils.py", line 730, in inner\n retval = f(*args, **kwargs)\n', ' File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 802, in call_if_not_exists\n fn(target=base, *args, **kwargs)\n', ' File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 816, in _fetch_image\n images.fetch_to_raw(context, image_id, target, user_id, project_id)\n', ' File "/home/openstack/nova/nova/virt/images.py", line 52, in fetch_to_raw\n metadata = fetch(context, image_href, path_tmp, user_id, project_id)\n', ' File "/home/openstack/nova/nova/virt/images.py", line 46, in fetch\n metadata = image_service.get(context, image_id, image_file)\n', ' File "/home/openstack/nova/nova/image/glance.py", line 239, in get\n image_meta, image_chunks = client.get_image(image_id)\n', ' File "/usr/lib/python2.7/dist-packages/glance/client.py", line 83, in get_image\n res = self.do_request("GET", "/images/%s" % image_id)\n', ' File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 145, in do_request\n method, action, body=body, headers=headers, params=params)\n', ' File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 222, in _do_request\n raise exception.NotAuthorized(res.read())\n', 'NotAuthorized: 401 Unauthorized\n\nThis server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.\n\n Authentication required \n']</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,156 DEBUG nova.rpc [-] received {u'_context_roles': [], u'_context_request_id': u'3fcbe6e7-b066-4c00-92df-8bac652ec870', u'_context_read_deleted': False, u'args': {u'instance_id': 8}, u'_context_auth_token': None, u'_context_strategy': u'noauth', u'_context_is_admin': True, u'_context_project_id': None, u'_context_timestamp': u'2011-11-01T08:59:35.474878', u'_context_user_id': None, u'method': u'rollback_live_migration_at_destination', u'_context_remote_address': None} from (pid=17799) __call__ /home/openstack/nova/nova/rpc/impl_kombu.py:600</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,157 DEBUG nova.rpc [-] unpacked context: {'user_id': None, 'roles': [], 'timestamp': u'2011-11-01T08:59:35.474878', 'auth_token': None, 'msg_id': None, 'remote_address': None, 'strategy': u'noauth', 'is_admin': True, 'request_id': u'3fcbe6e7-b066-4c00-92df-8bac652ec870', 'project_id': None, 'read_deleted': False} from (pid=17799) _unpack_context /home/openstack/nova/nova/rpc/impl_kombu.py:646</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,216 DEBUG nova.rpc [-] Making asynchronous call on network ... from (pid=17799) multicall /home/openstack/nova/nova/rpc/impl_kombu.py:721</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,217 DEBUG nova.rpc [-] MSG_ID is f8a4567e4b3f45679a730f3f6c357e23 from (pid=17799) multicall /home/openstack/nova/nova/rpc/impl_kombu.py:724</span></strong><br><strong><span style='font-family:SimSun'>2011-11-01 16:58:44,479 ERROR nova.rpc [-] Exception during message handling</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: Traceback (most recent call last):</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/rpc/impl_kombu.py", line 620, in _process_data</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/compute/manager.py", line 1774, in rollback_live_migration_at_destination</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: block_device_info, True)</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: File "/home/openstack/nova/nova/virt/libvirt/connection.py", line 311, in destroy</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: virt_dom.undefine()</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE: AttributeError: 'NoneType' object has no attribute 'undefine'</span></strong><br><strong><span style='font-family:SimSun'>(nova.rpc): TRACE:</span></strong></b><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>2011/11/1 <<a href="mailto:Adrian_F_Smith@dell.com">Adrian_F_Smith@dell.com</a>><o:p></o:p></p><div><div><p>There isn't really any block migration specific configuration. So long as your multi-node nova installation is working you should be fine.<o:p></o:p></p><p> <o:p></o:p></p><p>The source and target nodes must have compatible CPU architectures and capabilities. Nova-compute on the target node will need access to the VM’s base image (i.e. on Glance if that’s what you’re using) so that it can fetch it during the migration.<o:p></o:p></p><p> <o:p></o:p></p><p>The command to do the migration is,<o:p></o:p></p><p> <o:p></o:p></p><p>$ nova-manage vm block_migration <ec2 instance id> <destination node><o:p></o:p></p><p> <o:p></o:p></p><p>Adrian<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt'>From:</span></b><span lang=EN-US style='font-size:10.0pt'> openstack-bounces+adrian_f_smith=<a href="mailto:dell.com@lists.launchpad.net" target="_blank">dell.com@lists.launchpad.net</a> [mailto:<a href="mailto:openstack-bounces%2Badrian_f_smith" target="_blank">openstack-bounces+adrian_f_smith</a>=<a href="mailto:dell.com@lists.launchpad.net" target="_blank">dell.com@lists.launchpad.net</a>] <b>On Behalf Of </b>DeadSun<br><b>Sent:</b> Tuesday, November 01, 2011 9:07 AM<br><b>To:</b> <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br><b>Subject:</b> [Openstack] how to configure nova block_migration</span><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>because I have no shared storage, I want to know how nova use kvm block migration and how to configure it<br clear=all><br>-- <br><span lang=ZH-CN>非淡薄无以明志,非宁静无以致远</span><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><o:p></o:p></p></div><p class=MsoNormal><br><br clear=all><br>-- <br><span lang=ZH-CN>非淡薄无以明志,非宁静无以致远</span><o:p></o:p></p></div></body></html>