1

Any suggestions on setting a vSwitch to allow a kvm guest to pxe install from an external boot server?

I'm trying to configure a vSwitch, in Fedora 20, so that I would be able to do a net-install, of a VM guest, from an external kickstart server.

Any suggestions on where I can find background/concept information on how the bridging network works?

Thanks

Henrik

0

If you're using libvirt, you can't do this in the virt-manager GUI, you have to edit the network XML directly, e.g. with virsh net-edit <networkname>

You need to add a <tftp> element to set up a TFTP server (if you don't already have one), and add a <bootp> element inside the <dhcp> element of the configuration to tell clients about it.

For example, to run a TFTP server on your host at 192.168.122.1, with files served from /tftpboot, and provide it to clients with a boot filename of /pxelinux.0 you would change:

  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.128' end='192.168.122.254'/>
    </dhcp>
  </ip>

to:

  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <tftp root='/tftpboot'/>
    <dhcp>
      <range start='192.168.122.128' end='192.168.122.254'/>
      <bootp file="/pxelinux.0" server="192.168.122.1"/>
    </dhcp>
  </ip>

Make sure that you have placed the proper file in /tftpboot/pxelinux.0.

(Note that /tftpboot is the default TFTP server directory; you can change it, but you will have to adjust your SELinux file contexts for your chosen directory if you do.)

  • Thank you for the information. Do you have an idea of how I can define the network/xml so that I can also get the bootp handled by the external kickstart server?. It is libvirt, and I am trying to do it through the XML configuration. I was aiming at being able to completely booting and installing from an external Kickstart server that I already have running. I would like to avoid having the TFTP server on each KVM host, so that all boot OS decisions could be taken on the net-install server. – Henk Aug 19 '14 at 4:28
  • Just point it at the right server, then. You don't have to have libvirt run a TFTP server. – Michael Hampton Aug 19 '14 at 12:10
0

PXE booting VMs works perfectly well over bridged networks, just make sure your version of qemu comes with gPXE or iPXE, the old etherboot has some problems with certain DHCP servers (especially MS based DHCP).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.