[ovirt-users] oVirt CLI Question

Ondra Machacek omachace at redhat.com
Thu Feb 8 08:44:41 UTC 2018


On 02/07/2018 11:28 PM, Andrei V wrote:
> Hi,
> 
> How to force power off, and then launch (after timeout e.g. 20sec)
> particular VM from bash or Python script?

Please check the following Python script:

 
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/stop_vm.py

It stops the VM and wait until it's in DOWN state.

Then there is a script to start the VM:

 
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/start_vm.py

> 
> Is 20sec is enough to get oVirt engine updated after forced power off  >
> What happened with this wiki? Seems like it is deleted or moved.
> http://wiki.ovirt.org/wiki/CLI#Usage

CLI was deprecated, and is not available anymore, since 4.0 I think.
You can use Ansible modules or Python SDK.

> 
> Is this project part of oVirt distro? It looks like in state of active
> development with last updates 2 months ago.
> https://github.com/fbacchella/ovirtcmd

No, it isn't part of oVirt distribution.

> 
> Thanks !
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


More information about the Users mailing list