ERROR: pre: Command "sudo -n ip link set master virbr0" failed. BOOT_UNDEPLOY_FAILURE

I’m having trouble starting the VM.

LCM State: BOOT_UNDEPLOY_FAILURE

Message in OpenNebula Sunstone:

"Driver Error
DEPLOY: bridge: ERROR: pre: Command “sudo -n ip link set master virbr0” failed. ERROR: pre: Not enou… see more details in VM log "

VM log:

 [Z0][VMM][I]: Command execution fail (exit code: 255): cat << 'EOT' | /var/tmp/one/vnm/bridge/pre
 [Z0][VMM][E]: pre: Command "sudo -n ip link set master virbr0" failed.
 [Z0][VMM][E]: pre: Not enough information: "dev" argument is required.
 [Z0][VMM][I]: Not enough information: "dev" argument is required.
 [Z0][VMM][I]: ExitCode: 255
 [Z0][VMM][I]: Failed to execute network driver operation: pre.
 [Z0][VMM][E]: DEPLOY: bridge: ERROR: pre: Command "sudo -n ip link set master virbr0" failed. ERROR: pre: Not enough information: "dev" argument is required. Not enough information: "dev" argument is required. ExitCode: 255
 [Z0][VM][I]: New LCM state is BOOT_UNDEPLOY_FAILURE

VM → Conf


ETH0_EXTERNAL 	
ETH0_GATEWAY 	192.168.122.1
ETH0_IP 	192.168.122.2
ETH0_IP6 	
ETH0_IP6_GATEWAY 	
ETH0_IP6_METHOD 	
ETH0_IP6_METRIC 	
ETH0_IP6_PREFIX_LENGTH 	
ETH0_IP6_ULA 	
ETH0_MASK 	255.255.255.0

VM → Template

NIC = [
  AR_ID = "0",
  BRIDGE = "virbr0",
  BRIDGE_TYPE = "linux",
  CLUSTER_ID = "0",
  IP = "192.168.122.2",
  NAME = "NIC0",
  NETWORK = "private",
  NETWORK_ID = "0",
  NETWORK_UNAME = "oneadmin",
  NIC_ID = "0",
  OUTER_VLAN_ID = "",
  PHYDEV = "",
  SECURITY_GROUPS = "0",
  TARGET = "one-0-0",
  VLAN_ID = "",
  VN_MAD = "bridge"

]

I have installed OpenNebula. OpenNebula 6.6.0
I set up a VM (KVM-Ubuntu 22.04).
I have set up Network (Virutal Network Template, Virutal Network).
I’ve set up an SSH connection to an Ubuntu 22.04 VM.
Everything worked. I could connect to via ssh from the VM, there was internet access in the VM.

I wanted to do port forwarding to be able to connect via ssh from the internet to the VM. Using the information at libvirt: NAT forwarding (aka "virtual networks") (“Forwarding Incoming Connections”).
I restarted the host and the problem appeared. I couldn’t start the VM. I created another VM. In the created VM, I was able to connect via ssh but immediately I had no access. I restarted the host and the problem appeared in all VMs already.

I don’t know where exactly the problem is, where to look for it?

You need to setup a phydev in the virtual network, so it can be attached to the bridge.

The error is actually this missing device in the ip link set command.

If you want to not connect the VMs outside the hypervisor (i.e. you only have one node). You can either create the bridge manually and OpenNebula will use it. Or you can create a dummy tap device.

Ok, thanks. I guessed it was about the PHYDEV attribute. But there is also another problem with the “PHYDEV” attribute, I don’t know if it’s a BUG or normal behavior.

I tested different “virbr0” configurations:

  • first without assigning PHYDEV but not everything in the network worked as I wanted
  • so I assigned “PHYDEV” but it also didn’t work as I wanted
  • so I removed the assigned value to “PHYDEV” (in sunstone Network->Virtual Networks->Update Virtual Network->Physical device
    and here is the error when booting the VM described in the first post:
    “Not enough information: “dev” argument is required.”
    The VM did not start.
  • so I wanted to remove the “PHYDEV” attribute from Network->Virtual Networks->Update Virtual Network by other two ways:
    1. “Advanced” tab - removing 'PHYDEV =“” ’ from the template. After clicking “Update”, the line 'PHYDEV=“” ’ still exists
    2. In Network->Virtual Networks (http://127.0.0.1:9869/#vnets-tab/0) “Info” tab I could not remove the PHYDEV attribute - after clicking the trash icon, additional attributes appear: VNET_UPDATE - PHYDEV .
      After restarting the host - in the “Info” tab, I couldn’t remove the PHYDEV attribute - nothing happens when I click the trash icon.

In summary
I couldn’t remove the “PHYDEV” attribute in Network->Virtual Networks (http://127.0.0.1:9869/#vnets-tab/0) resulting in:
The VM instance then has an error and won’t boot:
[Z0][VMM][E]: pre: Command “sudo -n ip link set master virbr0” failed.
[Z0][VMM][E]: pre: Not enough information: “dev” argument is required.

I solved it so that I created another Virtual Network instance without the “PHYDEV” attribute and assigned it to the VM.

I suppose the problem is assigning an empty value somewhere in the program to a command using “dev” instead of omitting this parameter.

Yes setting PHYDEV to empty string is as you suggest different from removing it. So I’m glad that you solved the original issue. We’ll look into the Sunstone interface issue.

Thanks for the update!