
Can anyone post link. (with examples.. as most documentation for oVirt lacks this).. where I can power on a VM via CLI or API. As of now I cannot login to oVirt-Engine. No errors when I restart it.. https://lists.ovirt.org/archives/list/users@ovirt.org/thread/45KKF5TN5PRQ3R7... BUt... I need to get VMs booted. I tried to follow: http://ovirt.github.io/ovirt-engine-api-model/master/ and my server's API web portal https://ovirte01.penguinpages.local/ovirt-engine/apidoc/#/documents/003_comm... And.. even get POSTMAN (real newbie at that tool but ran into how to add exported .pem key from portal to session issues) # failed CLI example: Power on VM "ns01" ########### <<<< DRAFT :: 2020-09-30################ # Get key from oVirt engine and import. Ex: from ovirte01 into server 'thor curl -k ' https://ovirte01.penguinpages.local/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA' -o ovirt01_ca.pem sudo cp ovirt01_ca.pem /etc/pki/ca-trust/source/anchors sudo update-ca-trust extract openssl s_client -connect ovirte01.penguinpages.local:443 -showcerts < /dev/null <snip... lots of key info back> # Use key during GET list of VMs ?? <meh? # Power on VM <<fubar still> curl -X POST https://ovirte01.penguinpages.local/post -H /ovirt-engine/api/vms/ns01/start HTTP/1.1 <https://ovirte01.penguinpages.local/post%20-H%20/ovirt-engine/api/vms/ns01/start%20HTTP/1.1> ##### I just need to power on VM -- p <jeremey.wise@gmail.com>enguinpages

I would suggest to do it via one of the sdks, for example python https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/start_vm.... - you can create a simple python script you can start from cli. Alternatively use ansible, you can also call that from cli. Greetings Klaas On 9/30/20 7:57 PM, Jeremey Wise wrote:
Can anyone post link. (with examples.. as most documentation for oVirt lacks this).. where I can power on a VM via CLI or API.
As of now I cannot login to oVirt-Engine. No errors when I restart it.. https://lists.ovirt.org/archives/list/users@ovirt.org/thread/45KKF5TN5PRQ3R7...
BUt... I need to get VMs booted.
I tried to follow: http://ovirt.github.io/ovirt-engine-api-model/master/ and my server's API web portal https://ovirte01.penguinpages.local/ovirt-engine/apidoc/#/documents/003_comm...
And.. even get POSTMAN (real newbie at that tool but ran into how to add exported .pem key from portal to session issues)
# failed CLI example: Power on VM "ns01"
########### <<<< DRAFT :: 2020-09-30################
# Get key from oVirt engine and import. Ex: from ovirte01 into server 'thor
curl -k 'https://ovirte01.penguinpages.local/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA' -o ovirt01_ca.pem
sudo cp ovirt01_ca.pem /etc/pki/ca-trust/source/anchors
sudo update-ca-trust extract
openssl s_client -connect ovirte01.penguinpages.local:443 -showcerts < /dev/null
<snip... lots of key info back>
# Use key during GET list of VMs
?? <meh?
# Power on VM <<fubar still>
curl -X POST https://ovirte01.penguinpages.local/post -H /ovirt-engine/api/vms/ns01/start HTTP/1.1 <https://ovirte01.penguinpages.local/post%20-H%20/ovirt-engine/api/vms/ns01/start%20HTTP/1.1>
#####
I just need to power on VM
-- p <mailto:jeremey.wise@gmail.com>enguinpages
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/UN4AHVRITGBFUJ...

--- - name: Example hosts: localhost connection: local vars: ovirt_auth: username: 'admin@internal' password: 'pass' url: 'https://engine.localdomain/ovirt-engine/api' insecure: True ca_file: '/root/ansible/engine.ca' - name: Power on {{ outer_item }} after snapshot restore ovirt_vm: auth: "{{ ovirt_auth }}" state: running name: "{{ item }}" loop: - VM1 - VM2 Yeah, you have to fix the tabulations (both Ansible and Python are pain in the *** ) Best Regards, Strahil Nikolov В сряда, 30 септември 2020 г., 21:01:26 Гринуич+3, Jeremey Wise <jeremey.wise@gmail.com> написа: Can anyone post link. (with examples.. as most documentation for oVirt lacks this).. where I can power on a VM via CLI or API. As of now I cannot login to oVirt-Engine. No errors when I restart it.. https://lists.ovirt.org/archives/list/users@ovirt.org/thread/45KKF5TN5PRQ3R7... BUt... I need to get VMs booted. I tried to follow: http://ovirt.github.io/ovirt-engine-api-model/master/ and my server's API web portal https://ovirte01.penguinpages.local/ovirt-engine/apidoc/#/documents/003_comm... And.. even get POSTMAN (real newbie at that tool but ran into how to add exported .pem key from portal to session issues) # failed CLI example: Power on VM "ns01" ########### <<<< DRAFT :: 2020-09-30################ # Get key from oVirt engine and import. Ex: from ovirte01 into server 'thor curl -k 'https://ovirte01.penguinpages.local/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA' -o ovirt01_ca.pem sudo cp ovirt01_ca.pem /etc/pki/ca-trust/source/anchors sudo update-ca-trust extract openssl s_client -connect ovirte01.penguinpages.local:443 -showcerts < /dev/null <snip... lots of key info back> # Use key during GET list of VMs ?? <meh? # Power on VM <<fubar still> curl -X POST https://ovirte01.penguinpages.local/post -H /ovirt-engine/api/vms/ns01/start HTTP/1.1 ##### I just need to power on VM -- penguinpages _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/UN4AHVRITGBFUJ...
participants (3)
-
Jeremey Wise
-
Klaas Demter
-
Strahil Nikolov