[pve-devel] [PATCH qemu-server 3/5] memory: replace deprecated check_running() call
Fiona Ebner
f.ebner at proxmox.com
Mon Sep 4 13:39:47 CEST 2023
PVE::QemuServer::check_running() does both
PVE::QemuConfig::assert_config_exists_on_node()
PVE::QemuServer::Helpers::vm_running_locally()
The former one isn't needed here when doing hotplug, because the API
already assert that the VM config exists. It also would introduce a
new cyclic dependency between PVE::QemuServer::Memory <->
PVE::QemuConfig with the proposed virtio-mem patch set.
In preparation to remove the cyclic include of PVE::QemuServer in the
memory module.
No functional change intended.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
PVE/QemuServer/Memory.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index c5c3a0a6..6ec5ceec 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -175,7 +175,7 @@ sub foreach_dimm{
sub qemu_memory_hotplug {
my ($vmid, $conf, $defaults, $value) = @_;
- return $value if !PVE::QemuServer::check_running($vmid);
+ return $value if !PVE::QemuServer::Helpers::vm_running_locally($vmid);
my $sockets = $conf->{sockets} || 1;
--
2.39.2
More information about the pve-devel
mailing list