Bug 623951

Summary: Add --dhcp-no-override option when starting dnsmasq
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.0CC: akong, amit.shah, chyang, ddumas, eblake, gren, jdenemar, jialiu, kcao, llim, mkenneth, mst, qcai, quintela, syeghiay, tburke, veillard, virt-maint, xen-maint, xhu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 21:05:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 630627    

Description Jiri Denemark 2010-08-13 09:15:03 UTC
+++ 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 16:43:53 UTC
libvirt-0.8.1-25.el6 has been built in RHEL-6-candidate with the fixes,

Daniel

Comment 3 Johnny Liu 2010-08-18 04:37:43 UTC
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-07 02:08:46 UTC
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 21:05:38 UTC
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.