Cannot start VM with error "no network with matching name 'default'"

I update libvirt version and want to start VM with the new libvirt tools but I failed as follows.

> sudo virsh start kvm1
error: Failed to start domain kvm1
error: Network not found: no network with matching name 'default'
asked Dec 20, 2016 by harryxiyou (4,060 points)

1 Answer

Best answer

It seems that the default 'virbr0' is missing after I update libvirt so I solve this problem like following.

1, copy a 'virtbr0' config file from another server with same configuration.

$ sudo virsh net-dumpxml default
  <forward mode='nat'>
      <port start='1024' end='65535'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <ip address='' netmask=''>
      <range start='' end=''/>

2, remove the uuid in above configuration file and create it in the problem server.

# virsh net-create default.xml

3, Check the virtual bridge in the problem server.

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

Now, everything goes well.

You may also happen to following problem when you want to start default.

# virsh net-create ./default.xml 
error: Failed to create network from ./default.xml
error: internal error: Failed to initialize a valid firewall backend

Do following to solve it:

# apt-get install firewalld
# apt-get install ebtables
# apt-get install iptables
# /etc/init.d/libvirt-bin restart

The last step is to restart libvirtd.


answered Dec 20, 2016 by harryxiyou (4,060 points)
edited Dec 22, 2016 by harryxiyou

Related questions

1 answer
asked Sep 29, 2016 by harryxiyou (4,060 points)
1 answer
asked Sep 18, 2016 by anonymous
1 answer
asked Jan 28, 2014 by anonymous
1 answer
1 answer
1 answer
asked Oct 2, 2014 by Eric Z Ma (41,910 points)
Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost