VM deployment FAILED, host with openvswitch, crash in nic.rb

Hi, i’m already trying to setup my first OpenNebula cloud. I have three host with openvswitch based networking. Frontent version is 4.12. Here is a log from deployment process when VM fails. Could someone help mi fix this? thx

Wed Mar 25 14:16:05 2015 [Z0][DiM][I]: New VM state is ACTIVE.
Wed Mar 25 14:16:05 2015 [Z0][LCM][I]: New VM state is PROLOG.
Wed Mar 25 14:16:05 2015 [Z0][VM][I]: Virtual Machine has no context
Wed Mar 25 14:16:06 2015 [Z0][LCM][I]: New VM state is BOOT
Wed Mar 25 14:16:06 2015 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/22/deployment.0
Wed Mar 25 14:16:06 2015 [Z0][VMM][I]: ExitCode: 0
Wed Mar 25 14:16:06 2015 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: ExitCode: 0
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
Wed
 Mar 25 14:16:07 2015 [Z0][VMM][I]: Command execution fail: 
/var/tmp/one/vnm/ovswitch/post 
PFZNPjxJRD4yMjwvSUQ+PERFUExPWV9JRC8+PFRFTVBMQVRFPjxOSUM+PEFSX0lEPjwhW0NEQVRBWzBdXT48L0FSX0lEPjxCUklER0U+PCFbQ0RBVEFbb3ZzYnIwXV0+PC9CUklER0U+PElQPjwhW0NEQVRBWzE0Ny4zMi44Ni4xMDRdXT48L0lQPjxNQUM+PCFbQ0RBVEFbMDI6MDA6OTM6MjA6NTY6NjhdXT48L01BQz48TkVUV09SSz48IVtDREFUQVt2bW5ldC0wNF1dPjwvTkVUV09SSz48TkVUV09SS19JRD48IVtDREFUQVswXV0+PC9ORVRXT1JLX0lEPjxORVRXT1JLX1VOQU1FPjwhW0NEQVRBW29uZWFkbWluXV0+PC9ORVRXT1JLX1VOQU1FPjxOSUNfSUQ+PCFbQ0RBVEFbMF1dPjwvTklDX0lEPjxTRUNVUklUWV9HUk9VUFM+PCFbQ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VMM][I]: from /var/tmp/one/vnm/vm.rb:46:in `block in initialize'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /usr/lib64/ruby/2.0.0/rexml/element.rb:905:in `block in each'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /usr/lib64/ruby/2.0.0/rexml/xpath.rb:67:in `each'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /usr/lib64/ruby/2.0.0/rexml/xpath.rb:67:in `each'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /usr/lib64/ruby/2.0.0/rexml/element.rb:905:in `each'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/vm.rb:45:in `initialize'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/vnm_driver.rb:46:in `new'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/vnm_driver.rb:46:in `initialize'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/ovswitch/OpenvSwitch.rb:29:in `initialize'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/vnm_driver.rb:56:in `new'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/vnm_driver.rb:56:in `from_base64'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: from /var/tmp/one/vnm/ovswitch/post:27:in `<main>'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: ExitCode: 1
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: error: failed to get domain 'one-22'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: error: Domain not found: no domain with matching name 'one-22'
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: ExitCode: 0
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: Successfully execute virtualization driver operation: cancel.
Wed Mar 25 14:16:07 2015 [Z0][VMM][I]: Failed to execute network driver operation: post.
Wed Mar 25 14:16:07 2015 [Z0][VMM][E]: Error deploying virtual machine
Wed Mar 25 14:16:08 2015 [Z0][DiM][I]: New VM state is FAILED

Hi

It seems that OpenNebula cannot detect the hypervisor you are using. Could
you send us the output for:

  • (If you are using KVM) lsmod | grep kvm
  • (if you are using Xen) ls /proc/xen/capabilities

Thanks

Ruben

Hi, output of lsmod | grep kvm is empty because all options related to kvm and visualization are compiled in kernel.

CONFIG_KVM=y
CONFIG_KVM_INTEL=y
# CONFIG_KVM_AMD is not set

Thanks
Martin

I’m afraid that we didn’t consider that case.

I’ll file an issue for this, meantime you can just go to
/var/remotes/vnm/ovswtich and:

  • Update post to read:
    ovs = OpenvSwitchVLAN.from_base64(template64, deploy_id, “kvm”)

  • Update clean to read:
    ovs = OpenvSwitchVLAN.from_base64(template64,"-",“kvm”)

After that, run onehost sync as oneadmin from the front-end

Thanks

Ruben

Yes, this is a workaround. VM starts and joins virtual bridge as expected.