iPXE does not try nic1 - Printable Version +- iPXE discussion forum (https://forum.ipxe.org) +-- Forum: iPXE user forums (/forumdisplay.php?fid=1) +--- Forum: General (/forumdisplay.php?fid=2) +--- Thread: iPXE does not try nic1 (/showthread.php?tid=19564) |
iPXE does not try nic1 - devjr - 2019-09-16 13:48 Hello, I'm trying to boot a KVM virtual machine (virtio interfaces) with iPXE. The VM has two virtual NICs, and I need the PXE to be done on the second one. Looking at the console, it only tries the first interface (net0), then says No configuration methods succeeded. If I enter the iPXE console, dhcp net1 works, and the boot is OK. Is there any way to make iPXE automatically try the second interface as well ? Best regards RE: iPXE does not try nic1 - NiKiZe - 2019-09-18 01:48 By default iPXE does call the autoboot command, which as you can see should try all nics until it fails. Do try to enter the shell and do ifstat followed by autoboot and see what you get. You might also want to try this in an embeded script - maybe there is something going on that makes net1 unavailable for a few seconds. On that page you also have suggestions to retry infinity RE: iPXE does not try nic1 - devjr - 2019-09-18 09:50 ifstat shows both interfaces, and then autoboot works. So it seems that the infinite retry could solve my problem. But how can I embed a script on a KVM host ? I have no clue about how to do that, and I didn't find any help searching the Internet. RE: iPXE does not try nic1 - NiKiZe - 2019-09-18 13:42 search for "qemu nic rom" You might also want to grab you iPXE version, and check which git commit that is, maybe an upgrade of the original iPXE nic roms would just simply solve your issues. RE: iPXE does not try nic1 - devjr - 2019-09-19 15:31 I downloaded current iPXE, and then built it : git clone http://git.ipxe.org/ipxe.git make bin/virtio-net.rom Then I copied the binary file into the iPXE dir : cp ~/ipxe/src/bin/virtio-net.rom /usr/lib/ipxe/qemu/pxe-virtio-new.rom And told libvirt to use this file putting this XML code im my VM definition : <rom file='/usr/lib/ipxe/qemu/pxe-virtio-new.rom'/> The corresponding qemu command line is : /usr/bin/qemu-system-x86_64 -name guest=testipxe,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-8-testipxe/master-key.aes -machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off -cpu Skylake-Client-IBRS,ss=on,hypervisor=on,tsc_adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid eb3195b2-aa36-4d4c-a728-2ee2579bf1f0 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=26,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/testipxe.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:4b:53:74,bus=pci.0,addr=0x3,romfile=/usr/lib/ipxe/qemu/pxe-virtio-new.rom,bootindex=2 -netdev tap,fd=30,id=hostnet1,vhost=on,vhostfd=31 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:001:b1:b4,bus=pci.0,addr=0x4,romfile=/usr/lib/ipxe/qemu/pxe-virtio-new.rom -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on Now the VNC console doesn't even show the iPXE boot... I tried to delete all PXE files in /usr/lib/ipxe/qemu/ dir to see which was used by default, it seems that this is efi-virtio.rom. That was a surprise, since on boot the VM show Seabios and not UEFI. So I tried to manually specify <rom file='/usr/lib/ipxe/qemu/efi-virtio.rom'/> : it also prevents iPXE from launching. It seems that I'm not skilled enough with libvirt to make this work. Anyway, this is not iPXE's fault. I'll try to figure this out. Many thanks for your help ! |