[pve-devel] applied-series: [PATCH FOLLOW-UP qemu-server 1/4] api2: move_disk: use parse_volname to find old volume format
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Jul 16 15:58:44 CEST 2025
Applied the current state with 2 minor fixups and one major change:
I renamed the storage sub to `volume_qemu_snapshot_method()` and its
values to:
┌────────────┬───────────┐
│ previous │ new │
├────────────┼───────────┤
│ "internal" │ "qemu" │
│ "external" │ "mixed" │
│ undef │ "storage" │
└────────────┴───────────┘
Updated the `ApiChangeLog` with descriptions for all of them.
On Wed, Jul 16, 2025 at 08:31:36AM +0200, Alexandre Derumier via pve-devel wrote:
> From: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
> To: pve-devel at lists.proxmox.com
> Subject: [PATCH FOLLOW-UP qemu-server 1/4] api2: move_disk: use
> parse_volname to find old volume format
> Date: Wed, 16 Jul 2025 08:31:36 +0200
> Message-Id: <20250716063153.1647681-2-alexandre.derumier at groupe-cyllene.com>
> X-Mailer: git-send-email 2.39.5
>
> Signed-off-by: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
> ---
> src/PVE/API2/Qemu.pm | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
> index 2e6358e4..dbc08737 100644
> --- a/src/PVE/API2/Qemu.pm
> +++ b/src/PVE/API2/Qemu.pm
> @@ -4677,11 +4677,8 @@ __PACKAGE__->register_method({
> die "you can't move a cdrom\n" if PVE::QemuServer::drive_is_cdrom($drive, 1);
>
> my $old_volid = $drive->{file};
> - my $oldfmt;
> my ($oldstoreid, $oldvolname) = PVE::Storage::parse_volume_id($old_volid);
> - if ($oldvolname =~ m/\.(raw|qcow2|vmdk)$/) {
> - $oldfmt = $1;
> - }
> + my $oldfmt = (PVE::Storage::parse_volname($storecfg, $old_volid))[6];
>
> die "you can't move to the same storage with same format\n"
> if $oldstoreid eq $storeid && (!$format || !$oldfmt || $oldfmt eq $format);
> --
> 2.39.5
More information about the pve-devel
mailing list