# \[Solved\] Error starting vm with 802.1Q network

**URL:** <https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405>\
**Category:** Product Support\
**Created:** [December 2, 2016, 10:46pm UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405 "2016-12-02T22:46:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [December 2, 2016, 10:46pm UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/1 "2016-12-02T22:46:53Z")

</div>

Hi, I have created a 802.1Q interface as follows:

> VIRTUAL NETWORK 13 INFORMATION  
> ID : 13  
> NAME : public  
> USER : oneadmin  
> GROUP : oneadmin  
> CLUSTERS : 0,100  
> BRIDGE : public  
> VN\_MAD : 802.1Q  
> PHYSICAL DEVICE: eth0  
> USED LEASES : 1

> PERMISSIONS  
> OWNER : um-  
> GROUP : —  
> OTHER : —

> VIRTUAL NETWORK TEMPLATE  
> BRIDGE=“public”  
> DESCRIPTION=“Public network for vdi”  
> PHYDEV=“eth0”  
> SECURITY\_GROUPS=“0”  
> VN\_MAD=“802.1Q”

> ADDRESS RANGE POOL  
> AR 0  
> SIZE : 256  
> LEASES : 1

> RANGE FIRST LAST  
> MAC 02:00:c0:a8:02:00 02:00:c0:a8:02:ff  
> IP 192.168.2.0 192.168.2.255

> LEASES  
> AR OWNER MAC IP IP6\_GLOBAL  
> 0 V:12 02:00:c0:a8:02:03 192.168.2.3 -

But in logs I get the following error:

Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG I 11 Command execution fail: /var/tmp/one/vnm/802.1Q/pre PFZNPjxJRD4xMTwvSUQ+PERFUEx…  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG E 11 pre: Command "sudo ip link add link public name public. type vlan id " failed.  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG E 11 pre: Command line is not complete. Try option “help”  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG E 11 Command line is not complete. Try option “help”  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG E 11  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG I 11 ExitCode: 255  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: LOG I 11 Failed to execute network driver operation: pre.  
Fri Dec 2 23:33:06 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 11 802.1Q: Command line is not complete. Try option “help”

Any help will be welcome.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [December 3, 2016, 8:53am UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/2 "2016-12-03T08:53:08Z")

</div>

Hi oscar!  
🤔 the log says that the following command failed:

> sudo ip link add link public name public. type vlan id

That means that “public.” is trying to be used as the VLAN identifier and that’s why the ip link command fails, a VLAN id should use a number not a string. VLAN\_ID [is not mandatory for 802.1Q](http://docs.opennebula.org/5.2/deployment/open_cloud_networking_setup/hm-vlan.html) but you can use it to specify what VLAN you want to use. Could you run the following command as the oneadmin user?:

> onevm show 11 -x

Only to check where is that “public.” coming from?

Happy weekend!

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [December 3, 2016, 9:33am UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/3 "2016-12-03T09:33:31Z")

</div>

Hi Miguel Angel,

As you’ll can see, I have note set any vlan-id.

I have pasted the configuration of the vnet here (fedora paste):

[https://da.gd/skrL](https://da.gd/skrL)

And the configuration of the vm here (fedora paste):

[https://da.gd/8VBe6](https://da.gd/8VBe6)

Nice weekend! Feliz finde!

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [December 4, 2016, 9:44am UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/4 "2016-12-04T09:44:57Z")

</div>

Morning!  
looking your pastebins, I think it’s a problem with the docs or it’s a bug for vnets being created in the CLI.

Though VLAN\_ID is not mandatory for 802.1Q according to [docs](http://docs.opennebula.org/5.2/deployment/open_cloud_networking_setup/hm-vlan.html#defining-a-802-1q-network), the VLAN ID should be generated if not defined. Your vnet template has these values once you create the vnet, so there’s no VLAN\_ID to use (not your fault!).

> \<VLAN\_ID/\>  
> \<VLAN\_ID\_AUTOMATIC\>0\</VLAN\_ID\_AUTOMATIC\>

I’ve been following the code and the driver will try to add a subinterface in the PHYDEV (phydev.vlan\_id). In your case public is the PHYDEV and you have no VLAN\_ID so that’s where the “public.” comes from and why the ip link command fails.

I’ll discuss this issue, in the mean time could you please try the following?:

- Set AUTOMATIC\_VLAN\_ID = “YES” in your vnet configuration file and create this network again, if you run onevnet show vnet\_id -x afterwards you should find that a VLAN\_ID has been autogenerated
- Or specify a VLAN\_ID like 1 for the default VLAN or any VLAN\_ID that you want to use for 802.1Q

That way ip link will have the VLAN\_ID that needs so desperately 😄 before running the VM.

Thanks for your feedback!

P.S: I’ll update or edit this post with any further info I found

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [December 4, 2016, 6:20pm UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/5 "2016-12-04T18:20:49Z")

</div>

Hi Miguel Angel,

Before trying your workarround I’d like to be sure I’m doing thinks right:

This is my network configuration:

```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master public state UP qlen 1000
    link/ether 00:0c:29:19:16:7c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20c:29ff:fe19:167c/64 scope link
       valid_lft forever preferred_lft forever
3: eno33554984: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master interconnect state UP qlen 1000
    link/ether 00:0c:29:19:16:86 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20c:29ff:fe19:1686/64 scope link
       valid_lft forever preferred_lft forever
4: public: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 00:0c:29:19:16:7c brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.11/24 brd 192.168.2.255 scope global public
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe19:167c/64 scope link
       valid_lft forever preferred_lft forever
5: interconnect: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 00:0c:29:19:16:86 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.11/24 brd 192.168.100.255 scope global interconnect
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe19:1686/64 scope link
       valid_lft forever preferred_lft forever
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 52:54:00:38:33:d3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
7: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
    link/ether 52:54:00:38:33:d3 brd ff:ff:ff:ff:ff:ff

```

I have created manually the public bridge and interconnect bridge.

In my configuration:  
BRIDGE may be public ?  
PHYDEV may be “public” or “eno16777736” ?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [December 6, 2016, 8:15am UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/6 "2016-12-06T08:15:50Z")

</div>

Hi oscar,  
according to docs, as you already have a bridge called public with the eno16777736 added to it, you would create the 802.1Q vnet using onevnet from a file like this:

> NAME = “yourvnetname”  
> VN\_MAD = “802.1Q”  
> PHYDEV = “eno16777736”  
> VLAN\_ID = 1 # either set the VLAN\_ID or set AUTOMATIC\_VLAN\_ID = “YES”  
> BRIDGE = “public”

That would create the eno16777736.VLAN\_ID subinterface. If you had no public bridge, OpenNebula would create the public bridge for you connecting the PHYDEV interface. That should work fine.

Cheers!

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [December 6, 2016, 10:23am UTC](https://forum.opennebula.io/t/solved-error-starting-vm-with-802-1q-network/3405/7 "2016-12-06T10:23:15Z")

</div>

Hi,

It looks has worked perfectly:

```
10: eno16777736.1@eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master public state UP
    link/ether 00:0c:29:19:16:7c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20c:29ff:fe19:167c/64 scope link
       valid_lft forever preferred_lft forever

```

Thanks a lot!
