qm command on .sh file

ineedyou

New Member
Mar 19, 2015
8
0
1
I have a script to start and stop VM in .sh file
Code:
qm start 101qm start 102
qm start 103
qm stop 103
qm stop 102
qm stop 101
and I get an error:400 Parameter verification failed , please see the screenshot: http://prntscr.com/6j0dir
However, If I run each command: qm start 101, it works.
Please help me, thank you
 
Hi,
please send your script and do not link your screenshot.
you should upload them to the forum.
 
My idea is a task to run VM step by step. I mean the task will do:
+ Stop VM 1
+ Start VM1
+ wait 10s
+ Stop VM2
+Start VM2.
+.....
This is my script:
"
qm start 101
qm start 102
qm start 103
sleep 10
qm stop 103
qm stop 102
qm stop 101"
When I run it through command : sh ./action.sh
I get an error. You can see the screenshot:

Screenshot_3.png
 
Last edited:
Code:
#!/bin/sh

qm start 101
qm start 102
qm start 103

sleep 10

qm stop 101
qm stop 102
qm stop 103
this works perfectly
 
Code:
#!/bin/sh

qm start 101
qm start 102
qm start 103

sleep 10

qm stop 101
qm stop 102
qm stop 103
this works perfectly
It doesnt work anymore. :(. It also doesnt understand "Sleep 10" in this script too
 
Last edited:
Just use
Code:
#!/bin/sh

qm start 101
qm start 102
qm start 103

sleep 10

qm stop 101
qm stop 102
qm stop 103

All lowercase with no quotation marks.

Use a local text editor (vi or pico should work fine).

Serge
 
Just use
Code:
#!/bin/sh

qm start 101
qm start 102
qm start 103

sleep 10

qm stop 101
qm stop 102
qm stop 103

All lowercase with no quotation marks.

Use a local text editor (vi or pico should work fine).

Serge
It doesnt work anymore.
You can see the screenshot:
Screenshot_3.png
 

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!