0

From my understanding of PXE (Preboot Execution Environment), I know that there must be some negotiation first between the booting client and a DHCP server to obtain network parameters (IP address, etc) in order for the client to be able to fetch the boot loader and kernel image from the boot server. In other words, and aside from being a "virtual" machine, we're talking here about a "bare metal" machine, so there must be some "pre boot" mechanism for those negotiations to take place, and this is exactly what PXE is all about. When I think about the "Network install" option, I can't figure out how the new VM would be able to fetch the boot images (bootloader and kernel) without the previously mentioned mechanism.

So, here is a short version of the question: When provisioning a new virtul machine, how do you expect the "Network install" option in virt-manager to work behind the scenes?

Many thanks.

Marwan Tanager
  • 217
  • 2
  • 5

1 Answers1

2

Virt-manager (and virt-install) is just a front end for running QEMU (qemu-kvm in this case). When called with a PXE install, it works just like a physical server doing a PXE boot. That is, it runs QEMU as a virtual machine with a network-capable BIOS, with a built in IP stack. Now when run as a Network install (non-PXE), virt-install first fetches a kernel image and initial ramdisk image (that is, it hapens outside of the VM). It then calls qemu-kvm with the "-kernel" and "-initrd" parameters, pointing to the location in the parent host's file system where it downloaded those images. When qemu-kvm starts, it pokes the contents of those two files into the same memory locations that Grub, Lilo, or Syslinux would normally put them, and tells the virtualized BIOS (in the VM) to start executing at those memory locations.

You can see how qemu-kvm is called by doing a "ps -ef" listing while running an install, and you can use that same command line outside of virt-manager if you wish.

Derek Pressnall
  • 643
  • 4
  • 8