Discussion:
[PVE-User] pmbalance
Mark Schouten
2018-03-22 09:08:06 UTC
Permalink
Hi,

I have a script that is able to automatically move around VM's so the
load on the clusternodes is somewhat equal. You can find the script
here: https://tuxis.bestandonline.nl/index.php/s/JzH3cz2wGdY8QXs

It's called pmbalance.

Now, since 4.4 I have the issue that I can no longer get info or
commands from other nodes than the node I'm running this script on. I
get "500 proxy not allowed" as soon as I get to 'get_vm_description()'.

What am I doing wrong? Thanks!


***@proxmox2-4:~# ./pmbalance --verbose --dry-run
V: Looking for nodes on this cluster..
V: Found proxmox2-4
V: Found proxmox2-5
V: Found proxmox2-2
V: Found proxmox2-1
V: Found proxmox2-3
V: Calculating the average memory free on the cluster
V: proxmox2-2 is at 26% free
V: proxmox2-4 is at 39% free
V: proxmox2-1 is at 69% free
V: proxmox2-3 is at 19% free
V: proxmox2-5 is at 20% free
V: Which is: 34%
V: We should lower usage of proxmox2-3 by: 15% to reach 34%
V: 15 of 67524956160 = 10128743424 bytes
V: proxmox2-1 will receive the VM
V: Looking for migratable VMs on proxmox2-3
500 proxy not allowed
--
Kerio Operator in de Cloud? https://www.kerioindecloud.nl/
Mark Schouten | Tuxis Internet Engineering
KvK: 61527076 | http://www.tuxis.nl/
T: 0318 200208 | ***@tuxis.nl
Dietmar Maurer
2018-03-22 09:53:24 UTC
Permalink
Post by Mark Schouten
Now, since 4.4 I have the issue that I can no longer get info or
commands from other nodes than the node I'm running this script on. I
get "500 proxy not allowed" as soon as I get to 'get_vm_description()'.
What am I doing wrong? Thanks!
Maybe you connect to the wrong port (what api port do you use)?
Mark Schouten
2018-03-22 11:13:27 UTC
Permalink
Post by Dietmar Maurer
Post by Mark Schouten
Now, since 4.4 I have the issue that I can no longer get info or
commands from other nodes than the node I'm running this script on. I
get "500 proxy not allowed" as soon as I get to
'get_vm_description()'.
What am I doing wrong? Thanks!
Maybe you connect to the wrong port (what api port do you use)?
As you can see in the script (https://tuxis.bestandonline.nl/index.php/
s/JzH3cz2wGdY8QXs/download?path=%2F&files=pmbalance) I'm using the Perl
API library provided by Proxmox.
--
Kerio Operator in de Cloud? https://www.kerioindecloud.nl/
Mark Schouten | Tuxis Internet Engineering
KvK: 61527076 | http://www.tuxis.nl/
T: 0318 200208 | ***@tuxis.nl
Ian Coetzee
2018-03-22 12:51:17 UTC
Permalink
Post by Mark Schouten
As you can see in the script (https://tuxis.bestandonline.nl/index.php/
s/JzH3cz2wGdY8QXs/download?path=%2F&files=pmbalance) I'm using the Perl
API library provided by Proxmox.
Hi Mark,

That link takes me to a logon page, fyi.

I am guessing you might need to enable anonymous access to your
{own|next}cloud server.

Kind regards
Alexandre DERUMIER
2018-03-23 17:11:38 UTC
Permalink
Thanks for your script, I was looking for something like that.

I'll try it next week and try to debug.


I'm seeing 2 improvements:

- check that shared storage is available on target node
- take ksm value in memory count. (with ksm enable, we can have all nodes at 80% memory usage, but with differents ksm usage)



----- Mail original -----
De: "Mark Schouten" <***@tuxis.nl>
À: "proxmoxve" <pve-***@pve.proxmox.com>
Envoyé: Jeudi 22 Mars 2018 10:08:06
Objet: [PVE-User] pmbalance

Hi,

I have a script that is able to automatically move around VM's so the
load on the clusternodes is somewhat equal. You can find the script
here: https://tuxis.bestandonline.nl/index.php/s/JzH3cz2wGdY8QXs

It's called pmbalance.

Now, since 4.4 I have the issue that I can no longer get info or
commands from other nodes than the node I'm running this script on. I
get "500 proxy not allowed" as soon as I get to 'get_vm_description()'.

What am I doing wrong? Thanks!


***@proxmox2-4:~# ./pmbalance --verbose --dry-run
V: Looking for nodes on this cluster..
V: Found proxmox2-4
V: Found proxmox2-5
V: Found proxmox2-2
V: Found proxmox2-1
V: Found proxmox2-3
V: Calculating the average memory free on the cluster
V: proxmox2-2 is at 26% free
V: proxmox2-4 is at 39% free
V: proxmox2-1 is at 69% free
V: proxmox2-3 is at 19% free
V: proxmox2-5 is at 20% free
V: Which is: 34%
V: We should lower usage of proxmox2-3 by: 15% to reach 34%
V: 15 of 67524956160 = 10128743424 bytes
V: proxmox2-1 will receive the VM
V: Looking for migratable VMs on proxmox2-3
500 proxy not allowed
--
Kerio Operator in de Cloud? https://www.kerioindecloud.nl/
Mark Schouten | Tuxis Internet Engineering
KvK: 61527076 | http://www.tuxis.nl/
T: 0318 200208 | ***@tuxis.nl
_______________________________________________
pve-user mailing list
pve-***@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user
Mark Schouten
2018-03-25 13:36:31 UTC
Permalink
Hi,
Post by Alexandre DERUMIER
Thanks for your script, I was looking for something like that.
I'll try it next week and try to debug.
I have it working now. I’ll post the working version tomorrow.
Post by Alexandre DERUMIER
- check that shared storage is available on target node
- take ksm value in memory count. (with ksm enable, we can have all nodes at 80% memory usage, but with differents ksm usage)
I’m always pro improvements. :)

Mark

Loading...