xcp icon indicating copy to clipboard operation
xcp copied to clipboard

if VM is shut-down during migration, restart hang forever

Open maxcuttins opened this issue 6 years ago • 6 comments

Migration can fail for several reasons. If it fails, most of the time Linux kernel print in the console a message:

Freezing of tasks failed after 20.005 seconds (1 tasks refusing to freeze, wq_busy=0):

Xen seems to be unaware that hybernation failed so wait for migration forever. In this case could be an option to just shutdown the VM and restart it on another host instead of use live migration.

However if you shutdown a VM and than it's been restarted it on the host that was already embracing the migration just before the shutdown than the start task'll hang forever. So if you don't choose 'another host' than the pool could choose the wrong host.

I guess this is caused by a missed cleanup on the target-host of the live migration (but maybe i'm in wrong).

maxcuttins avatar Feb 11 '19 22:02 maxcuttins

In order to fix this situation I runned:

xe vm-reset-powerstate uuid=<XXXX-XXXX-XXXX-XXXX> force=true

After the reset suddenly restarted without any input. It was likely that start was in queue and was finally just pushed when the powerstate reach the shutdown state.

maxcuttins avatar Feb 11 '19 23:02 maxcuttins

It is indeed not good that one has to run xe vm-reset-powerstate in this kind of situation. If you have the opportunity to reproduce the issue on XS 7.6, please also report it to the XenServer project.

stormi avatar Feb 18 '19 15:02 stormi

Also happened here on a 8.0.0 with all recent patches while evacuating the host for bios updates,

auron-muc avatar Jan 28 '20 11:01 auron-muc

8.1 beta will be here very soon, please try as soon as you can :+1:

olivierlambert avatar Jan 28 '20 11:01 olivierlambert

Actually the beta is already available: https://xcp-ng.org/forum/topic/2516/xcp-ng-8-1-0-beta-now-available

I don't know if anything was done regarding this issue.

stormi avatar Jan 28 '20 12:01 stormi

We're running into this issue during a pool update from 8.1 -> 8.2

d1rtym0nk3y avatar Jul 30 '21 09:07 d1rtym0nk3y