On 6/13/12 5:08 PM, "KC Braunschweig" <[email protected]> wrote:

>I'm trying construct an API call that will create a new VM and at the
>same time create/attach a data disk for it to avoid having to create
>the VM, then create data disk, then attach, then reboot, blah blah.
>
>It seems like that should be pretty straightforward:
>
>http://download.cloud.com/releases/2.2.0/api_2.2.13/user/deployVirtualMach
>ine.html
>
>And that it should be as simple as passing a size parameter with the
>deployVirtualMachine command:
>
>"size  -  the arbitrary size for the DATADISK volume. Mutually
>exclusive with diskOfferingId"


The description of for the size parameter is not correct. Size has to be
specified along with the diskOfferingId, it just has to be the special
diskOffering - the one having size 0. You can create this kind of the disk
offering from the admin UI - Infrustructure->ServiceOfferings->Select Disk
offering option from the drop down list -> Add new -> Check "custom disk
size" checkbox

Try passing size with diskOfferingId and see if it works.



So we have 2 cloudStack bugs here (could you please file them):

* api description is incorrect
* the API didn't throw any error when size was specified, but the disk
offering was missing.


-Alena.


>
>Although I was able to pass this and it seems to accept an integer
>value without error (passing something like '1GB' returns an error on
>invalid value) but I see no data disk being created or attached to the
>resulting VM (although the VM is created successfully).
>
>Any idea on what's going on here?
>
>BTW, this is for knife-cloudstack
>(https://github.com/CloudStack/knife-cloudstack)
>
>
>Thanks,
>
>KC
>


Reply via email to