4.14.2 Sunstone: Error allocating a new virtual machine

Hello,

today i installed the latest stable Version of OpenNenbula
–> 4.14.2

When i try to instantiate a template via Sunstone it results in the following
message:

[TemplateInstantiate] Error allocating a new virtual
machine. DISK 0: SIZE attribute is not supported for persistent image [1028].

Starting a kvm with “onetemplate instantiate 422
–name kvm_name” works fine.

I had the the same error with version 14.4 and the workaround was to remove the value from the input field next to the slider. Unfortunatly this field is grey now and cannot be edited.

I think the solution is to not show the image-slider for persistent images, or ?

Regards

Hans

Hi,

I’m not sure where the problem can be. The slider is disabled precisely to make sure we don’t send a new size for that persistent image.

Can you please send us:

  • the output of onetemplate show (specifically the DISKs)
  • oneimage show -x | grep SIZE

Thank you

Hi,

in 4.14 I was able to clear the input field next to the slider, now it shows “256” in a grey input field:

But here are your requested outputs:
From “onetemplate show”:
DISK=[
IMAGE=“RSTP_olga0003_H388_1_OLGA0003OSREG”,
IMAGE_UNAME=“oneadmin” ]

From “oneimage show -x RSTP_olga0003_H388_1_OLGA0003OSREG| grep SIZE”:
0

Regards
Hans

Hmm… There are two strange things with that image.

The size should never be 0, and for some reason Sunstone thinks the size is 250GBs

What is the output of onetemplate show <id> --extended?

Hi,

all the images we use have a size of 0.
In out environment we use thin-provisioned SAN DISKs with a disk size of 1TB and higer that are configured as multipath devices on the physical host. Those devices are then used to become a persistent image in opennebula. While the creation of the image a value for the size is mandatory, so we decided to use a size of 0.
A creation of the vm with “onetemplate instantiate olga0003 --name olga0003” still works.
The output of “onetemplate show --extended” shows the following for the disk part:

DISK=[
CLONE=“NO”,
CLUSTER_ID=“102”,
DATASTORE=“lpspcluster02”,
DATASTORE_ID=“105”,
DEV_PREFIX=“vd”,
DISK_ID=“0”,
DISK_SNAPSHOT_TOTAL_SIZE=“0”,
DRIVER=“raw”,
IMAGE=“RSTP_olga0003_H388_1_OLGA0003OSREG”,
IMAGE_ID=“1028”,
IMAGE_UNAME=“oneadmin”,
PERSISTENT=“YES”,
READONLY=“NO”,
SAVE=“YES”,
SIZE=“0”,
SOURCE="/dev/mapper/RSTP_olga0003_H388_1_OLGA0003OSREG",
TM_MAD=“btc”,
TYPE=“FILE” ]

Greetings,
Hans

Hi,

i inspected /usr/lib/one/sunstone/public/app/utils/disks-resize.js and found the following:

        RangeSlider.insert({
          'label': label,
          'unitLabel': 'GB',
          'name': 'SIZE',
          'start': sizeGB,
          'end': sizeGB + 500,
          'step': 10,
          'startValue': sizeGB,
          'enabled': enabled
        }, $(".diskSlider", diskContext));

So, in our case the slider begins with 0 and ends with 500 (0 + 500) and places the slider at the half of this --> 250.
Maybe there is a function which puts in the half of “end” into the input field ?

Greetings
Hans

Thank you for your help, that hint looks promising. We’ll try to fix it in a future release, you can foolow the ticket here:
http://dev.opennebula.org/issues/4227

Fixed in the repo, you can see the commit in the following issue:
http://dev.opennebula.org/issues/4227