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'

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
<network>
  <name>default</name>
  <uuid>afd4e923-66cb-45ca-9120-1e46e72899a3</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <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>

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.

References:
[1] http://unix.stackexchange.com/questions/8351/how-to-create-a-dupe-of-a-kvm-libvirt-virt-manager-vm/33584#33584
[2] http://libvirt.org/sources/virshcmdref/html/sect-net-create.html
[3] https://bbs.archlinux.org/viewtopic.php?id=198744


Similar Posts

  • Patching with git

    Tutorials on how to create patches and apply patches with git. A nice tutorial: https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/ Manuals: git format-patch: https://www.systutorials.com/docs/linux/man/1-git-format-patch/git apply: https://www.systutorials.com/docs/linux/man/1-git-apply/ Read more: How to create a git branch on remote git server How to do diff like `git diff –word-diff` without git on Linux? Cheatsheet: Git Branching with a Git Server What about the…

  • Git branching tutorial

    Good tutorials on git branching. The “Git Branching” chapter of Pro Git book is the best one that I ever seen: http://git-scm.com/book/en/Git-Branching It deserve the time to study the whole chapter. If you are working with a git server, this chapter is especially useful: http://git-scm.com/book/en/Git-Branching-Remote-Branches Read more: Cheatsheet: Git Branching with a Git Server How…

  • How to boot Linux Mint to the console by default?

    How to boot Linux Mint to the console by default? (that is, the run level 3). 2 methods introduced here to boot Linux Mint to console/command line. Method 1 (may only work for earlier releases; check method 2 below): set kernel option. Edit /etc/default/grub and add text to GRUB_CMDLINE_LINUX_DEFAULT: GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text” Then, re-generate grub…

  • | |

    How to Set Up A Gitolite Git Server – A Ten-Minute Tutorial

    I ever introduced seting up git server using SSH or gitosis. However, gitolite is the way to go for managing git servers if you want an lightweight authentication layer. gitolite provides many very usefull features which can control each user’s right on each branch. I set up one gitolite git server and am very happy…

  • Hadoop 2 (YARN) default configuration values

    Where to check the default Hadoop 2 (YARN) configuration values for: HDFS: hdfs-site.xml YARN: yarn-site.xml MapReduce: mapred-site.xml Default Hadoop 2 (YARN) configuration values for Hadoop 2.2.0 from Apache Hadoop website: HDFS: http://hadoop.apache.org/docs/r2.2.0/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml YARN: https://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml MapReduce: https://hadoop.apache.org/docs/r2.2.0/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml Read more: Good introductions to Hadoop 2.0 (YARN)? Hadoop Installation Tutorial (Hadoop 2.x) Hadoop Installation Tutorial (Hadoop 1.x) Hadoop…

Leave a Reply

Your email address will not be published. Required fields are marked *