I'm not sure why the direct api requests are not working, but in general
I would suggest to use one of the sdks or ansible to interact with ovirt.
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/stop_vm.py
According to
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html-single/rest_api_guide/index#services-vm
trying to use
curl --insecure -v -u admin@internal:password -H Content-type: application/xml
-X POST https://FQDN/ovirt-engine/api/vms/VM_NAME/ACTION
where ACTION
Hello,
you could use ansible or for a common cli to (libvirt, KubeVirt,
oVirt, OpenStack, VMware vSphere, GCP and AWS) you could try kcli
https://github.com/karmab/kcli/blob/master/doc/index.md ( although I haven't
tried it yet).
Regards,
Paul S.
Hello,
I believe the best way would be to use ansible with the ovirt ansible
modules i.e.
https://docs.ansible.com/ansible/latest/modules/ovirt_vm_module.html#ovirt-vm-module
--
you can do it with a simple task like:
- name: Stop vm
ovirt_vm:
state: stopped
name: myvm
you could also
4 matches
Mail list logo