[libvirt-users] How to disable dnsmasq from starting automatically with libvirtd

Osier Yang jyang at redhat.com
Thu Sep 13 07:17:14 UTC 2012


On 2012年09月13日 14:55, Marwan Tanager wrote:
> On Thu, Sep 13, 2012 at 01:04:58PM +0800, Osier Yang wrote:
>> On 2012年09月13日 11:23, Marwan Tanager wrote:
>>
>> No, to disable the autostarting of dnsmasq, you need to disable the
>> autostart of network which drives dnsmasq (named 'default' by default).
>>
>> % virsh net-autostart --disable default
>>
>> Then it won't be started automatically along with libvirtd service next
>> time.
>
> Thanks for the response, but my question was whether it's possible to start
> libvirtd (and hence, activate the virtual networks "automatically") on boot, but
> without dnsmasq being started along the way. Your answer means that to disable
> dnsmasq from starting automatically, I need to disable the network form starting
> automatically too.
>
> Anyway, I destroyed the 'default' network, then killed the dnsmasq process for
> that network, but when I started it again, dnsmasq started along with it. So, it
> appears that the whole thing is hard coded.

No, it depends on your previous network status, note that libvirt
saves the object's state, so that things could be consistent before
restarting/reloading.

# virsh net-list --all
Name                 State      Autostart
-----------------------------------------
default              active     no

# service libvirtd restart
Restarting libvirtd (via systemctl):                       [  OK  ]

# virsh net-list --all
Name                 State      Autostart
-----------------------------------------
default              active     no

# pidof libvirtd
6868
# pidof dnsmasq
6826


# virsh net-destroy default
Network default destroyed

# service libvirtd restart
Restarting libvirtd (via systemctl):                       [  OK  ]

# virsh net-list --all
Name                 State      Autostart
-----------------------------------------
default              inactive   no

# ps -ef | grep dnsmasq
root      6762 20112  0 15:07 pts/1    00:00:00 grep --color=auto dnsmasq
# pidof libvirtd
6689

Does this make sense to you? :-)

Regards,
Osier




More information about the libvirt-users mailing list