Bug 611793
Summary: | Static only DHCP not supported in network configs. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Daniel Berrangé <berrange> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.0 | CC: | berrange, ccui, dallan, dyuan, eblake, jdenemar, llim, neil, virt-maint, xen-maint, xhu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.8.7-1.el6 | Doc Type: | Bug Fix |
Doc Text: |
If the configuration for a virtual network only contained static address definitions, dnsmasq (the DHCP server used by libvirt) was started incorrectly and would not respond to any DHCP requests. Any guests with MAC address/IP address pairs listed in static address definitions were then unable to acquire their IP addresses. libvirt now starts up dnsmasq with the correct options so that these statically configured addresses are properly served to the guests.
|
Story Points: | --- |
Clone Of: | 597363 | Environment: | |
Last Closed: | 2011-05-19 13:19:26 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: |
Description
Daniel Berrangé
2010-07-06 14:43:51 UTC
This functionality was added in the following upstream commit: commit df990b445bd85bbd59296acbcaeb9d81543466c8 Author: Jiri Denemark <jdenemar> Date: Thu Sep 9 16:00:08 2010 +0200 bridge: Fix static-only DHCP configuration For static-only DHCP, i.e. with no <range> but at least one <host> element within <dhcp> element, we have to add "--dhcp-range IP,static" option to dnsmasq to actually enable the service. Without this option, dnsmasq will not respond to DHCP requests. and included in upstream libvirt-0.8.4. It will therefore be in the next RHEL6 rebase of libvirt. Built into libvirt-0.8.7-1.el6 Verified it on RHEL6_x86_64 Server with the following component and it passed: libvirt-0.8.7-1.el6 qemu-kvm-0.12.1.2-2.128.el6 kernel-2.6.32-94.el6 The steps are as follows: 1 define and start the routed network by using the following xml: # cat statictest.xml <network> <name>statictest</name> <forward mode='nat'/> <bridge name='s1' stp='on' delay='0' /> <ip address='192.168.100.1' netmask='255.255.255.0'> <dhcp> <host mac='00:16:36:7b:4a:21' name='new-host1' ip='192.168.100.33' /> </dhcp> </ip> </network> # virsh net-define statictest.xml Network statictest defined from statictest.xml # virsh net-start statictest Network statictest started 2 Check dnsmasq process option: # ps -ef|grep dnsmasq|grep statictest nobody 29523 1 0 11:08 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/statictest.pid --conf-file= --listen-address 192.168.100.1 --except-interface lo --dhcp-range 192.168.100.1,static --dhcp-no-override --dhcp-hostsfile=/var/lib/libvirt/dnsmasq/statictest.hostsfile 3 define and start guest using statictest network: # virsh dumpxml rhel6 ... <interface type='network'> <mac address='52:54:00:8c:c7:f6'/> <source network='statictest'/> <target dev='vnet0'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ... 4 the guest get IP: 192.168.100.33 hostname: new-host1 Rechecked it on the following test environment according to comment 3. It is passed. Test environment: libvirt-0.8.7-5.el6 qemu-kvm-0.12.1.2-2.144.el6 kernel-2.6.32-94.el6 Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In previous versions of libvirt, if the configuration for a virtual network only contained static address definitions (ie no dynamic address range), dnsmasq (the dhcp server used by libvirt) was started incorrectly, and would not respond to any DHCP requests. This resulted in the guests with MAC address/IP address pairs listed in the static address definitions being unable to acquire their IP addresses. libvirt now starts up dnsmasq with the correct options so that these statically configured addresses are properly served to the guests. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1 @@ -In previous versions of libvirt, if the configuration for a virtual network only contained static address definitions (ie no dynamic address range), dnsmasq (the dhcp server used by libvirt) was started incorrectly, and would not respond to any DHCP requests. This resulted in the guests with MAC address/IP address pairs listed in the static address definitions being unable to acquire their IP addresses. +If the configuration for a virtual network only contained static address definitions, dnsmasq (the DHCP server used by libvirt) was started incorrectly and would not respond to any DHCP requests. Any guests with MAC address/IP address pairs listed in static address definitions were then unable to acquire their IP addresses. libvirt now starts up dnsmasq with the correct options so that these statically configured addresses are properly served to the guests.- -libvirt now starts up dnsmasq with the correct options so that these statically configured addresses are properly served to the guests. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html |