[ovirt-users] Storage API command
Juan Hernández
jhernand at redhat.com
Mon Dec 1 11:16:15 UTC 2014
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
>
Like this:
#!/bin/sh -ex
url="https://ovirt.example.com/ovirt-engine/api"
user="admin at 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.
More information about the Users
mailing list