public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Sichert" <l.sichert@proxmox.com>
To: "Fiona Ebner" <f.ebner@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH-SERIES qemu-server v3 00/18] fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive with snapshot-as-volume-chain
Date: Thu, 23 Apr 2026 15:57:31 +0200	[thread overview]
Message-ID: <DI0L56K45KJK.1G3MBGPZI2KJV@proxmox.com> (raw)
In-Reply-To: <20260423093753.43199-1-f.ebner@proxmox.com>

Everything works as expected.

My setup for testing:

I configured one PVE machine as an iSCSI target server and exported a
400 GB disk as a writable LUN. On a second PVE machine, in the GUI I
added the target LUN as iSCSI storage, created a volume group (VG) on
top of it, and then added a LVM storage based on that VG.

For testing, I used Windows Server 2022 Evaluation and Windows 11.

Before the patch:
-taking live snapshots was not possible
-removing any snapshot live was not possible

After the patch:
-taking live snapshots is possible
-removing live snapshots is possible, except for the top-most snapshot

Unrelated to the patch, works with and without it:
-rollbacks power off the VM and are therefore possible
-offline snapshots are still possible

I will go through the code to give a review soon.

Tested-by: Lukas Sichert <l.sichert@proxmox.com>

On 2026-04-23 11:35, Fiona Ebner <f.ebner@proxmox.com> wrote:

> Changes in v3:
> * Rebase on latest master (adapt to change from new perltidy version).
>
> Changes in v2:
> * Rebase on latest master (many modified functions moved to
>   VolumeChain.pm).
> * get_node_name_below_throttle(): also die after else branch if no
>   top node can be found.
>
> The QMP commands for snapshot operations can just be passed to the
> qemu-storage-daemon for the FUSE-exported TPM state and it will handle
> it just the same as the main QEMU instance.
>
> There is a single limitation remaining. That limitation is removing
> the top-most snapshot live when the current image is exported via
> FUSE, because exporting unshares the 'resize' permission, which would
> be required by both 'block-commit' and 'block-stream', for example:
>
>> QEMU storage daemon 100 qsd command 'block-commit' failed - Permission
>> conflict on node '#block017': permissions 'resize' are both required
>> by node 'drive-tpmstate0' (uses node '#block017' as 'file' child) and
>> unshared by commit job 'commit-drive-tpmstate0' (uses node '#block017'
>> as 'main node' child).
>
> Most of the work is preparing the code interacting with the block
> layer to support different QMP peers.
>
> The first two commits are independent from the goal of the series, but
> tangentially related.
>
> Since this touches quite a bit of code, more testing would be very
> appreciated!
>
> qemu-server:
>
> Fiona Ebner (18):
>   block job: fix variable name in documentation
>   qmp client: add default timeouts for more block commands
>   drive: introduce drive_uses_qsd_fuse() helper
>   monitor: add vm_qmp_peer() helper
>   monitor: add qsd_peer() helper
>   blockdev: rename variable in get_node_name_below_throttle() for
>     readability
>   blockdev: switch get_node_name_below_throttle() to use QMP peer
>   blockdev: switch detach() to use QMP peer
>   blockdev: switch blockdev_replace() to use QMP peer
>   blockdev: switch blockdev_external_snapshot() to use QMP peer
>   block job: switch qemu_handle_concluded_blockjob() to use QMP peer
>   block job: switch qemu_blockjobs_cancel() to use QMP peer
>   block job: switch qemu_drive_mirror_monitor() to use QMP peer
>   blockdev: switch blockdev_delete() to use QMP peer
>   blockdev: switch blockdev_stream() to use QMP peer
>   blockdev: switch blockdev_commit() to use QMP peer
>   snapshot: support live snapshot (remove) of qcow2 TPM drive on storage
>     with snapshot-as-volume-chain
>   fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive with
>     snapshot-as-volume-chain
>
>  src/PVE/API2/Qemu.pm                      | 45 ++++++--------
>  src/PVE/QMPClient.pm                      |  7 +++
>  src/PVE/QemuMigrate.pm                    |  6 +-
>  src/PVE/QemuServer.pm                     | 65 +++++++++++---------
>  src/PVE/QemuServer/BlockJob.pm            | 62 +++++++++++--------
>  src/PVE/QemuServer/Blockdev.pm            | 59 +++++++++---------
>  src/PVE/QemuServer/Drive.pm               | 20 +++++++
>  src/PVE/QemuServer/Monitor.pm             | 19 +++++-
>  src/PVE/QemuServer/QSD.pm                 | 11 ++--
>  src/PVE/QemuServer/VolumeChain.pm         | 73 ++++++++++++++---------
>  src/PVE/VZDump/QemuServer.pm              |  6 +-
>  src/test/MigrationTest/QemuMigrateMock.pm |  2 +-
>  12 files changed, 222 insertions(+), 153 deletions(-)
>
>
> Summary over all repositories:
>   12 files changed, 222 insertions(+), 153 deletions(-)
>
> -- 
> Generated by git-murpp 0.5.0





  parent reply	other threads:[~2026-04-23 13:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23  9:35 Fiona Ebner
2026-04-23  9:35 ` [PATCH qemu-server v3 01/18] block job: fix variable name in documentation Fiona Ebner
2026-04-23  9:35 ` [PATCH qemu-server v3 02/18] qmp client: add default timeouts for more block commands Fiona Ebner
2026-04-23  9:35 ` [PATCH qemu-server v3 03/18] drive: introduce drive_uses_qsd_fuse() helper Fiona Ebner
2026-04-23  9:35 ` [PATCH qemu-server v3 04/18] monitor: add vm_qmp_peer() helper Fiona Ebner
2026-04-23  9:35 ` [PATCH qemu-server v3 05/18] monitor: add qsd_peer() helper Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 06/18] blockdev: rename variable in get_node_name_below_throttle() for readability Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 07/18] blockdev: switch get_node_name_below_throttle() to use QMP peer Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 08/18] blockdev: switch detach() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 09/18] blockdev: switch blockdev_replace() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 10/18] blockdev: switch blockdev_external_snapshot() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 11/18] block job: switch qemu_handle_concluded_blockjob() " Fiona Ebner
2026-04-24  9:51   ` Lukas Sichert
2026-04-24 11:36     ` Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 12/18] block job: switch qemu_blockjobs_cancel() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 13/18] block job: switch qemu_drive_mirror_monitor() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 14/18] blockdev: switch blockdev_delete() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 15/18] blockdev: switch blockdev_stream() " Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 16/18] blockdev: switch blockdev_commit() " Fiona Ebner
2026-04-24 11:49   ` Lukas Sichert
2026-04-24 11:56     ` Fiona Ebner
2026-04-24 12:09       ` Lukas Sichert
2026-04-23  9:36 ` [PATCH qemu-server v3 17/18] snapshot: support live snapshot (remove) of qcow2 TPM drive on storage with snapshot-as-volume-chain Fiona Ebner
2026-04-23  9:36 ` [PATCH qemu-server v3 18/18] fix #7066: api: allow live snapshot (remove) of qcow2 TPM drive " Fiona Ebner
2026-04-23 13:57 ` Lukas Sichert [this message]
2026-04-24 11:59 ` [PATCH-SERIES qemu-server v3 00/18] " Lukas Sichert
2026-04-24 12:11   ` superseded: " Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DI0L56K45KJK.1G3MBGPZI2KJV@proxmox.com \
    --to=l.sichert@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal