Hello,<div>Thank you for your reply. </div><div>I tried to put 2 different drivers on the 2 NIC and the PXE boot is properly initiated on the good device.</div><div>The trouble is that I really need to use virtio driver on the 2 NIC. I can't specify my PCI order neither want to forge a special gPXE rom with an embedded script because </div>
<div>my "PXE NIC number" can change dynamically.</div><div>Is there any way to make gPXE aware of which NIC should attempt PXE boot not always the first PCI NIC ?</div><div><br></div><div>Thanks in advance</div>
<div><br><div class="gmail_quote">2011/9/29 Andrew Bobulsky <span dir="ltr"><<a href="mailto:rulerof@gmail.com">rulerof@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF"><div>Hello Romain,</div><div><br></div><div>It's very likely that your VM is behaving correctly, and loading the option ROM from the second NIC. What's happening here is that the BIOS of your VM is passing control over to gPXE, loaded from the [correct] NIC ROM, but gPXE isn't aware of which NIC it was loaded from. As a result, it enumerates the available devices, and then tries to boot from them in the order that they're discovered. </div>
<div><br></div><div>Chances are good that your easiest fix in this scenario would be to change the PCI device order such that your desired NIC is enumerated first, if KVM will let you do that. Otherwise, a small embedded script that specifically boots "net1" (instead of "net0," as it is now) and the filename or root path given to that NIC by DHCP will do the job for you. </div>
<div><br></div><div>Best Regards,</div><div>Andrew Bobulsky<div><div></div><div class="h5"><br><br>On Sep 29, 2011, at 5:34 AM, Romain Vrignaud <<a href="mailto:romain@yakaz.com" target="_blank">romain@yakaz.com</a>> wrote:<br>
<br></div></div></div><div><div></div><div class="h5"><div></div><blockquote type="cite">
<div><span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">Hello everybody.<div><br></div><div>I'm actualy experiencing some problem for ordering my VM boot with qemu-kvm / Seabios and gPXE.</div>
<div>I use libvirt's per-device boot option which launch my VM with this options : </div><div><br></div><div>You can find libvirt's xml there : <a style="color:rgb(0, 0, 204)" href="http://pastebin.com/bqizkLiZ" target="_blank"></a><a href="http://pastebin.com/bqizkLiZ" target="_blank">http://pastebin.com/bqizkLiZ</a></div>
<div>--</div><div><div>/usr/bin/kvm -S -M pc-0.14 -enable-kvm -m 2048 -smp 1,maxcpus=3,sockets=3,cores=1,threads=1 -name vm-name</div><div>-uuid 32b5bf0d-fe46-2edb-b0d9-c134ba8a7636</div><div>-nodefconfig</div><div>-nodefaults</div>
<div>-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm-name.monitor,server,nowait</div><div>-mon chardev=charmonitor,id=monitor,mode=control</div><div>-rtc base=utc -drive file=/var/lib/libvirt/images/ploop2.img,if=none,id=drive-virtio-disk0,format=raw</div>
<div>-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0</div><div>-drive file=/var/lib/libvirt/images/vm-name.img,if=none,id=drive-virtio-disk1,format=raw</div><div>-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk1,id=virtio-disk1</div>
<div>-netdev tap,fd=23,id=hostnet0</div><div>-device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:28:ca:e5,bus=pci.0,addr=0x3,bootindex=2</div><div>-netdev tap,fd=24,id=hostnet1</div><div>-device rtl8139,netdev=hostnet1,id=net1,mac=52:54:00:28:ca:e6,bus=pci.0,addr=0x4,bootindex=1</div>
<div>-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0</div><div>-usb -vnc <a style="color:rgb(0, 0, 204)" href="http://127.0.0.1:1/" target="_blank">127.0.0.1:1</a></div><div>-k en-us -vga cirrus</div>
<div>-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7</div></div><div><br></div><div>--</div><div><br></div><div>We see the right bootindex option as I want to boot on gPXE from my second NIC (mac=52:54:00:28:ca:e6).</div>
<div>The problem is that during my VM boot process, seabios initialise gPXE for my 2 NIC. </div><div>But then gPXE try to boot (DHCP request) on the first NIC rather than on the second one. </div><div><br></div><div>It always try to boot first on the first PCI device (00:03.0 instead of 00:04.0).</div>
<div><br></div><div>I don't really know if the problem comes from gPXE or Seabios but I have exactly the same problem when I try with Ubuntu's etherboot rom.</div><div><br></div><div><br>I got this problem with Ubuntu latest qemu-kvm (0.14.1+noroms-0ubuntu3.11.04.1) / seabios (0.6.2-0ubuntu1) and etherboot (5.4.4-7ubuntu2) and Fedora qemu-kvm (qemu-kvm-0.15.0-4.fc15.x86_64) / Seabios (seabios-bin-0.6.2-2.fc15.noarch) and gPXE (gpxe-roms-qemu-1.0.1-4.fc15.noarch).</div>
<div><br></div><div>I also recompiled latest Seabios (pre-0.6.3-20110929) trunk and gPXE (1.0.1+) from Git : the behaviour is exactly the same. I tried with different NIC driver (virtio and rtl8139) with also same behavior.</div>
<div><br></div><div>Do you have any idea where my problem can come from ?</div><div><br></div><div>Thanks in advance for any advice.</div><div><br></div><div>Regards,</div><div><br></div><font color="#888888"><div>Romain Vrignaud</div>
</font></span>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>gPXE mailing list</span><br><span><a href="mailto:gPXE@etherboot.org" target="_blank">gPXE@etherboot.org</a></span><br>
<span><a href="http://etherboot.org/mailman/listinfo/gpxe" target="_blank">http://etherboot.org/mailman/listinfo/gpxe</a></span><br></div></blockquote></div>
</blockquote></div><br></div>