When I create a VM in OpenNebula it shows LCM state is BOOT_FAILURE. When I check Vcenter 6 itself the VM is there ( powered down state ), I can power it on and it works.
The log shows;
New state is ACTIVE
New LCM state is PROLOG
New LCM state is BOOT
Generating deployment file: /var/lib/one/vms/56/deployment.0
Successfully execute network driver operation: pre.
Command execution fail: /var/lib/one/remotes/vmm/vcenter/deploy ‘/var/lib/one/vms/56/deployment.0’ ‘Macrolan-DC1-Cluster1’ 56 Macrolan-DC1-Cluster1
/usr/lib/one/ruby/vendors/rbvmomi/lib/rbvmomi/type_loader.rb:66: warning: already initialized constant RbVmomi::VIM::Datastore
/usr/lib/one/ruby/vcenter_driver.rb:50: warning: previous definition of Datastore was here
Deploy of VM 56 on host Macrolan-DC1-Cluster1 with /var/lib/one/vms/56/deployment.0 failed due to "Network vSwitch0 not found in host 220.127.116.11"
Failed to execute virtualization driver operation: deploy.
Error deploying virtual machine
New LCM state is BOOT_FAILURE
Also note that it takes 3600 seconds ( 1 hour ) to create the VM which is very long. How can this be brought down?
Create Distributed Switch in vCenter
Thanks for the reply, I did create a Distrubution switch but same issue.
When I create the server in Nebula I can see the VM create in vCenter and as soon as it finishes the creation it fail in the log of OPenNebula. The server stays off in vcenter. if I power it up I can access it through vcenter but in nebula it shows failed.
So it connects to vcenter to create the VM but its as if it cant start the VM and pull the server back to nebula, if I can explain it like that…
I’ll start with your second question. When the VM is deployed, a clone operation is involved in vCenter. That clone is created in a datastore and if that datastore uses shared storage like NFS, and not a local disk for instance, that operation may take some time depending on network speed, datastore performance and of course the size of the VM disk type (eager zeroed thick, thin…). In any case that clone operation time is not OpenNebula’s “fault” as OpenNebula delegates those actions to vCenter so if you try to do the same task from vCenter the time involved would be the same.
Now the first question. Once the VM clone is done OpenNebula you have it in vCenter. OpenNebula tries to boot the VM but first some tasks must be done. One of the tasks is checking network interfaces. It seems that one of your NIC is associated with “Network vSwitch0” and it’s not found by OpenNebula. If you’re not using Distributed switches then that network switch may not be available in the ESX host where vCenter is deploying the VM so either use Distributed switches as Anton has suggested (if your vSphere’s licence is Enterprise+) or create ESX switches in each host on your cluster with the same name.
Also with that name I guess you’re using a vswitch and not a port group… which is not currently supported (see http://docs.opennebula.org/5.2/deployment/vmware_infrastructure_setup/networking_setup.html?highlight=vcenter#vcenter-networking) you may try to create a port group for that vSwitch0 and then change the VM template so the BRIDGE section points to that port group instead of “Network vSwitch0”.