Exceeded the maximum number of disks (20)

Hello,

I´m using opennebula 4.4.1 and want to instantiate a vm with more than 20 disks but I receive the following error message:
[TemplateInstantiate]
Error allocating a new virtual machine.
Exceeded the maximum number of disks (20)

Any idea where/if I can change the maximum number of disks ?

Best regards
Hans Bienert

It is hardcoded:

You may just change that value

Hi Ruben,

thank you for your tip.
I changed the code and created a new binary of oned.
I have activated the binary this mornig and it works fine.

thanx again.

Best regards
Hans Bienert

@ruben: Do you know why this limit has been imposed for additional disk attachment to VM?

No, I don’t think there was any specific reason. I think we set a safe default across bus types and hypervisors. It can be greater for sure in some cases…

i like it thnx.

Hi Team,

I’ve seen that one possible solution is to change source code and create a new binary for oned. Anybody can explain or share some help to do it?

Best Regards,

Hello @david.sole,

You can find some insights on the documentation:
https://docs.opennebula.io/6.8/integration_and_development/references/compile.html?highlight=build%20from%20source

In any case, since this is an old post, I suggest to open a new thread in case you need to ask more questions about this.

Cheers,

Hi Francisco,

Thank you so much for your response, I’m not an expert with scons… I don’t know if I can compile only “oned” and how to do it.

Best Regards,

Enviado desde Outlook para iOS

You don’t need to be an expert. Is just making sure you have the build dependencies installed and telling scons with option=value which features you’d like to build, for example, sunstone=no will skip the build of the web interface.

There is an example build in the documentation.

oneadmin@frontend:~/ $> wget
oneadmin@frontend:~/ $> tar xzf
oneadmin@frontend:~/ $> cd opennebula-x.y.z
oneadmin@frontend:~/opennebula-x.y.z/ $> scons -j2 mysql=yes syslog=yes
[ lots of compiling information ]
scons: done building targets.
oneadmin@frontend:~/opennebula-x.y.z $> sudo ./install.sh -u oneadmin -g oneadmin

1 Like

Thanks Daniel, I’ll try it.