all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES qemu-server 0/3] api: disk clone/move/reassign: log more core operations
@ 2026-04-01  9:51 Fiona Ebner
  2026-04-01  9:51 ` [PATCH qemu-server 1/3] api: disk reassign: use target disk key and 'reassign' in log message Fiona Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-04-01  9:51 UTC (permalink / raw)
  To: pve-devel

Make sure essential information about the disk clone/move/reassign
operations is part of the task log.

qemu-server:

Fiona Ebner (3):
  api: disk reassign: use target disk key and 'reassign' in log message
  api: disk move: print description of core operations to task log
  clone disk: log target volume ID after allocating

 src/PVE/API2/Qemu.pm  | 12 ++++++++++--
 src/PVE/QemuServer.pm |  2 ++
 2 files changed, 12 insertions(+), 2 deletions(-)


Summary over all repositories:
  2 files changed, 12 insertions(+), 2 deletions(-)

-- 
Generated by git-murpp 0.5.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH qemu-server 1/3] api: disk reassign: use target disk key and 'reassign' in log message
  2026-04-01  9:51 [PATCH-SERIES qemu-server 0/3] api: disk clone/move/reassign: log more core operations Fiona Ebner
@ 2026-04-01  9:51 ` Fiona Ebner
  2026-04-01  9:51 ` [PATCH qemu-server 2/3] api: disk move: print description of core operations to task log Fiona Ebner
  2026-04-01  9:52 ` [PATCH qemu-server 3/3] clone disk: log target volume ID after allocating Fiona Ebner
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-04-01  9:51 UTC (permalink / raw)
  To: pve-devel

The target disk key is useful information. The word 'reassign' matches
how the operation is called in the UI and better distinguishes it from
the disk move between storages.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 020c68b2..09f88ae1 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -4987,7 +4987,8 @@ __PACKAGE__->register_method({
 
                             my $source_volid = $drive->{file};
 
-                            print "moving disk '$disk' from VM '$vmid' to '$target_vmid'\n";
+                            print("reassign disk '$disk' from VM '$vmid' as '$target_disk' to"
+                                . " VM '$target_vmid'\n");
                             my ($storeid, $source_volname) =
                                 PVE::Storage::parse_volume_id($source_volid);
 
-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH qemu-server 2/3] api: disk move: print description of core operations to task log
  2026-04-01  9:51 [PATCH-SERIES qemu-server 0/3] api: disk clone/move/reassign: log more core operations Fiona Ebner
  2026-04-01  9:51 ` [PATCH qemu-server 1/3] api: disk reassign: use target disk key and 'reassign' in log message Fiona Ebner
@ 2026-04-01  9:51 ` Fiona Ebner
  2026-04-01  9:52 ` [PATCH qemu-server 3/3] clone disk: log target volume ID after allocating Fiona Ebner
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-04-01  9:51 UTC (permalink / raw)
  To: pve-devel

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 09f88ae1..2a1e3854 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -4802,6 +4802,9 @@ __PACKAGE__->register_method({
                 "move disk VM $vmid: move --disk $disk --storage $storeid",
             );
 
+            print("copying volume '$old_volid' from current storage '$oldstoreid' to target"
+                . " storage '$storeid'\n");
+
             my $running = PVE::QemuServer::check_running($vmid);
 
             PVE::Storage::activate_volumes($storecfg, [$drive->{file}]);
@@ -4851,7 +4854,10 @@ __PACKAGE__->register_method({
                 );
                 $conf->{$disk} = PVE::QemuServer::print_drive($newdrive);
 
-                PVE::QemuConfig->add_unused_volume($conf, $old_volid) if !$param->{delete};
+                if (!$param->{delete}) {
+                    my $unused_key = PVE::QemuConfig->add_unused_volume($conf, $old_volid);
+                    print("adding source volume '$old_volid' as '$unused_key' to config\n");
+                }
 
                 # convert moved disk to base if part of template
                 PVE::QemuServer::template_create($vmid, $conf, $disk)
@@ -4880,6 +4886,7 @@ __PACKAGE__->register_method({
             }
 
             if ($param->{delete}) {
+                print("removing source volume '$old_volid' after successful copy\n");
                 eval {
                     PVE::Storage::deactivate_volumes($storecfg, [$old_volid]);
                     PVE::Storage::vdisk_free($storecfg, $old_volid);
-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH qemu-server 3/3] clone disk: log target volume ID after allocating
  2026-04-01  9:51 [PATCH-SERIES qemu-server 0/3] api: disk clone/move/reassign: log more core operations Fiona Ebner
  2026-04-01  9:51 ` [PATCH qemu-server 1/3] api: disk reassign: use target disk key and 'reassign' in log message Fiona Ebner
  2026-04-01  9:51 ` [PATCH qemu-server 2/3] api: disk move: print description of core operations to task log Fiona Ebner
@ 2026-04-01  9:52 ` Fiona Ebner
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-04-01  9:52 UTC (permalink / raw)
  To: pve-devel

While some storage plugins already log the name of an allocated
volume, many do not, so make sure to print this core information.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 856dc737..2a469fff 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -7937,6 +7937,8 @@ sub clone_disk {
         );
         push @$newvollist, $newvolid;
 
+        print("allocated target volume '$newvolid'\n");
+
         PVE::Storage::activate_volumes($storecfg, [$newvolid]);
 
         if (drive_is_cloudinit($drive)) {
-- 
2.47.3





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-01  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-01  9:51 [PATCH-SERIES qemu-server 0/3] api: disk clone/move/reassign: log more core operations Fiona Ebner
2026-04-01  9:51 ` [PATCH qemu-server 1/3] api: disk reassign: use target disk key and 'reassign' in log message Fiona Ebner
2026-04-01  9:51 ` [PATCH qemu-server 2/3] api: disk move: print description of core operations to task log Fiona Ebner
2026-04-01  9:52 ` [PATCH qemu-server 3/3] clone disk: log target volume ID after allocating Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal