Re: PATCH: strip auto-generated VIF names from XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 04, 2007 at 05:49:10PM +0000, Daniel P. Berrange wrote:
> On Tue, Dec 04, 2007 at 05:40:44PM +0000, Richard W.M. Jones wrote:
> > Daniel P. Berrange wrote:
> > >For the QEMU / KVM driver, if the user doesn't specify an explicit name for
> > >the TAP device associated with a virtual NIC, we auto-generate one with a
> > >name vnetXXX.  You can see this if you dump XML for a running QEMU guest.
> > >Unfortunately if you dump XML, make a change and then feed it back in with
> > >the define XML API, you have now persisted this auto-generated VIF name.
> > >
> > >Do this for several domains at varying times and you'll eventually  get
> > >2 domains which have persisted the same auto-generated vnetXXX device
> > >name. You can now not start both of these VMs at once.
> > >
> > >The fix for this is simple - simply strip any TAP device name starting with
> > >the string 'vnet' when defining a new VM. It will thus get assigned a new
> > >automatically generate name which doesn't clash. The patch also strips out
> > >hardcoded vnetXXX names when starting a VM to proactively deal with any
> > >existing VMs whose config has been broken in this way.
> > 
> > Hang about though, don't we sometimes want to explicitly set the name of 
> > some interfaces to vnetXXX?
> 
> No, if you want to manually set interface names, you have to use something
> other than a 'vnet' prefix. 'vnet' is the prefix for auto-generated names
> in same way as 'vif' is the prefix for Xen auto-generated names.

  okay, makes sense then,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]