[ovirt-users] oVirt API (4.0 and 4.1) not reporting vms running on a given storage domain
Ondra Machacek
omachace at redhat.com
Fri Mar 2 14:21:04 UTC 2018
Hi,
As per documentation:
http://ovirt.github.io/ovirt-engine-api-model/4.1/#services/storage_domain_vms
That resource is used to list VMs on export storage domain, not on data
domain.
If you want to find VMs using specific storage you may use following query:
/ovirt-engine/api/vms?search=storage.name=nameofthestorage
On 03/01/2018 07:19 PM, Luca 'remix_tj' Lorenzetto wrote:
> Hello,
>
> i need to extract the list of the vms running on a given storage domain.
> Copying some code from ansible's ovirt_storage_vms_facts simplified my
> work but i stopped with a strange behavior: no vm is listed.
>
> I thought it was an issue with my code, but looking more in detail at
> api's i tried opening:
>
> ovirt-engine/api/storagedomains/52b661fe-609e-48f9-beab-f90165b868c4/vms
>
> And what i get is
>
> <vms />
>
> And this for all the storage domains available.
>
> Is there something wrong with the versions i'm running? Do i require
> some options in the query?
>
> I'm running RHV, so i can't upgrade to 4.2 yet
>
> Luca
>
More information about the Users
mailing list