# 4.14.2 Sunstone: Error allocating a new virtual machine

**URL:** <https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529>\
**Category:** Product Support\
**Created:** [November 27, 2015, 12:05pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529 "2015-11-27T12:05:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Bienert](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@Hans\_Bienert](https://forum.opennebula.io/u/Hans_Bienert)\
**Post date:** [November 27, 2015, 12:05pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/1 "2015-11-27T12:05:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [November 27, 2015, 12:49pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/2 "2015-11-27T12:49:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hans\_Bienert](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@Hans\_Bienert](https://forum.opennebula.io/u/Hans_Bienert)\
**Post date:** [November 27, 2015, 1:07pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/3 "2015-11-27T13:07:52Z")

</div>

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:

 ![](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/5/5b970ab54e4f1e05dd01a8d43cf3d8eaa712ff42.png)

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

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [November 27, 2015, 2:20pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/4 "2015-11-27T14:20:16Z")

</div>

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`?

---

<div class="post-metadata">

**Author:** ![Hans\_Bienert](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@Hans\_Bienert](https://forum.opennebula.io/u/Hans_Bienert)\
**Post date:** [November 30, 2015, 8:57am UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/5 "2015-11-30T08:57:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hans\_Bienert](https://avatars.discourse-cdn.com/v4/letter/h/34f0e0/32.png) [@Hans\_Bienert](https://forum.opennebula.io/u/Hans_Bienert)\
**Post date:** [December 4, 2015, 12:21pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/6 "2015-12-04T12:21:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [December 4, 2015, 3:43pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/7 "2015-12-04T15:43:48Z")

</div>

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](http://dev.opennebula.org/issues/4227)

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [January 13, 2016, 4:48pm UTC](https://forum.opennebula.io/t/4-14-2-sunstone-error-allocating-a-new-virtual-machine/1529/8 "2016-01-13T16:48:36Z")

</div>

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