Bug 623951 - Add --dhcp-no-override option when starting dnsmasq
Add --dhcp-no-override option when starting dnsmasq
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
urgent Severity medium
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
:
Depends On:
Blocks: 630627
  Show dependency treegraph
 
Reported: 2010-08-13 05:15 EDT by Jiri Denemark
Modified: 2013-01-09 18:00 EST (History)
20 users (show)

See Also:
Fixed In Version: libvirt-0.8.1-25.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 594682
: 630627 (view as bug list)
Environment:
Last Closed: 2010-11-10 16:05:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jiri Denemark 2010-08-13 05:15:03 EDT
+++ This bug was initially created as a clone of Bug #594682 +++

Description of problem:
When booting from PXE via a TFTP server in a virtual network.

<network>
  <name>newpxe2</name>
  <forward mode='nat'/>
  <ip address="192.168.123.1" netmask="255.255.255.0">
    <tftp root="/var/lib/tftpboot" />
    <dhcp>
      <range start="192.168.123.2" end="192.168.123.254" />
      <bootp file="pxelinux.0" />
    </dhcp>
  </ip>
</network>

# ls -l /var/lib/tftpboot/
total 28848
-rw-r--r--. 1 root root 29515304 May 21 23:47 initrd.img
-rw-r--r--. 1 root root    16794 May 22 04:20 pxelinux.0
drwxr-xr-x. 2 root root     4096 May 22 06:50 pxelinux.cfg
-rw-r--r--. 1 root root        0 May 22 06:57 vmlinuz

# cat /var/lib/tftpboot/pxelinux.cfg/default 
default linux
label linux
kernel vmlinuz
append initrd=initrd.img

The guest could get an IP address, and it said,

No filename or root path specified
No more network devices


The original bug was postponed to 6.1 since there is a known workaround of adding --dhcp-no-override option to dnsmasq. Hence we need to teach libvirt to use that option.

The fix is already upstream as http://libvirt.org/git/?p=libvirt.git;a=commit;h=e26672f78661272274580e0653b21017c7c31d4e and it also requires http://libvirt.org/git/?p=libvirt.git;a=commit;h=6f42d3253a05fc6c4d94d8d389019f956158c753
Comment 2 Daniel Veillard 2010-08-15 12:43:53 EDT
libvirt-0.8.1-25.el6 has been built in RHEL-6-candidate with the fixes,

Daniel
Comment 3 Johnny Liu 2010-08-18 00:37:43 EDT
Verify this bug with libvirt-0.8.1-25.el6.x86_64, and PASSED.

1. Create a new virtual network with the following xml:

<network>
  <name>netboot</name>
  <bridge name="virbr1" stp='off' delay='1'/>
  <forward/>
  <ip address="192.168.10.1" netmask="255.255.255.0">
    <tftp root="/var/lib/tftpboot" />
    <dhcp>
      <range start="192.168.10.2" end="192.168.10.254" />
      <bootp file="pxelinux.0" />
    </dhcp>
  </ip>
</network>

2. Define and start network
# virsh net-define network.xml
# virsh net-start netboot

3. Check dnsmasq process.
# ps -ef | grep dns |grep netboot
nobody   18370     1  0 19:03 ?        00:00:00 /usr/sbin/dnsmasq
--strict-order --bind-interfaces
--pid-file=/var/run/libvirt/network/netboot.pid --conf-file=  --listen-address
192.168.10.1 --except-interface lo --dhcp-range 192.168.10.2,192.168.10.254
--dhcp-lease-max=253 --dhcp-no-override --enable-tftp --tftp-root
/var/lib/tftpboot --dhcp-boot pxelinux.0

"--dhcp-no-override" is seen here, so this bug is fixed.
Comment 4 xhu 2010-09-06 22:08:46 EDT
Verified this bug with RHEL6 RC build and it passed:
libvirt-0.8.1-27.el6.x86_64
qemu-kvm-0.12.1.2-2.113.el6.x86_64
kernel-2.6.32-70.el6.x86_64
Comment 5 releng-rhel@redhat.com 2010-11-10 16:05:38 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.