[libvirt] [PATCH] qemu: change the name of tap device for a tap and bridge network
Daniel P. Berrange
berrange at redhat.com
Fri Apr 28 09:33:32 UTC 2017
On Fri, Apr 28, 2017 at 05:23:19PM +0800, ZhiPeng Lu wrote:
> Creating tap device and adding the device to bridge are not atomic operation.
> Similarly deleting tap device and removing it from bridge are not atomic operation.
> The Problem occurs when two vms start and shutdown. When one vm with the nic
> named "vnet0" stopping, it deleted tap device but not removing port from bridge.
> At this time, another vm created the tap device named "vnet0" and added port to the
> same bridge. Then, the first vm deleted the tap device from the same bridge.
> Finally, the tap device of the second vm don't attached to the bridge.
> So, we can add domid to vm's nic name. For example, the vm's domid is 1 and vnet0
> is renamed to vnet1.0.
Surely deleting the NIC automatically removes it from the bridge so we
can just remove the code that delets the bridge port.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list