Re: what runs libvirt?
On 26/06/16 02:37, David Sommerseth wrote: > On 24/06/16 16:48, Ken Teh wrote: >> I was trying to set up dnsmasq and discovered it's already running. >> Apparently as part of libvirt. Why is libvirt started? What starts it? >> >> I tried looking through systemd output but the only thing about systemd >> that I can understand are its services. Everything else is so far >> gobbledy-gook. > > libvirtd starts by default a virtual closed network (which is NATed) for > VMs. This is usually assigned an IP range in the 192.168.200.0/24 > range, IIRC. And it is only available for VMs running on the box, > started and configured by libvirt. And libvirtd uses dnsmasq for these > services. > > To stop it, run these commands as root: > > # virsh > virsh # net-list --all > Name State Autostart Persistent > -- > default inactive noyes > > virsh # net-destroy default > Network default destroyed > > virsh # > > > 'destroy' sounds harsh and brutal, but in libvirt lingo, it means "stop > running". > > To make this permanent, run this command in virsh > > virsh # net-autostart default --disable > Network default unmarked as autostarted > virsh # > > That's it. > Oh, and I forgot the systemd dependency stuff. Try running this: # systemctl list-dependencies --reverse libvirtd I guess you'll see that it's just some graphical stuff needing it, most likely started if you're having a graphical console. The --reverse option should give an indication which other systemd unit files depends on libvirtd running. Removing --reverse should list all systemd units libvirtd needs to have running to be able to start. But you should be able to disable it: # systemctl disable libvirtd And if it still starts, you can enforce it to never be started: # systemctl mask libvirtd To reverse these opeartions, use 'enable' instead of 'disable' and 'unmask' instead of 'mask'. -- kind regards, David Sommerseth
Re: what runs libvirt?
On 24/06/16 16:48, Ken Teh wrote: > I was trying to set up dnsmasq and discovered it's already running. > Apparently as part of libvirt. Why is libvirt started? What starts it? > > I tried looking through systemd output but the only thing about systemd > that I can understand are its services. Everything else is so far > gobbledy-gook. libvirtd starts by default a virtual closed network (which is NATed) for VMs. This is usually assigned an IP range in the 192.168.200.0/24 range, IIRC. And it is only available for VMs running on the box, started and configured by libvirt. And libvirtd uses dnsmasq for these services. To stop it, run these commands as root: # virsh virsh # net-list --all Name State Autostart Persistent -- default inactive noyes virsh # net-destroy default Network default destroyed virsh # 'destroy' sounds harsh and brutal, but in libvirt lingo, it means "stop running". To make this permanent, run this command in virsh virsh # net-autostart default --disable Network default unmarked as autostarted virsh # That's it. -- kind regards, David Sommerseth
Re: what runs libvirt?
libvirt's website has instructions on how to run dnsmasq alongside their instance of dnsmasq. The trick is to add a 'bind-interfaces' in the dnsmasq.conf and to explicitly specify the listening address or interface. On 06/24/2016 10:12 AM, Mark Stodola wrote: On 06/24/2016 09:48 AM, Ken Teh wrote: I was trying to set up dnsmasq and discovered it's already running. Apparently as part of libvirt. Why is libvirt started? What starts it? I tried looking through systemd output but the only thing about systemd that I can understand are its services. Everything else is so far gobbledy-gook. I ran into this recently on my Fedora laptop. It was quite annoying/frustrating to find out about this default configuration. I issued a 'systemctl stop libvirtd' and 'systemctl disable libvirtd' to disable it. It is used for the virtualization system, which relies on dnsmasq for the virtual lan these days... It uses an alternate configuration file than the normal /etc/dnsmasq.d/ files or wherever they live these days. Aft4r that, I as able to configure it as I normally do and start it using 'systemctl start dnsmasq'. If you rely on it for virtualization, you probably have to go fiddle with libvirtd's alternate dnsmasq config files to add the options you need for other purposes. This wasn't the case for me.
Re: what runs libvirt?
On 06/24/2016 09:48 AM, Ken Teh wrote: I was trying to set up dnsmasq and discovered it's already running. Apparently as part of libvirt. Why is libvirt started? What starts it? I tried looking through systemd output but the only thing about systemd that I can understand are its services. Everything else is so far gobbledy-gook. I ran into this recently on my Fedora laptop. It was quite annoying/frustrating to find out about this default configuration. I issued a 'systemctl stop libvirtd' and 'systemctl disable libvirtd' to disable it. It is used for the virtualization system, which relies on dnsmasq for the virtual lan these days... It uses an alternate configuration file than the normal /etc/dnsmasq.d/ files or wherever they live these days. Aft4r that, I as able to configure it as I normally do and start it using 'systemctl start dnsmasq'. If you rely on it for virtualization, you probably have to go fiddle with libvirtd's alternate dnsmasq config files to add the options you need for other purposes. This wasn't the case for me.