"Arisetty, Chakri" <caris...@akamai.com> writes:

> Hello,
>
> I’m having trouble with live migration and I’m using QEMU 7.2.0 on Debian 11.
>
> Migration state switches to pre-switchover state during the RAM migration.
>
> My assumption is that disks are already migrated and there are no further 
> dirty pages to be transferred from source host to destination host. 
> Therefore, NBD client on the source host closes the connection to the NBD 
> server on the destination host. But we observe that there are still some 
> dirty pages being transferred.
> Closing prematurely NBD connection results in BLOCK JOB error.
> In the RAM migration code (migration/migration.c), I’d like to check for 
> block mirror job’s status before RAM migration state is moved to 
> pre-switchover. I’m unable to find any block job related code in RAM 
> migration code.
>
> Could someone help me figuring out what might be going wrong or suggest any 
> troubleshooting steps or advice to get around the issue?
>
> Thanks
> Chakri

Hi, I believe it was you who opened this bug as well? 

https://gitlab.com/qemu-project/qemu/-/issues/2482

So the core of the issue here is that the block job is transitioning to
ready while the migration is still ongoing so there's still dirtying
happening.

Have you looked at the documentation at
docs/interop/live-block-operations.rst? Section "QMP invocation for live
storage migration with ``drive-mirror`` + NBD", point 4 says that a
block-job-cancel should be issues after BLOCK_JOB_READY is
reached. Although there is mention of when the migration should be
performed.

Reply via email to