[pve-devel] [PATCH qemu-server 4/4] rrddata: use new pve9 rrd location if file is present

Aaron Lauterer a.lauterer at proxmox.com
Fri May 23 18:37:48 CEST 2025


Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/API2/Qemu.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 626cce4..233e69d 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1572,8 +1572,10 @@ __PACKAGE__->register_method({
     code => sub {
 	my ($param) = @_;
 
+	my $path = "pve9-vm/$param->{vmid}";
+	$path = "pve2-vm/$param->{vmid}" if !-e "/var/lib/rrdcached/db/${path}";
 	return PVE::RRD::create_rrd_data(
-	    "pve2-vm/$param->{vmid}", $param->{timeframe}, $param->{cf});
+	    $path, $param->{timeframe}, $param->{cf});
     }});
 
 
-- 
2.39.5





More information about the pve-devel mailing list