Terraform and OpenNebula, did anyone use the blackberry provider?

Hi there,

I was playing with the opennebula provider created by blackberry:

i managed to clone and create new images but i am having an issue trying to create a new vnet.

this is the error:

* opennebula_vnet.reservation: [VirtualNetworkAllocate] Parse error: syntax error, unexpected VARIABLE, expecting EQUAL or EQUAL_EMPTY at line 3, columns 16:22

I think the syntax is fine:

resource "opennebula_vnet" "create_vnet" {
  name = "vm"
  description = "vm"
  permissions = "600"
  bridge = "br0"
  ip_start = "10.10.10.10"
  ip_size = "${var.vm_count}"
}

Anyone managed to use it properly? Thanks

Hello,

I asked the same in another topic about the original provider from Runtastic (https://github.com/runtastic/terraform-provider-opennebula)
During the OpenNebula conf in November in Amsterdam, and more precisely during this presentation: https://www.slideshare.net/opennebula/opennebulaconf2018-hybrid-clouds-dancing-with-automated-virtual-machines-xavier-peralta-csuc
Xavier explained he is using the provider for his deployment.

I want to add that I am working on this provider to use the official Go bindings “Goca”, I will share my work once I have something ready (hopefully in few weeks).

About your issue, it seems the issue is in the “description” part. Actually, the description part is used to provide VM information as an XML Template.
If you remove the description line to test, you might not have error during vnet creation.

Hope this helps

I tried to remove every field including description but i got the same error every time

Thanks

Hello,

It seems the type of vnet is missing.

Moreover, the error is returned by opennebula. So it means the XML sent to Opennebula contains a syntax error.
Can you check, via a tcpdump, or any other way to get he XML sent to Opennebula where is the syntax issue ?
It should be easy to detect and to understand where is the issue in the tf file.

Regards

Jean-Philippe

good idea, i will check soon and post it here

thanks!

Hi,

I’ve forked the runtastic provider and made some changes to get support for 802.1q networks. My go skills are almost non existing, so don’t shoot me for bad coding but the provider now does what I need it to do. If I get some time to cleanup the code, I’ll submit a PR but for now, if interested, you can find it at https://github.com/sam-wouters/terraform-provider-opennebula.

Let me know if you have issues with it.

Hi @samw

I also forked the Runtastic project and I add some options inside it. I also started the migration to the GOCA.
You can find the provider here: https://github.com/iguanesolutions/terraform-provider-opennebula/

Maybe it can also help you.

Regards

Take a look at the recent post about the Terraform Provider that is now in the OpenNebula Add-on Catalog. Thanks Iguane Solutions!

https://opennebula.org/terraform-provider-for-opennebula-in-the-add-on-catalog/