From: Stefan Bader <stefan.bader@canonical.com>
To: libvir-list@redhat.com, Xen-devel@lists.xen.org
Cc: Jim Fehlig <jfehlig@suse.com>, Ian Campbell <ian.campbell@citrix.com>
Subject: Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver
Date: Tue, 17 Dec 2013 17:34:17 +0100 [thread overview]
Message-ID: <52B07D09.5060008@canonical.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2236 bytes --]
Using virt-manager "hypervisor default" type:
<interface type='bridge'>
<mac address='00:16:3e:5e:09:9d'/>
<source bridge='br0'/>
<script path='vif-bridge'/>
</interface>
This causes the qemu call to have "-net none" which removes PXE boot
abilities. A linux kernel has network through the xen pv-driver.
Changing in virt-manager to "e1000" type:
<interface type='bridge'>
<mac address='00:16:3e:5e:09:9d'/>
<source bridge='br0'/>
<script path='vif-bridge'/>
<model type='e1000'/>
</interface>
This currently (Xen 4.3.1 + libvirt 1.2.0) fails and the qemu arguments
in the log look suspicious:
-device e1000,id=nic-1,netdev=net-1,mac=00:16:3e:5e:09:9d
-netdev type=tap,id=net-1,ifname=vif1.-1-emu,script=no,downscript=no
Looking through git I found ba64b97134a6129a48684f22f31be92c3b6eef96
libxl: Allow libxl to set NIC devid
which removes a line that sets the devid of new NICs. I assume the comment
says (sorry I always seem to get confused reading it) that devid should
be auto-set by the libxl library provided by Xen. But I could not find
where that would be done. Even the xl command implementation sets it
explicitly. libxl_device_nic_init sets it to -1 which would explain the
wrong qemu arguments above.
For testing I re-added the following after the libxlMakeNic call:
--- libvirt-1.2.0.orig/src/libxl/libxl_conf.c 2013-12-11 17:04:17.000000000 +0
+++ libvirt-1.2.0/src/libxl/libxl_conf.c 2013-12-16 19:08:46.830016646 +0
@@ -907,6 +907,8 @@ libxlMakeNicList(virDomainDefPtr def, l
for (i = 0; i < nnics; i++) {
if (libxlMakeNic(l_nics[i], &x_nics[i]))
goto error;
+ if (x_nics[i].devid < 0)
+ x_nics[i].devid = i;
}
d_config->nics = x_nics;
And with that I get a working PXE boot when I set the device type
in the config. (Side note that I think not using a type defaults to
rtl8139 in the old xend driver. Maybe this should be the same for the
xl driver).
I am not sure how the right fix for it should look like as I am unsure
which part was supposed to set the devid. Just right now it does not
seem to be done.
-Stefan
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2013-12-17 16:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 16:34 Stefan Bader [this message]
2013-12-17 16:58 ` Setting devid for emulated NICs (Xen 4.3.1 / libvirt 1.2.0) using libxl driver Ian Campbell
2013-12-17 17:32 ` Stefan Bader
[not found] ` <52B08AA9.8010809@canonical.com>
2013-12-18 12:27 ` Ian Campbell
[not found] ` <1387369646.27441.129.camel@kazak.uk.xensource.com>
2013-12-18 13:12 ` [libvirt] " Stefan Bader
[not found] ` <52B19F4E.8010601@canonical.com>
2013-12-18 13:28 ` Ian Campbell
[not found] ` <1387373284.28680.18.camel@kazak.uk.xensource.com>
2013-12-18 13:57 ` Stefan Bader
2013-12-18 14:59 ` Stefan Bader
[not found] ` <52B1B842.4090306@canonical.com>
2013-12-19 0:44 ` Jim Fehlig
2013-12-19 10:19 ` Ian Campbell
[not found] ` <1387448340.9925.30.camel@kazak.uk.xensource.com>
2013-12-19 17:06 ` Stefan Bader
[not found] ` <52B3278D.3000607@canonical.com>
2013-12-19 17:57 ` Ian Campbell
2013-12-19 18:39 ` Jim Fehlig
[not found] ` <52B33D6C.6010608@suse.com>
2013-12-20 10:11 ` Ian Campbell
[not found] ` <1387534262.17289.34.camel@kazak.uk.xensource.com>
2013-12-20 10:29 ` Stefan Bader
2013-12-20 10:36 ` Ian Campbell
2013-12-20 11:04 ` Stefan Bader
2013-12-20 11:22 ` Ian Campbell
2014-01-06 21:31 ` Jim Fehlig
2013-12-24 6:22 ` Jim Fehlig
[not found] ` <52B92832.1030705@suse.com>
2014-01-06 21:26 ` Jim Fehlig
[not found] ` <1387475839.17289.20.camel@kazak.uk.xensource.com>
2013-12-20 10:16 ` Stefan Bader
[not found] ` <52B41906.7010506@canonical.com>
2013-12-20 10:37 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B07D09.5060008@canonical.com \
--to=stefan.bader@canonical.com \
--cc=Xen-devel@lists.xen.org \
--cc=ian.campbell@citrix.com \
--cc=jfehlig@suse.com \
--cc=libvir-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.