* [PATCH qemu-server] fix #7828: register unused drive: fix failure to handle non-PVE managed volumes
@ 2026-07-24 8:13 Fiona Ebner
2026-07-24 9:11 ` applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-07-24 8:13 UTC (permalink / raw)
To: pve-devel
Volumes that are not PVE-managed have no storage associated to them,
and in particular cannot be owned by a VM. When removing such a volume
from the configuration, registering it as unused should be skipped.
This was the case before commit 5b5c5768 ("display warnings for
storage errors or if storage no longer exists"), but the new handling
misses this edge case and causes a failure to parse the volume ID
instead. Fix the regression by using the non-erroring variant when
parsing the volume ID and skipping such volumes again.
Fixes: 5b5c5768 ("display warnings for storage errors or if storage no longer exists")
Analyzed-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 191ae549..9aec7f9c 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1576,7 +1576,8 @@ sub vmconfig_register_unused_drive {
delete $conf->{'special-sections'}->{cloudinit};
} elsif (!drive_is_cdrom($drive)) {
my $volid = $drive->{file};
- my ($storeid, undef) = PVE::Storage::parse_volume_id($volid);
+ my ($storeid, undef) = PVE::Storage::parse_volume_id($volid, 1);
+ return if !$storeid; # Not a PVE-managed volume, don't register as unused.
if (PVE::Storage::storage_config($storecfg, $storeid, 1)) {
if (vm_is_volid_owner($storecfg, $vmid, $volid)) {
PVE::QemuConfig->add_unused_volume($conf, $volid, $vmid);
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* applied: [PATCH qemu-server] fix #7828: register unused drive: fix failure to handle non-PVE managed volumes
2026-07-24 8:13 [PATCH qemu-server] fix #7828: register unused drive: fix failure to handle non-PVE managed volumes Fiona Ebner
@ 2026-07-24 9:11 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2026-07-24 9:11 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Fri, 24 Jul 2026 10:13:54 +0200, Fiona Ebner wrote:
> Volumes that are not PVE-managed have no storage associated to them,
> and in particular cannot be owned by a VM. When removing such a volume
> from the configuration, registering it as unused should be skipped.
> This was the case before commit 5b5c5768 ("display warnings for
> storage errors or if storage no longer exists"), but the new handling
> misses this edge case and causes a failure to parse the volume ID
> instead. Fix the regression by using the non-erroring variant when
> parsing the volume ID and skipping such volumes again.
>
> [...]
Applied, thanks!
[1/1] fix #7828: register unused drive: fix failure to handle non-PVE managed volumes
commit: bfd31023dfd2a4a44199a4e886a019c8612d9520
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-24 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 8:13 [PATCH qemu-server] fix #7828: register unused drive: fix failure to handle non-PVE managed volumes Fiona Ebner
2026-07-24 9:11 ` applied: " Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox