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
--- 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) {
-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to