mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-09 12:38:27 -05:00
Network: Add support for DNS hosts definition to the network XML
This commit introduces names definition for the DNS hosts file using
the following syntax:
<dns>
<host ip="192.168.1.1">
<name>alias1</name>
<name>alias2</name>
</host>
</dns>
Some of the improvements and fixes were done by Laine Stump so
I'm putting him into the SOB clause again ;-)
Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Laine Stump <laine@laine.org>
This commit is contained in:
committed by
Laine Stump
parent
91b7924eee
commit
9d4e2845d4
@@ -0,0 +1 @@
|
||||
/usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --except-interface lo --listen-address 192.168.122.1 --addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
|
||||
@@ -0,0 +1,14 @@
|
||||
<network>
|
||||
<name>default</name>
|
||||
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
|
||||
<forward dev='eth0' mode='nat'/>
|
||||
<bridge name='virbr0' stp='on' delay='0' />
|
||||
<dns>
|
||||
<host ip='192.168.122.1'>
|
||||
<hostname>host</hostname>
|
||||
<hostname>gateway</hostname>
|
||||
</host>
|
||||
</dns>
|
||||
<ip address='192.168.122.1' netmask='255.255.255.0'>
|
||||
</ip>
|
||||
</network>
|
||||
@@ -101,6 +101,7 @@ mymain(void)
|
||||
DO_TEST("netboot-network");
|
||||
DO_TEST("netboot-proxy-network");
|
||||
DO_TEST("nat-network-dns-txt-record");
|
||||
DO_TEST("nat-network-dns-hosts");
|
||||
|
||||
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<network>
|
||||
<name>default</name>
|
||||
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
|
||||
<forward dev='eth0' mode='nat'/>
|
||||
<bridge name='virbr0' stp='on' delay='0' />
|
||||
<dns>
|
||||
<host ip='192.168.122.1'>
|
||||
<hostname>host</hostname>
|
||||
<hostname>gateway</hostname>
|
||||
</host>
|
||||
</dns>
|
||||
<ip address='192.168.122.1' netmask='255.255.255.0'>
|
||||
</ip>
|
||||
</network>
|
||||
@@ -0,0 +1,14 @@
|
||||
<network>
|
||||
<name>default</name>
|
||||
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
|
||||
<forward dev='eth0' mode='nat'/>
|
||||
<bridge name='virbr0' stp='on' delay='0' />
|
||||
<dns>
|
||||
<host ip='192.168.122.1'>
|
||||
<hostname>host</hostname>
|
||||
<hostname>gateway</hostname>
|
||||
</host>
|
||||
</dns>
|
||||
<ip address='192.168.122.1' netmask='255.255.255.0'>
|
||||
</ip>
|
||||
</network>
|
||||
@@ -87,6 +87,7 @@ mymain(void)
|
||||
DO_TEST("netboot-network");
|
||||
DO_TEST("netboot-proxy-network");
|
||||
DO_TEST("nat-network-dns-txt-record");
|
||||
DO_TEST("nat-network-dns-hosts");
|
||||
|
||||
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user