Problem with Opennebula's driver for rancher

Hello again. I’m trying to deploy and manage Kuberntes cluster in opennebula using the opennebula’s driver for rancher. according to the documentation, I’ve added opennebula’s driver in rancher and now in node template and closter section, I see opennebulaa is added as provider. The problem is when I create node template and create cluster from that template, nothing happen. using tcpdump, I foundout there is no network activity between opennebula and rancher server. I’m using IP address instead of FQDN to make sure there is nothing related to name resolution. both servers working without firewall and they are in a same subnet . Can anyone help me to find what is wrong or what I missed?

Hi @Hamed_Maleki,

from what you described, if there is no activity between Rancher and OpenNebula, I think the issue could be in the parameters of the node template related to the OpenNebula endpoint. I would suggest to check the endpoint parameters in the node template.

Do you get any error message from Rancher UI?

Best
Marco

sorry for late reply.
I investigate rancher logs and some issues are fixed. but I see the following line I logs

Error creating machine: Error in driver during machine creation: IP address is not set

I’m Using a template which is configured to obtain IP from DHCP. When I use vmware driver, I write some lines in cloud-condig to remove machine-id, generate new one and request with new machine-id from dhcp and it is working.
But with Opennebula driver I don’t know how to do that or how to assign static IP to the machines. clould you please guide me?

Hi, you can define static IP in your opennebula template. But in that case you need one template for each machine. I am using opennebula networks with address ranges defined, so when I instantiate VM from template, then opennebula assings IP from pool. You can “connect” opennebula IP address pool with your dhcp server. Write some script which will generate static leases. There is also VFN appiance in opennebula marketplace, which should have dhcp server with such connection, but I dont test it.

Personally, I am using contexualization scripts in my vm image templates, so opennebla assings IP and context script inside VM setup right address. So I don’t dhcp server in network.

Opennebula also has IPAM support, so you can connect address ranges with existing solution in you company