From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/3] api: disk move: print description of core operations to task log
Date: Wed, 1 Apr 2026 11:51:59 +0200 [thread overview]
Message-ID: <20260401095213.127495-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260401095213.127495-1-f.ebner@proxmox.com>
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
next prev parent reply other threads:[~2026-04-01 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-04-01 9:52 ` [PATCH qemu-server 3/3] clone disk: log target volume ID after allocating 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=20260401095213.127495-3-f.ebner@proxmox.com \
--to=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