Execute Scripts From the Host


Renowned Member
Apr 23, 2015
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:


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!