Re: [pve-devel] [PATCH qemu-server 1/2] Disable memory hotplugging for custom NUMA topologies

2020-03-19 Thread Alwin Antreich
On Wed, Mar 18, 2020 at 04:18:44PM +0100, Stefan Reiter wrote:
> This cannot work, since we adjust the 'memory' property of the VM config
> on hotplugging, but then the user-defined NUMA topology won't match for
> the next start attempt.
> 
> Check needs to happen here, since it otherwise fails early with "total
> memory for NUMA nodes must be equal to vm static memory".
> 
> With this change the error message reflects what is actually happening
> and doesn't allow VMs with exactly 1GB of RAM either.
> 
> Signed-off-by: Stefan Reiter 
> ---
Tested-by: Alwin Antreich 

> 
> Came up after investigating:
> https://forum.proxmox.com/threads/task-error-total-memory-for-numa-nodes-must-be-equal-to-vm-static-memory.67251/
> 
> Spent way too much time 'fixing' it before realizing that it can never work
> like this anyway...
> 
>  PVE/QemuServer/Memory.pm | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
> index d500b3b..ae9598b 100644
> --- a/PVE/QemuServer/Memory.pm
> +++ b/PVE/QemuServer/Memory.pm
> @@ -225,6 +225,12 @@ sub config {
>  if ($hotplug_features->{memory}) {
>   die "NUMA needs to be enabled for memory hotplug\n" if !$conf->{numa};
>   die "Total memory is bigger than ${MAX_MEM}MB\n" if $memory > $MAX_MEM;
> +
> + for (my $i = 0; $i < $MAX_NUMA; $i++) {
> + die "cannot enable memory hotplugging with custom NUMA topology\n"
s/hotplugging/hotplug/ or s/hotplugging/hot plugging/
The word hotplugging doesn't seem to exist in the dictionaries.

> + if $conf->{"numa$i"};
> + }
> +
>   my $sockets = 1;
>   $sockets = $conf->{sockets} if $conf->{sockets};
>  
> -- 
> 2.25.1
> 

___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH qemu-server 1/2] Disable memory hotplugging for custom NUMA topologies

2020-03-18 Thread Stefan Reiter
This cannot work, since we adjust the 'memory' property of the VM config
on hotplugging, but then the user-defined NUMA topology won't match for
the next start attempt.

Check needs to happen here, since it otherwise fails early with "total
memory for NUMA nodes must be equal to vm static memory".

With this change the error message reflects what is actually happening
and doesn't allow VMs with exactly 1GB of RAM either.

Signed-off-by: Stefan Reiter 
---

Came up after investigating:
https://forum.proxmox.com/threads/task-error-total-memory-for-numa-nodes-must-be-equal-to-vm-static-memory.67251/

Spent way too much time 'fixing' it before realizing that it can never work
like this anyway...

 PVE/QemuServer/Memory.pm | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index d500b3b..ae9598b 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -225,6 +225,12 @@ sub config {
 if ($hotplug_features->{memory}) {
die "NUMA needs to be enabled for memory hotplug\n" if !$conf->{numa};
die "Total memory is bigger than ${MAX_MEM}MB\n" if $memory > $MAX_MEM;
+
+   for (my $i = 0; $i < $MAX_NUMA; $i++) {
+   die "cannot enable memory hotplugging with custom NUMA topology\n"
+   if $conf->{"numa$i"};
+   }
+
my $sockets = 1;
$sockets = $conf->{sockets} if $conf->{sockets};
 
-- 
2.25.1


___
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel