WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Live Migration problems using xenapi with xm

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: Live Migration problems using xenapi with xm
From: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Date: Thu, 08 Nov 2007 09:32:02 -0500
Delivery-date: Thu, 08 Nov 2007 06:32:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4731DF7D.8000709@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4731DF7D.8000709@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
I've managed to track this down to being a bug in HVM migration using XenAPI.

It seems that restore is trying to restore a PV guest, while save is trying to save an HVM guest... so the protocol of how many mytes to read on the socket is off, and naturally fails when it tries to read much more data than the max batch size allows.

Tracing this back, it seems to come down to the "is_hvm" method of the XendConfig class, which checks the "HVM_boot_policy" parameter. For some reason, it seems this parameter is not being preserved during domain creation with xenapi, because by the time migration occurs, the dictionary item no longer exists.

I'll continue to dig further, but if anyone has any thoughts on this, I'd welcome pointers.



Ben Guthro wrote:
I am seeing a problem when live migrating a guest under unstable when I have xm configured to XenAPI.

If my xm-config.xml file has the XenAPI stuff commented out - live migrate (xm migrate --live <domid> <dest IP>) seems to be working in my test environment.

However, if I enable it - I get failures when migrating the same guest (see dump from xend.log below.) They obviously go down quite different code paths in these two cases.

Being somewhat new to the xm, and xenapi control stacks - I was hoping someone might point me in the right direction to track down what might be happening here...

Any help is appreciated.

Ben

Xend log snippet:

2007-11-07 09:01:35 15422] DEBUG (XendCheckpoint:88) [xc_save]: /usr/lib64/xen/bin/xc_save 20 2 0 0 5 [2007-11-07 09:01:35 15422] INFO (XendCheckpoint:362) Saving memory pages: iter 1 0%ERROR Internal error: Error when writing to state file (5) (errno 104)
[2007-11-07 09:01:35 15422] INFO (XendCheckpoint:362) Save exit rc=1
[2007-11-07 09:01:36 15422] ERROR (XendCheckpoint:140) Save failed on domain VS022 (2).
Traceback (most recent call last):
File "/usr/lib64/python/xen/xend/XendCheckpoint.py", line 108, in save
  forkHelper(cmd, fd, saveInputHandler, False)
File "/usr/lib64/python/xen/xend/XendCheckpoint.py", line 350, in forkHelper
  raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib64/xen/bin/xc_save 20 2 0 0 5 failed
[2007-11-07 09:01:36 15422] DEBUG (XendDomainInfo:1856) XendDomainInfo.resumeDomain(2) [2007-11-07 09:01:36 15422] ERROR (xmlrpclib2:166) Internal error handling VM.migrate
Traceback (most recent call last):
File "/usr/lib64/python/xen/util/xmlrpclib2.py", line 131, in _marshaled_dispatch
  response = self._dispatch(method, params)
File "/usr/lib64/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch
  return func(*params)
File "/usr/lib64/python/xen/xend/XendAPI.py", line 221, in f
  return func(self, *args, **kwargs)
File "/usr/lib64/python/xen/xend/XendAPI.py", line 256, in check_session
  return func(self, session, *args, **kwargs)
File "/usr/lib64/python/xen/xend/XendAPI.py", line 312, in <lambda>
  'VM', func, *args, **kwargs)
File "/usr/lib64/python/xen/xend/XendAPI.py", line 268, in _check_ref
  return func(api, session, ref, *args, **kwargs)
File "/usr/lib64/python/xen/xend/XendAPI.py", line 1763, in VM_migrate
  bool(live), resource, port)
File "/usr/lib64/python/xen/xend/XendDomain.py", line 1282, in domain_migrate
  XendCheckpoint.save(sock.fileno(), dominfo, True, live, dst)
File "/usr/lib64/python/xen/xend/XendCheckpoint.py", line 142, in save
  dominfo.resumeDomain()
File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 1885, in resumeDomain
  if self.is_hvm():
File "/usr/lib64/python/xen/xend/XendDomainInfo.py", line 2139, in __getattr__
  raise AttributeError()
AttributeError





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel