1
1

[edit] add script to use libvirt dnsmasq's dns

This commit is contained in:
Maxime Alves LIRMM@home 2021-09-13 22:55:42 +02:00
parent 2cfb26dfc8
commit 4aadfb8b76

View File

@ -2,7 +2,7 @@ new virtual machine
###################
:date: 2019-11-10 00:00
:modified: 2019-11-10 00:00
:modified: 2021-09-13 00:00
:tags: infra
:category: documentation
:slug: create_vm
@ -383,6 +383,19 @@ DHCP static leases should now execute the following script.
"<host mac='${MAC}' \
name='${NAME}' ip='${IP}' />" \
--live --config
# if you wish to use dnsmasq's dns service, execute also the following
virsh net-update default add dns-host \
"<host ip='${3}'> \
<hostname>${1}</hostname> \
</host>" \
--live --config
# you may have to reload the iptables rules if libvirt messes with them
# and if you don't want to restart the machine
cat /etc/network/iptables|iptables-restore
You can now re-start the machine.