CLOUDSTACK-3357: Add domain and local parameter for VPC dnsmasq.conf

Fix DNS failure for internal guest vms.
This commit is contained in:
Sheng Yang 2013-07-29 18:22:32 -07:00
parent 16c3d21eec
commit 9278b2c343
1 changed files with 6 additions and 0 deletions

View File

@ -991,6 +991,12 @@ EOF
cp /etc/cloud-nic.rules /etc/udev/rules.d/cloud-nic.rules
echo "" > /etc/dnsmasq.d/dhcphosts.txt
echo "dhcp-hostsfile=/etc/dhcphosts.txt" > /etc/dnsmasq.d/cloud.conf
[ -z $DOMAIN ] && DOMAIN="cloudnine.internal"
#DNS server will append $DOMAIN to local queries
sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf
#answer all local domain queries
sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf
}