Opennebula Network BUG with VMWARE vCenter

If create VM without NIC and then add NIC to VM - network not work because Network Interface name is different of config name and name in config.

I try one-context 5.0.0 and 5.0.1. This bug on all Linux (Centos, Ubuntu, Debian, etc…)

If add NIC to POWER OFF VM, VN can’t start.

in log:
Mon Aug 22 17:28:02 2016 [Z0][VMM][I]: Deploy of VM 93 on host CL01 with /var/lib/one/vms/93/deployment.6 failed due to “undefined method []' for nil:NilClass" Mon Aug 22 17:28:02 2016 [Z0][VMM][I]: ExitCode: 255 Mon Aug 22 17:28:02 2016 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy. Mon Aug 22 17:28:02 2016 [Z0][VMM][E]: Error deploying virtual machine Mon Aug 22 17:28:02 2016 [Z0][VM][I]: New state is POWEROFF Mon Aug 22 17:28:02 2016 [Z0][VM][I]: New LCM state is LCM_INIT Mon Aug 22 17:28:03 2016 [Z0][VM][I]: New state is ACTIVE Mon Aug 22 17:28:03 2016 [Z0][VM][I]: New LCM state is BOOT_POWEROFF Mon Aug 22 17:28:03 2016 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/93/deployment.7 Mon Aug 22 17:28:03 2016 [Z0][VMM][I]: Successfully execute network driver operation: pre. Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: Command execution fail: /var/lib/one/remotes/vmm/vcenter/deploy '/var/lib/one/vms/93/deployment.7' 'CL01' 93 CL01 Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: /usr/lib/one/ruby/vendors/rbvmomi/lib/rbvmomi/type_loader.rb:66: warning: already initialized constant RbVmomi::VIM::Datastore Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: /usr/lib/one/ruby/vcenter_driver.rb:51: warning: previous definition of Datastore was here Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: Deploy of VM 93 on host CL01 with /var/lib/one/vms/93/deployment.7 failed due to "undefined method[]’ for nil:NilClass”
Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: ExitCode: 255
Mon Aug 22 17:28:04 2016 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Mon Aug 22 17:28:04 2016 [Z0][VMM][E]: Error deploying virtual machine
Mon Aug 22 17:28:04 2016 [Z0][VM][I]: New state is POWEROFF
Mon Aug 22 17:28:04 2016 [Z0][VM][I]: New LCM state is LCM_INIT

You’ve just found two bugs:

I’ve just found the last one now. Even if the context is not regenerated the drivers try to add the context again after nic-attach. The problem is that vCenter behaves differently when setting guestinfo variables with the VM powered on or powered off.

Hopefully these will be fixed in the next release. There is no easy patch, at least I don’t know of any right now.

In vOneCloud all works fine. Maybe I do something wrong?

What version of vOneCloud are you using?

It’s weird it can configure new attached nics as context is not regenerated automatically.

I use 2.0.1 for tests

  1. Set Contextualization type = vCenter.
  2. Start external DHCP server.
  3. Import NEtwork from vCenter. Network Type = ETHER.
  4. Create CentOS 7 VM without network interfaces.
  5. Shutdown VM and attach new nic. Starting VM.
  6. Interface UP and have name eno16777736 Why not eth0(1,2,3, etc)?
  7. In Debian network not start! Interface present in ifconfig -a, but no settings in /etc/network/interfaces.

Please! How to network works in Opennebula + VMWare vCenter? maybe with bugs in this topic network temporary not working correctly?

Please! How to work with network on VMWare vCenter + Opennebula?

New BUG. Every SHUTDOWN and then START VM - add new NIC to VM in vCenter with same MAC.
Screenshot-1 Screenshot-2
P.S. I can record video.

vCenter contextualization is incompatible with OpenNebula contextualization. It won’t generate interfaces file. I’m not able to find the info in 5.0 documentation but here it is for 4.14 (there are no changes to this):

http://docs.opennebula.org/4.14/user/virtual_machine_setup/vcenter_customization.html

If you want to configure interfaces use standard OpenNebula contextualization.

This is caused because of “Consistent network device naming”:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html

Context packages disable network initialization in debian 8 as it causes a big delay on booting. If you are not using OpenNebula contextualization you can either not install context packages or change the file /etc/default/networking and set:

CONFIGURE_INTERFACES=yes