How does price calculation work for OpenStack VMs

Hello,

Was working on a customer use case and thought would share it here. Hope will be useful to some of you :slightly_smiling_face:

Use Case:

When creating the VM on OpenStack, the Price shown was incorrect.

Analysis:

We performed a test VM deployment using the OpenStack service plan “dg-openstack-test-flavor” which had a custom OpenStack Price set named “DG_OpenStack_Test” as attached below.

Initially, “DG_OpenStack_Test” price-set had following prices attached.

Prices:

vCPU – $1/MB/Month
RAM – $1/MB/Month
Storage – $1/GB/Month

So, when we deployed the VM using this service plan, we noticed that it was not calculating the price for “Storage”.

Resources Used:

vCPU – 1
RAM – 2048 MB
Storage – 10 GB

Price Calculation:

vCPU + RAM = 2049 => $2049

Storage calculation (10 GB) was missing. So, the actual total should have been $2050.

We then realised that the Standard disk type price is probably not something OpenStack would look for but rather “Openstack Volume” and “Openstack Local” disk type prices.

Considering this we added prices for “Openstack Volume” and “Openstack Local” disk types.

We then created a new VM with the updated prise-set and selected a “volume” type on instance creation and this time the price shown was correct as it calculated the price for storage.

New Price Calculation:

1 vCPU + 2048 RAM + 10 GB = 2050 => $2050

Note: When using Morpheus provided “Custom OpenStack Price Set” the prices will be calculated correctly as it already has the required prices for disk type.

1 Like

Thanks @dgaharwar !