[ovirt-users] Auto-restart VM from Linux Shell

andreil1 at starlett.lv andreil1 at starlett.lv
Mon Mar 12 10:04:45 UTC 2018


You meant this:
https://github.com/machacekondra/ovirt-ansible-example/wiki
https://github.com/machacekondra/ovirt-ansible-example

Seems like overkill for so simple task. If bash scripts works, its OK for now.


> On 12 Mar 2018, at 11:31, Yedidyah Bar David <didi at redhat.com> wrote:
> 
> On Mon, Mar 12, 2018 at 1:45 AM, Andrei Verovski <andreil1 at starlett.lv> wrote:
>> Hi !
>> 
>> I have stubborn VM which time to time freezes, and watchdog for whatever
>> reason don't restart it.
>> 
>> Basically I would like to combine these 3 command into one script.
>> 
>> ovirt-shell -l https://node00.mydomain.com.lv/ovirt-engine/api
>> --ca-file="/etc/pki/ovirt-engine/ca.pem" -u "admin at internal" --password
>> "secret"
>> 
>> action vm MyVM stop
>> action vm MyVM start
>> 
>> Now I have problems.
>> 1) Option --password "secret" is not recognized anymore in oVirt Shell 4.2.
>> 2) What is the proper syntax to connect & run certain command in oVirt
>> Shell 4.2? Something like:
>> 
>> ovirt-shell -l https://node00.mydomain.com.lv/ovirt-engine/api
>> --ca-file="/etc/pki/ovirt-engine/ca.pem" -u "admin at internal" --password
>> "secret" && action vm MyVM stop
> 
> ovirt-shell is considered deprecated. Did you consider using ansible?
> 
> Best regards,
> -- 
> Didi



More information about the Users mailing list