On Thu, Oct 19, 2017 at 10:08:37AM +0200, Martin Kletzander wrote: > On Wed, Oct 18, 2017 at 04:48:45PM +0200, Marc Haber wrote: > > Hi, > > > > I'm trying to give libvirt knowlegde of a VLAN interface that is > > configured by a different means and not by libvirt. To figure out the > > syntax, I created a VLAN interface through virt-manager and dumped out > > the XML: > > > > <interface type='vlan' name='ens3.180'> > > <protocol family='ipv6'> > > <ip address='2a01:4f8:150:436c::55:100' prefix='64'/> > > <ip address='fe80::5054:ff:fe30:e0d1' prefix='64'/> > > </protocol> > > <link speed='4294967295' state='up'/> > > <vlan tag='180'> > > <interface name='ens3'/> > > </vlan> > > </interface> > > > > I then removed the Interface in virt-manager and tried to have libvirt > > read back its own XML. > > > > [12/784]mh@testsid85:~ $ virsh iface-dumpxml ens3.180 > ens3.180.xml > > [13/785]mh@testsid85:~ $ virsh iface-define ens3.180.xml > > error: Failed to define interface from ens3.180.xml > > error: XML error: could not get interface XML description: XML invalid - Expecting an element start, got nothing > > > > What is going on here? How do I define a VLAN interface via XML? > > > > Hm, weird. Before looking at where the problem is, it could be easier to find > if we knew how virt-manager was able to define this. Can you look at the logs > for the XML from virt-manager? [Mi, 18 Okt 2017 16:38:57 virt-manager 31596] DEBUG (interface:253) Creating int erface 'ens3.180' with xml: <interface type="vlan" name="ens3.180"> <start mode="onboot"/> <vlan tag="180"> <interface name="ens3"/> </vlan> </interface> This directly opens the next issue: I explicitly asked virt-manager to do "no configuration" of IPv6, which seems to be the case in the XML given to libvirt by virt-manager, but still, the libvirt-generated XML contains the IPv6 configuration of the interface (which it shouldn't, IMO). I tried iface-define with <interface type='vlan' name='ens3.180'> <link speed='4294967295' state='up'/> <vlan tag='180'> <interface name='ens3'/> </vlan> </interface> also with the link speed clause removed, but the error message remains the same. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list