diff options
author | Laine Stump <laine@laine.org> | 2016-08-11 17:29:43 -0400 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2016-08-19 21:10:34 -0400 |
commit | 9065cfaa889b3512ad02560fbefb05c75349b10b (patch) | |
tree | 24f317e7ea5d11fe382c00687882c7ff3a65a755 /tests/networkxml2xmlout | |
parent | 25e8112d7c32ab271b9cae28f3ccbf5835206693 (diff) | |
download | libvirt-9065cfaa889b3512ad02560fbefb05c75349b10b.tar.gz |
network: allow disabling dnsmasq's DNS server
If you define a libvirt virtual network with one or more IP addresses,
it starts up an instance of dnsmasq. It's always been possible to
avoid dnsmasq's dhcp server (simply don't include a <dhcp> element),
but until now it wasn't possible to avoid having the DNS server
listening; even if the network has no <dns> element, it is started
using default settings.
This patch adds a new attribute to <dns>: enable='yes|no'. For
backward compatibility, it defaults to 'yes', but if you don't want a
DNS server created for the network, you can simply add:
<dns enable='no'/>
to the network configuration, and next time the network is started
there will be no dns server created (if there is dhcp configuration,
dnsmasq will be started with "port=0" which disables the DNS server;
if there is no dhcp configuration, dnsmasq won't be started at all).
Diffstat (limited to 'tests/networkxml2xmlout')
-rw-r--r-- | tests/networkxml2xmlout/routed-network-no-dns.xml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/networkxml2xmlout/routed-network-no-dns.xml b/tests/networkxml2xmlout/routed-network-no-dns.xml new file mode 100644 index 0000000000..f68ce8a941 --- /dev/null +++ b/tests/networkxml2xmlout/routed-network-no-dns.xml @@ -0,0 +1,12 @@ +<network> + <name>local</name> + <uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid> + <forward dev='eth1' mode='route'> + <interface dev='eth1'/> + </forward> + <bridge name='virbr1' stp='on' delay='0'/> + <mac address='12:34:56:78:9a:bc'/> + <dns enable='no'/> + <ip address='192.168.122.1' netmask='255.255.255.0'> + </ip> +</network> |