Execute Scripts From the Host

NetRock

Renowned Member
Apr 23, 2015
78
1
71
Hi ...
I am looking for the best way to automate to run some scripts that are located in the KVMs (VMs are running Windows and Linux OS) from each host.
Not sure how to automate it cleanly to connect to the VM and run the script.

Would someone please have some inputs ?

Thank you in advance for your quick prompts.
 
To make sure I understand what you are trying to do. You want the Proxmox host to log in to 2 different VMs (1 Windows and 1 Linux) and then run a script?

for the Proxmox host, you could set up a chron job to run a which could ssh into the Linux VM and execute the script. As for the Windows one I don't have an easy solution off the top of my head.
 
Yes....That is correct.
From the Host I need to connect to the VMs (Linux and Wondows) that are running on that Host and run a script.

To use SSH I would need to have the IP of each Linux VM and that is not easy since i need to deal with many VMs. I thought there might be a way using 'qm' or another similar tool like:
'pct' for the containers.

Is there a better way to do this task?

Thank you for your help.
 
Last edited: