[ovirt-users] API endpoint for a VM to fetch metadata about itself

Ondra Machacek omachace at redhat.com
Tue Feb 27 12:13:37 UTC 2018

Yep, you can search for a VM using many attributes, for example to
search for a VM using IP address:


Here you have more search parameters you can use to find a VM:


On 02/27/2018 02:04 AM, Geoff Sweet wrote:
> OK, that's a great place for me to start. However the problem is that 
> all my post-install tooling is now running on a VM that knows nothing 
> about itself (having been installed via pxe and kickstart) like it's 
> {vm_id}.  Can the API be used to query for a VM and it's attributes 
> based on something like a MAC address or the IP itself?
> -Geoff
> On Sun, Feb 25, 2018 at 11:05 PM, Ondra Machacek <omachace at redhat.com 
> <mailto:omachace at redhat.com>> wrote:
>     We don't have any such resource. We have those information in different
>       places of the API. For example to find the information about
>     devices of
>     the VM, like network device information (IP address, MAC, etc), you can
>     query:
>       /ovirt-engine/api/vms/{vm_id}/reporteddevices
>     The FQDN is listed right in the basic information of the VM quering the
>     VM itself:
>        /ovirt-engine/api/vms/{vm_id}
>     You can find all the information about specific attributes returned by
>     the API here in the documentation:
>     http://ovirt.github.io/ovirt-engine-api-model/4.2/#types/vm
>     <http://ovirt.github.io/ovirt-engine-api-model/4.2/#types/vm>
>     On 02/25/2018 03:13 AM, Geoff Sweet wrote:
>         Is there an API endpoint that VM's can query to discover it's
>         oVirt metadata? Something similar to AWS's
>         <>
>         <
>         <>> query in EC2? I'm
>         trying to stitch a lot of automation workflow together and so
>         far I have had great luck with oVirt. But the next small hurdle
>         is to figure out how all the post-install setup stuff can figure
>         out who the VM is so it can the appropriate configurations.
>         Thanks!
>         -Geoff
>         _______________________________________________
>         Users mailing list
>         Users at ovirt.org <mailto:Users at ovirt.org>
>         http://lists.ovirt.org/mailman/listinfo/users
>         <http://lists.ovirt.org/mailman/listinfo/users>

More information about the Users mailing list