From: Matthias Pfafferodt Subject: kvm pxe boot Date: Sat, 22 Mar 2008 11:44:33 +0100 Message-ID: <200803221144.33862.matthias.pfafferodt@mapfa.de> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_RMO5H5OwWhKLlX8" To: kvm-devel@lists.sourceforge.net Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org --Boundary-00=_RMO5H5OwWhKLlX8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I'm using libvirt 0.4.1 and kvm version 63. I try to boot using pxe. I noticed that qemu uses the ne2k_pci network card as default while kvm has a rtl8139 card. And here I start to get strange results: With qemu I can use the default network card [1] or the rtl8139 card [2] to boot from the network. [1] /usr/bin/qemu -m 1024 -boot n \ -net nic,macaddr=00:16:3e:26:fc:ac \ -net tap,script=./qemu-ifup [2] /usr/bin/qemu -m 1024 -boot n \ -net nic,macaddr=00:16:3e:26:fc:ac,model=rtl8139 \ -net tap,script=./qemu-ifup With kvm I have to specify the model to boot from the network. So [3] is working while [4] only loops trying to find the dhcp server. In both cases the same network card seems to be used (rtl8139). [3] /usr/bin/qemu-kvm -m 1024 -boot n \ -net nic,macaddr=00:16:3e:26:fc:ac,model=rtl8139 \ -net tap,script=./qemu-ifup [4] /usr/bin/qemu-kvm -m 1024 -boot n \ -net nic,macaddr=00:16:3e:26:fc:ac \ -net tap,script=./qemu-ifup All network cards are working fine with kvm if set in the command line but the default setup is unable to boot using pxe. I want to use kvm with libvirt and there I have to use the default setup (it is not possible to set the model). I changed the default card to a ne2k_pci and pxe boot is now also working without setting the model in the command line. A patch is attached (against kvm-63). Matthias Pfafferodt --Boundary-00=_RMO5H5OwWhKLlX8 Content-Type: text/x-diff; charset="us-ascii"; name="kvm-network_card.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kvm-network_card.patch" --- qemu.orig/vl.c +++ qemu/vl.c @@ -9495,7 +9495,7 @@ char buf[1024]; if (net_boot & (1 << i)) { if (model == NULL) - model = "rtl8139"; + model = "ne2k_pci"; snprintf(buf, sizeof(buf), "%s/pxe-%s.bin", bios_dir, model); if (get_image_size(buf) > 0) { if (nb_option_roms >= MAX_OPTION_ROMS) { --Boundary-00=_RMO5H5OwWhKLlX8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --Boundary-00=_RMO5H5OwWhKLlX8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel --Boundary-00=_RMO5H5OwWhKLlX8--