E ejc317 Member Oct 18, 2012 263 0 16 Dec 27, 2012 #1 Is there a way to show all the vms in the cluster and which node its on? We're coding a custom panel so need to know - also if apache is down will the api work? We're deciding between api or ssh tunelling
Is there a way to show all the vms in the cluster and which node its on? We're coding a custom panel so need to know - also if apache is down will the api work? We're deciding between api or ssh tunelling
W WRXIzumi Renowned Member Nov 29, 2012 3 1 68 Dec 27, 2012 #2 ejc317 said: Is there a way to show all the vms in the cluster and which node its on? We're coding a custom panel so need to know - also if apache is down will the api work? We're deciding between api or ssh tunelling Click to expand... Quick one liner that may do what you want though it only works with KVM guests. Run this from any node in the cluster and it will show the cluster node name and the guest name. find /etc/pve/nodes/*/qemu-server -type f |xargs grep 'name:' |perl -pi -e 's|/etc/pve/nodes/([^/]*)/.*name.*)$|\1 \2|'
ejc317 said: Is there a way to show all the vms in the cluster and which node its on? We're coding a custom panel so need to know - also if apache is down will the api work? We're deciding between api or ssh tunelling Click to expand... Quick one liner that may do what you want though it only works with KVM guests. Run this from any node in the cluster and it will show the cluster node name and the guest name. find /etc/pve/nodes/*/qemu-server -type f |xargs grep 'name:' |perl -pi -e 's|/etc/pve/nodes/([^/]*)/.*name.*)$|\1 \2|'
dietmar Proxmox Staff Member Staff member Apr 28, 2005 17,276 701 253 Austria www.proxmox.com Dec 27, 2012 #3 ejc317 said: Is there a way to show all the vms in the cluster and which node its on? Click to expand... The url is '/cluster/resources' To test you can use: # pvesh get /cluster/resources ejc317 said: We're coding a custom panel so need to know - also if apache is down will the api work? Click to expand... No.
ejc317 said: Is there a way to show all the vms in the cluster and which node its on? Click to expand... The url is '/cluster/resources' To test you can use: # pvesh get /cluster/resources ejc317 said: We're coding a custom panel so need to know - also if apache is down will the api work? Click to expand... No.