Virtual Router NIC not detached on actual VM

When I run onevrouter nic-detach <vrouter_id> <nic_d>, the NIC gets detached from the Virtual Router but not on the actual VM. And there’s no way to remove it directly from the VM because it complains Action is not supported for virtual router VMs. The virtual network also reports that the IP/interface is still assigned to the VM instance of the router.

Anyone encountered this issue? It’s messing up with my setup right now and I don’t want to re-create the Virtual Router as much as possible.

I was able to reproduce it. It happens when the VM fails to remove the NIC. There are more ways how it can fail:

  • The hypervisor fails to remove the NIC
  • The VM is in wrong state (e.g. attaching disk, migrating, …)

Right now there is no easy way to recover from this inconsistency. We are thinking about possible solution.

Hard way to recover:

  • Use onedb update-body to manually remove the NIC from VM
  • Manually remove the nic from the hypervisor
  • Run onedb fsck to fix used leases on virtual network
1 Like

Thank you for the options to recover @pczerny !
I ended up re-creating the virtual router.
But these options will definitely help in the future.