qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatic block overlay creation with freeing the write lock


From: Rafael Pizarro Solar
Subject: Re: Automatic block overlay creation with freeing the write lock
Date: Mon, 2 Oct 2023 18:11:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

The issue has been solved.

The solution of waiting for QEMU to load the base image passed as argument, then create the overlay with `qmp_blockdev_snapshot_sync` didn't work.

Instead, we first create a new overlay with `bdrv_image_create`, with backing file the original base image passed as argument, then overwrite the image path to the newly created overlay in `drive_init_func_snapshot` (vl.c).

Thank you
Rafael

On 9/26/23 19:58, Rafael Pizarro Solar wrote:

Dear QEMU maintainers,

For reference, I am using QEMU 8.0.0, and running with softmmu-aarch64.

I have been trying implement a feature that directly creates an overlay with the goal of booting multiple instances from the same base image.

Creating a backing file with `qemu-img` does work, but I want to automatize the process by using creating an overlay with the 'qmp_blockdev_snapshot_sync' function or similar.

So far my approach has been to call `qmp_blockdev_snapshot_sync` during startup phase in the `void qmp_x_exit_preconfig(Error **errp)`  stage.

My expected behavior would be that now that there's an overlay, the "write" lock would be released, allowing for a second image to boot, but it fails as the overlay still hasn't released "write" lock for the backing file.

Thank you for your time,  best regards
Rafael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]