A script that on a proxmox node, will list the ip addresses of running virtual machines.
install required packages :
apt-get install net-tools arp-scan
make the above script executable
chmod +x get_ips_of_vms.sh
run the script
./get_ips_of_vms.sh
resulting in something like :
# ./get_ips_of_vms.sh
192.168.22.131 k8s-master 200-k8s-master
192.168.22.132 k8s-worker01 201-k8s-worker01
192.168.22.133 k8s-worker02 202-k8s-worker02
thanks a lot,
in your script network CIDR is hardcoded and arp-scanning is called for every qemu guest,
(multiple arp scanning sometimes hits EDR and intrusion SOC teams)
I added some variables