[ovirt-users] Storage API command

Koen Vanoppen vanoppen.koen at gmail.com
Mon Dec 1 11:30:02 UTC 2014


Thanks!!!! Just what I needed!!

2014-12-01 12:29 GMT+01:00 Koen Vanoppen <vanoppen.koen at gmail.com>:

>
> ---------- Forwarded message ----------
> From: Juan Hernández <jhernand at redhat.com>
> Date: 2014-12-01 12:16 GMT+01:00
> Subject: Re: [ovirt-users] Storage API command
> To: Koen Vanoppen <vanoppen.koen at gmail.com>, "users at ovirt.org" <
> users at ovirt.org>
>
>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20141201/937cc0da/attachment-0001.html>


More information about the Users mailing list