mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3357: Add domain and local parameter for VPC dnsmasq.conf
Fix DNS failure for internal guest vms.
This commit is contained in:
parent
16c3d21eec
commit
9278b2c343
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue