Skip to contentSkip to conversation

Migration of paused domains

DISCUSSION Alessandro Sardo 3 participants 4 messages Jul 19, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

today I wanted to find out if it was possible to migrate a paused domain. So, I tried the following:

# xm pause <dom>
# xm migrate <dom> <dest>

Unfortunately, the migration process would just hang before suspending the domain and transferring its state. In order to resume it and complete migration, I had to unpause the domain:

# xm unpause <dom>

After that, the process did get completed successfully.

-----

Then, I tried and track down the reason of this in the sources, and I came to the following snip (XendDomainInfo.py):

def waitForShutdown(self):
self.state_updated.acquire()
try:
while self._stateGet() in
(DOM_STATE_RUNNING,DOM_STATE_PAUSED):
self.state_updated.wait()
finally:
self.state_updated.release()

It looks like that makes it wait forever, since the domain remains stuck in the DOM_STATE_PAUSED state.

Now, the question is: is that the right behaviour or am I missing something? Is it really not possible to migrate a paused domain?

Thanks,

- AS

#1 lore raw
Quoted 6 lines

today I wanted to find out if it was possible to migrate a paused domain. So, I tried the following:

# xm pause <dom>
# xm migrate <dom> <dest>

For PV domains, migrate requires the DomU itself to make a suspend call to the hypervisor when it is ready to suspend. I guess it can't do that if it is paused...

James

#2 lore raw

James Harper ha scritto:

Quoted 7 lines
Quoted 6 lines

today I wanted to find out if it was possible to migrate a paused domain. So, I tried the following:

# xm pause <dom>
# xm migrate <dom> <dest>
Quoted 5 lines

For PV domains, migrate requires the DomU itself to make a suspend call to the hypervisor when it is ready to suspend. I guess it can't do that if it is paused...

James

I see. Would you be so kind to point me at that suspend call in the sources?

Thanks again!

- AS

#3 lore raw
Quoted 7 lines · Alessandro Sardo

James Harper ha scritto:

Quoted 6 lines
Quoted 5 lines

today I wanted to find out if it was possible to migrate a paused domain. So, I tried the following:

# xm pause <dom>
# xm migrate <dom> <dest>
Quoted 8 lines
Quoted 5 lines

For PV domains, migrate requires the DomU itself to make a suspend call to the hypervisor when it is ready to suspend. I guess it can't do that if it is paused...

James

I see. Would you be so kind to point me at that suspend call in the sources?

In the Linux sources I think you could start browsing from drivers/xen/core/reboot.c::xen_suspend().

The final hypercall to suspend the guest (HYPERVISOR_suspend) is done in drivers/xen/core/machine_reboot.c::take_machine_down()

Hope that helps,
Cheers,
Mark

Quoted 9 lines

Thanks again!

- AS

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 1 line
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)