# After deleting a VM, all bridges are removed

**URL:** <https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746>\
**Category:** Product Support\
**Created:** [July 26, 2021, 5:20pm UTC](https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746 "2021-07-26T17:20:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz\_Molina](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Daniel\_Ruiz\_Molina](https://forum.opennebula.io/u/Daniel_Ruiz_Molina)\
**Post date:** [July 26, 2021, 5:20pm UTC](https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746/1 "2021-07-26T17:20:06Z")

</div>

Hello,

Today I have updated my server from 5.10.1 to 6.0.0.2 (passing from 5.10.1 to 5.12.0.4 and, then, from 5.12.0.4 to 6.0.0.2).

It seems all is running fine… but not. All not. I have noticed that after creating a VM and, then, deleting, all my bridges are removed.

Information logged at /var/log/one/oned.log:

> Mon Jul 26 19:14:37 2021 [Z0][VMM][I]: Successfully execute virtualization driver operation: cancel.  
> Mon Jul 26 19:14:43 2021 [Z0][VMM][I]: clean: Executed “sudo -n ip link delete br1”.  
> Mon Jul 26 19:14:43 2021 [Z0][VMM][I]: clean: Executed “sudo -n ip link delete br2”.  
> Mon Jul 26 19:14:43 2021 [Z0][VMM][I]: clean: Executed “sudo -n ip link delete br3”.  
> Mon Jul 26 19:14:43 2021 [Z0][VMM][I]: ExitCode: 0

I have found at `/var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf` that I can set `:keep_empty_bridge: false` to true… but problem remains (I have restarted opennebula service).  
Also, I have reconfigured `/var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf` setting that parameter with “ **delete** ” (explained at the top of the file), but now when I delete the last VM bridged to my bridge, this bridge is deleted, but if I instantiate a new VM, bridge is recreated OK… but it has lost its IP address… so… how can I avoid the bridge deleting process???

What can I do??? In 5.10.1 all ran fine…

Thanks.

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [July 27, 2021, 6:54am UTC](https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746/2 "2021-07-27T06:54:52Z")

</div>

> [@Daniel\_Ruiz\_Molina](#):
>
> I have found at `/var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf` that I can set `:keep_empty_bridge: false` to true… but problem remains (I have restarted opennebula service).

The VNM drivers are executed on the hosts so most probably you are not syncing the hosts after the reconfiguration?

You could try setting `:keep_empty_bridge: false` and update the hosts with `su - oneadmin -c 'onehost sync --force'`.

Best Regards,  
Anton Todorov

---

<div class="post-metadata">

**Author:** ![Daniel\_Ruiz\_Molina](https://avatars.discourse-cdn.com/v4/letter/d/f08c70/32.png) [@Daniel\_Ruiz\_Molina](https://forum.opennebula.io/u/Daniel_Ruiz_Molina)\
**Post date:** [July 27, 2021, 7:04am UTC](https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746/3 "2021-07-27T07:04:33Z")

</div>

Hi,

finally, I found that there are two files OpenNebulaNetwork.conf:

> /var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf  
> /var/tmp/one/etc/vnm/OpenNebulaNetwork.conf

I had modified to true one of them… so, now, after modifying both files, bridge is kept after deleting last VM.

Thanks!!

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [July 27, 2021, 7:11am UTC](https://forum.opennebula.io/t/after-deleting-a-vm-all-bridges-are-removed/9746/4 "2021-07-27T07:11:00Z")

</div>

The master file `/var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf` is propagated to the hosts by opennebula when you sync the hosts 🙂

It is a good habit to sync the hosts after altering the files in `/var/lib/one/remotes` 😉

Best Regards,  
Anton
