how to start VMs from the command shell

nicolasdiogo

Member
Mar 16, 2010
92
0
6
hi

i have a set of machines that work as a cluster

and i would like to run a command like this:
Code:
for i in $( seq 30 39 ) ; do echo "someCommand for VM 10$i" ; done;
someCommand for VM 1030
someCommand for VM 1031
someCommand for VM 1032
someCommand for VM 1033
someCommand for VM 1034
someCommand for VM 1035
someCommand for VM 1036
someCommand for VM 1037
someCommand for VM 1038
someCommand for VM 1039
NOTE: it should be running a command rather then echoing

but i can not find any info on which command to run.

any suggestion?

thanks,


Nicolas
 
for i in $( seq 30 39 ) ; do echo "vzctl exec 10$i YOURCOMMAND" ; done;
 
dietmar

what i was trying to say is:

You want to run that command inside the VM? If so, you can use ssh.

how do i start a virtual machine from ssh from PVE host?

then i can use this command inside my loop.


sorry for badly explaining myself.


thanks
 

About

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!