[ovirt-users] Guest reboot feature using REST API

Juan Hernandez jhernand at redhat.com
Fri Aug 29 10:33:01 UTC 2014


On 08/29/2014 12:09 PM, Shanil S wrote:
> Hi All,
> 
> It is found that there is a function like guest reboot (
> http://www.ovirt.org/Features/Guest_Reboot ) Is there any rest api
> function for doing this guest reboot ? currently i found only one
> function for reboot (/api/vms/id/reboot). We are currently using the
> Ovirt 3.4.3 version
> 

Yes:

#!/bin/sh -ex

url="https://ovirt.example.com/ovirt-engine/api"
user="admin at internal"
password="******"

curl \
--insecure \
--request POST \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data "<action/>" \
"${url}/vms/dc7076ee-9ae7-4a14-bec6-7936f76b4375/reboot"

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list