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

[libvirt-users] libvirt network without dns ?

   I've opened a bug against ubuntu at [1]. I realize this is probably not
a high priority, but I was just curious if it is possible to have libvirt
configure a network and *not* run a DNS server on it (dnsmasq).  Perhaps I
could convince libvirt to run dnsmasq with '--port 0'?

   For my explicit use case i was hoping/expecting to run my own dns and
dhcp servers, possibly a specific server bound only to that interface (as
dnsmasq does).  I just wanted libvirt to create the bridge and setup NAT
(and automatically bring the network and any configured guests on it up on
   Heres what I did.
$ BRIDGE="mybr0"; IP="";
$ cat > $BRIDGE.xml <<EOF
  <forward mode='nat'/>
  <bridge name='$BRIDGE' stp='off' delay='0' />
  <ip address='$IP' netmask=''>
$ sudo virsh -c qemu:///system net-define $BRIDGE.xml
$ sudo virsh -c qemu:///system net-start $BRIDGE

## See, after 'start' dnsmasq is running and usable on that interface.

$ ps axw | grep dnsm | grep $BRIDGE.pid
 9888 ? S 0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order
--bind-interfaces --pid-file=/var/run/libvirt/network/mybr0.pid
--conf-file= --except-interface lo --listen-address
$ dig +short @$IP www.ubuntu.com

[1] https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1053408

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