Proxmox "monitor" cli

sgelband

New Member
Jan 10, 2010
2
0
1
We would like to load a stored qcow2 snapshot on startup.

Curently we can do this manuely by the following commands:
qm start <VID>
qm suspend <VID>
qm monitor <VID>
loadvm <snapshot name>
quit

Is there a way to automate this procedure -- we could not figure out a way to pipe a command to the "monitor", we tried many different syntaxes and found none that would work.

Thanks,
Simeon
 
Is there a way to automate this procedure

Currently not, because we always use Term::ReadLine in the "qm monitor" command. But i would accept a patch to change that behavior (read directly from stdin if stdin is not a tty).
 
Thank you for your quick reply. We did manage to find a workaround to get this to work:

# eval echo `qm showcmd <VIM>` -loadvm <snapshot name>

BTW:
Huge fans of proxmox -- keep up the excellent work.