Bug 702726

Summary: Missing DNS configuration with NAT networking in libvirt
Product: Red Hat Enterprise Linux 6 Reporter: Alexander Todorov <atodorov>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: dallan, rvykydal, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 702112 Environment:
Last Closed: 2011-05-10 17:42:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 705163    
Attachments:
Description Flags
tarball with logs from stage2 of install with wrong DNS config none

Description Alexander Todorov 2011-05-06 18:37:10 UTC
+++ This bug was initially created as a clone of Bug #702112 +++

Description of problem:
I'm using NAT networking for my virtual guests (KVM). In the XML file I have defined the example.com domain and a host which will be assigned static IP address and predefined hostname. The config looks like this:

<network>
  <name>default</name>
  <uuid>432d8cf4-16a3-4ff1-af5d-02f115fbc516</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <domain name='example.com'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.200' end='192.168.122.254' />
      <host mac='52:54:00:bf:ae:e2' name='tester1.example.com' ip='192.168.122.12' />
      <bootp file='pxelinux.0' server='192.168.122.11' />
    </dhcp>
  </ip>
</network>


When I create new guest and run the anaconda installer by default it uses DHCP. The result is that IP address is assigned correctly but DNS is not. 

Version-Release number of selected component (if applicable):
anaconda in RHEL 6.0 GA
libvirt-0.8.1-27.el6_0.5.x86_64
dnsmasq-2.48-4.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Cofigure NAT networking using the domain and host tags
2. Assign FQDN for your guest system
3. Install the guest using anaconda with all the default options. Specify the correct MAC address for the network interface.

  
Actual results:
During stage2 IP address is assigned but /etc/resolv.conf looks like:
search example.com

no trace of nameserver configuration. All DNS requests fail. 

Expected results:
DNS is working.

Additional info:
This happens when I boot the guest using PXE (the guest is part of local beaker lab setup)

If I select to provision RHEL 5.6 from beaker on the same host then /etc/resolv.conf looks like:

search example.com
nameserver 192.168.122.1


In the same environment if I create a new guest with RHEL 6 with a different MAC address it will get a dynamic IP and resolv.conf in stage2 looks like:

domain example.com
search example.com
nameserver 192.168.122.1

Comment 1 Alexander Todorov 2011-05-06 18:48:43 UTC
(In reply to comment #0)
> In the same environment if I create a new guest with RHEL 6 with a different
> MAC address it will get a dynamic IP and resolv.conf in stage2 looks like:
> 
> domain example.com
> search example.com
> nameserver 192.168.122.1

This is when the guest is created manually using virt-manager and http install source, not PXE boot.

Comment 2 Alexander Todorov 2011-05-06 19:06:58 UTC
Created attachment 497431 [details]
tarball with logs from stage2 of install with wrong DNS config

Comment 3 Radek Vykydal 2011-05-09 08:34:26 UTC
Can you please retest with current RHEL 6.1 (I think e.g. Snap 5 should be ok)? /etc/resolv.conf is now managed entirely by NM in anaconda (see bug #687953).

Comment 4 Alexander Todorov 2011-05-10 17:42:30 UTC
Works for me with RC 4 and it looks like a dup of #687953.

*** This bug has been marked as a duplicate of bug 687953 ***