Re: libvirt and systemd-resolved integration?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





El mié., 7 oct. 2020 a las 10:35, Petr Menšík (<pemensik@xxxxxxxxxx>) escribió:


On 10/7/20 6:44 AM, Pavel Zhukov wrote:
>
> I don't think it's a good idea.
> dnsmasq is not dns resolver but acts as DHCP and DNS server. It provides
> VMs with IP
> address/lease and create corresponding dns record for it. In case of
> resolved ip addresses and dns records must be managed either manually
> or... with dnsmasq.

That is not true. Any query sent to @192.168.122.1 would get reply. I
use for example unbound on localhost and all my machines use .vm. domain
suffix. rhel7.vm. is machine with rhel7. Dnsmasq manages automatically
lease names of all its dhcp clients, it works as dynamic DNS connected
with DHCP just out of the box.

I've created a libvirt hook to do the integration I was looking for. This works for me:

/etc/libvirt/hooks/network.d/laptop-lab.sh

#!/bin/bash
set -o nounset

object="$1"
operation="$2"
suboperation="$3"
extra="$4"

if [ "$object" == "laptop-lab" ]; then
    if [ "$operation" == "started" ] && [ "$suboperation" == "begin" ]; then
        /usr/bin/resolvectl dns laptop-lab 192.168.100.1
        /usr/bin/resolvectl domain laptop-lab laptop.lab
        /usr/bin/resolvectl dnssec laptop-lab no
    fi
fi
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux