---------- Forwarded message ----------
From: Juan Hernández <jhernand@redhat.com>
Date: 2014-12-01 12:16 GMT+01:00
Subject: Re: [ovirt-users] Storage API command
To: Koen Vanoppen <vanoppen.koen@gmail.com>, "users@ovirt.org" <users@ovirt.org>Like this:On 12/01/2014 12:05 PM, Koen Vanoppen wrote:
> Dear All,
>
> Quick question. How can we say to the API which storage pool to use when
> assigning a disk to a VM?
>
> Kind regards,
>
> Koen
>
#!/bin/sh -ex
url="https://ovirt.example.com/ovirt-engine/api"
user="admin@internal"
password="******"
vmid="..."
curl \
--insecure \
--request POST \
--user "${user}:${password}" \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '
<disk>
<alias>mydisk</alias>
<size>100000</size>
<interface>virtio</interface>
<format>raw</format>
<active>true</active>
<storage_domains>
<storage_domain>
<name>mystoragedomain</name>
</storage_domain>
</storage_domains>
</disk>
' \
"${url}/vms/${vmid}/disks"
--
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.