The issue with diskofferingstrictness is a UI bug, which has been fixed by
https://github.com/apache/cloudstack/pull/7072

-Wei


On Thu, 19 Jan 2023 at 10:26, <[email protected]> wrote:

> Hi,
>
>
>
> I run into an issue with some specific configuration regarding compute
> offerings where diskofferingstrictness is true and using disk offerings
> where custom disk size is enabled.
>
> It is not really a bug, but I need some input what the best way is to deal
> with this.
>
>
>
> When using this kind of setup and you want to create a new VM via the UI
> wizard you will always run into an error like this:
>
> VM Creation failed. Volume size: -1GB is out of allowed range. Max: 1024
> Min:1
>
>
>
> It makes total sense, because you do not provide a value for the root disk
> size. To fix this you just need to enable the button for "Override root
> disk
> size" in the Template/ISO section. This will add rootdisksize to the api
> call to create the VM.
>
>
>
> Is this a situation we want a typical user of the UI to be in with in the
> first place? Any idea how to take care of this kind of situation?
>
>
>
> Here are the steps to reproduce this situation:
>
> 1.      Add a new Disk Offering
>
>
> /client/api/?isMirrored=false&name=Test+Custom+Disk+Offering&displaytext=Tes
>
> t+Custom+Disk+Offering&storageType=shared&cacheMode=none&provisioningType=th
>
> in&customized=true&disksizestrictness=false&command=createDiskOffering&respo
> nse=json
>
>
>
> 2.      Create a new Compute Offering with diskofferingstrictness=true
> (please be aware that in 4.17.2.0 there is a bug and you cannot do this via
> UI. There is a button for this, but it is broken) You need to add the disk
> offering uuid in this api call!
>
>
> /client/api/?issystem=false&name=Test+Compute+Offering&displaytext=Test+Comp
>
> ute+Offering&customized=false&offerha=false&limitcpuuse=false&dynamicscaling
>
> enabled=false&diskofferingid=<uuid>&cpunumber=1&cpuspeed=500&memory=512&comm
> and=createServiceOffering&diskofferingstrictness=true&response=json
>
>
>
> 3.      Go to the instance wizard in the UI and choose the just created
> Compute offering. Do not click anything else and go straight to "Launch
> instance".
>
>
>
> UI will pass the api call deployVirtualMachine without any rootsize in the
> header which will bring up the error. Now just enable "Override root disk
> size" in the Template/ISO section and click "Launch instance" gain. This
> time it will work and rootdisksize is added to the api call header.
>
>
>
> Swen
>
>
>
>
>
>

Reply via email to