[edit] add script to use libvirt dnsmasq's dns
This commit is contained in:
parent
2cfb26dfc8
commit
4aadfb8b76
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user