
11 Jan
2018
11 Jan
'18
11:44 a.m.
On 10/01/18 22:11, Wesley Stewart wrote:
Marcelo,
I would greatly appreciate seeing a script! It would be an excellent chance for me to learn a bit about using ovirt from the command line as well!
I'm using something like this with ovirt-shell vm_shutdown: #!/bin/sh LOG=/root/ovirt/vm_shutdown_log echo `date` >> $LOG /usr/bin/ovirt-shell -f /root/ovirt/vm_shutdown_script >> $LOG echo "" >> $LOG vm_shutdown_script: list vms --kwargs status-state=up|grep name | sed s/'name :'/'action vm'/ | sed -e 's/$/ shutdown/' > /root/ovirt/new_vm_shutdown_script file /root/ovirt/new_vm_shutdown_script new_vm_shutdown_script now lists entries like this: action vm vm1 shutdown action vm vm2 shutdown etc. G