vi /etc/nova/nova.conf
在[DEFAULT]添加
dnsmasq_config_file=/etc/dnsmasq-nova.conf
dns_server=8.8.8.8
vi /etc/dnsmasq-nova.conf
添加
addn-hosts=/etc/dnsmasq/hosts
mkdir /etc/dnsmasq
vi /etc/dnsmasq/hosts
添加
192.168.0.240 download.test.org
找到dnsmasq和nova-network的进程,并kill掉它们
然后再启动nova-network
/usr/bin/python /usr/bin/nova-network --config-file /etc/nova/nova.conf &
这时候在云主机里ping download.test.org,就指向192.168.0.240
转载请注明:exchen's blog » Openstack dnsmasq配置域名解析