# Enabling VLAN for existing VMs

**URL:** <https://forum.opennebula.io/t/enabling-vlan-for-existing-vms/428>\
**Category:** Product Support\
**Created:** [March 16, 2015, 2:58pm UTC](https://forum.opennebula.io/t/enabling-vlan-for-existing-vms/428 "2015-03-16T14:58:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilma\_hermann](https://avatars.discourse-cdn.com/v4/letter/w/b4bc9f/32.png) [@wilma\_hermann](https://forum.opennebula.io/u/wilma_hermann)\
**Post date:** [March 16, 2015, 2:58pm UTC](https://forum.opennebula.io/t/enabling-vlan-for-existing-vms/428/1 "2015-03-16T14:58:24Z")

</div>

Hi everyone,

I just switched my existing setup (OpenNebula 4.12) from dummy networking to an OpenVSwitch setup with VLANs. For newly created VMs, everything is working fine. However, all existing VMs get no network connectivity since their template does not get updated with the new VNet-Settings. In particular, OpenNebula does not advise OpenVSwitch to assign a VLAN tag. If I assign the tag manually (e.g. ‘ovs-vsctl set Port vnet0 tag=2’), the connection works again. But that’s not a practical solution for me. Is there a way to fix this without deleting the VMs?

Greetings  
Wilma

---

<div class="post-metadata">

**Author:** ![wilma\_hermann](https://avatars.discourse-cdn.com/v4/letter/w/b4bc9f/32.png) [@wilma\_hermann](https://forum.opennebula.io/u/wilma_hermann)\
**Post date:** [March 18, 2015, 10:58am UTC](https://forum.opennebula.io/t/enabling-vlan-for-existing-vms/428/2 "2015-03-18T10:58:52Z")

</div>

I managed to resolve the problem by editing the database.

Greetings  
Wilma

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [April 6, 2015, 8:49am UTC](https://forum.opennebula.io/t/enabling-vlan-for-existing-vms/428/3 "2015-04-06T08:49:28Z")

</div>

Hi Wilma,

Just to point pout, that the only way to change the vnet settings of  
existing VMs is to update the DB as mentioned in your last message…

Cheers
