[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] setting up dnsmasq options for PXE boot



Hello,

I want to use PXE boot in kvm's virtual machines, but I've not found, how to 
configure libvirt for starting dhcp server with correct options for this.

Now i have libvirt-0.5.1-2.fc10.x86_64 and virt-manager-0.6.0-5.fc10.x86_64,
I've created VM using virt manager, with specifying PXE boot option. VM config 
contains following sections:
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='network'/>
  </os>
.....
    <interface type='network'>
      <mac address='54:52:00:0a:f6:00'/>
      <source network='nat_net'/>
      <model type='virtio'/>
    </interface>

and config for virtual network nat_net:
<network>
  <name>nat_net</name>
  <uuid>e02cfc6f-d7f8-6f81-8c19-bfa9d2a13a85</uuid>
  <forward dev='eth0' mode='nat'/>
  <bridge stp='on' forwardDelay='0' />
  <ip address='192.168.107.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.107.128' end='192.168.107.254' />
    </dhcp>
  </ip>
</network>

dnsmasq starts with following command line:
/usr/sbin/dnsmasq --keep-in-foreground --strict-order --bind-interfaces--pid-
file  --conf-file  --listen-address 192.168.107.1 --except-interface lo --dhcp-
leasefile=/var/lib/libvirt/dhcp-nat_net.leases --dhcp-range 
192.168.107.128,192.168.107.254

But for working PXE boot it should have also something like
--dhcp-boot=pxelinux.0,itchy,192.168.107.1

So after starting VM it tries to boot from network, gets DHCP response and 
reports, that it doesn't contains filename option.

So the question is - how to get it working correctly ? (If i start dnsmasq by 
hand with option --dhcp-boot=pxelinux.0,itchy,192.168.107.1 PXE boot works)

--
Dmitry Guryanov


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]