Page MenuHomeSolus

`sudo virsh net-autostart default` does not autostart
Closed, ResolvedPublic

Description

I am trying to use virt-manager. After starting it up, if I start a VM, I get the message "Error starting domain: Requested operation is not valid: network 'default' is not active". I can fix this and proceed by running the command sudo virsh net-start default. I would like to not have to run this command, so I attempted to make it start automatically by running sudo virsh net-autostart default. There are no error messages after running that command. It is true that after running it, running sudo virsh net-list --all shows default is set to autostart. But it never does autostart, I always have to run that command manually to start it.

Event Timeline

still-dreaming-1 updated the task description. (Show Details)
anaknaga added a subscriber: anaknaga.
clauded added a subscriber: clauded.EditedSep 3 2017, 3:26 PM

I have the same problem. Dnsmasq throws an error at boot time. Manually starting virbr0 works as a workaround. Here's some more info:

libvirtd Message:
[1504334193.9441] device (virbr0): Activation: successful, device activated.
req:2 'up' [virbr0]: new request (0 scripts)
req:2 'up' [virbr0]: completed: no scripts
[1504334193.9487] device (virbr0-nic): state change: secondaries -> activated (reason 'none') [90 100 0]
625: error : virCommandWait:2572 : internal error: Child process (VIR_BRIDGE_NAME=virbr0 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper) unexpected fatal signal 11

dnsmasq error 11:
11 or greater - a non zero return code was received from the lease-script process "init" call. The exit code from dnsmasq is the script's exit code with 10 added.

enp9s0 Link encap:Ethernet HWaddr F0:4D:A2:4E:3B:80

UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:4468 errors:0 dropped:0 overruns:0 frame:0
TX packets:4793 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2491115  TX bytes:615616
Interrupt:17

lo Link encap:Local Loopback

inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:65536  Metric:1
RX packets:181 errors:0 dropped:0 overruns:0 frame:0
TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14389  TX bytes:14389

lxdbr0 Link encap:Ethernet HWaddr F0:4D:A2:4E:3B:80

inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:4426 errors:0 dropped:0 overruns:0 frame:0
TX packets:4284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2407103  TX bytes:564705

wlp4s0 Link encap:Ethernet HWaddr 00:27:10:3C:44:E8

inet addr:192.168.0.22  Bcast:192.168.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1806 errors:0 dropped:0 overruns:0 frame:0
TX packets:293 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1070701  TX bytes:43925

root@dell-laptop ~ # dnsmasq --version
Dnsmasq version 2.73

root@dell-laptop ~ # ps aux|grep dnsm
root 2095 0.0 0.0 113920 2292 pts/0 S+ 22:02 0:00 grep dnsm

root@dell-laptop ~ # virsh net-dumpxml default
<network>

<name>default</name>
<uuid>9b795d7f-b807-417d-ad04-6c4df35b0fcb</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:42:a0:40'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
  <dhcp>
    <range start='192.168.122.2' end='192.168.122.254'/>
  </dhcp>
</ip>

</network>

root@dell-laptop ~ # virsh net-list --all
Nom État Démarrage automatique Persistent
default inactif yes yes

root@dell-laptop ~ # virsh net-start default
Réseau default démarré

root@dell-laptop ~ # virsh net-list --all
Nom État Démarrage automatique Persistent
default actif yes yes

root@dell-laptop ~ # ps aux|grep dnsm
nobody 2145 0.0 0.0 5732 208 ? S 22:04 0:00 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
root 2146 0.0 0.0 5732 208 ? S 22:04 0:00 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
root 2191 0.0 0.0 113920 2288 pts/0 S+ 22:04 0:00 grep dnsm
root@dell-laptop ~ #

ermo added a subscriber: ermo.EditedNov 3 2017, 8:23 PM

I am trying to use virt-manager. After starting it up, if I start a VM, I get the message "Error starting domain: Requested operation is not valid: network 'default' is not active".

I can't reproduce this on Solus 3 (+ updates)?

I've got a Fedora 27 WS beta VM that boots and connects to the default NAT network just fine with the current virt-manager and libvirtd...

Actually, I had a bridge configuration with LXD (snap installation) witch might have been the cause of my problem. I now start manually my LXD bridge and my virt-manager default bridge starts fine at boot time.

ermo closed this task as Resolved.Nov 23 2017, 8:03 PM
ermo claimed this task.

Marking this as resolved.

If the issue persists, feel free to re-open.