minikube: Requested operation is not valid: network 'default' is not active. Retrying.

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Minikube version (use minikube version): v0.12.2

Environment:

  • OS (e.g. from /etc/os-release): Debian GNU/Linux stretch/sid
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): kvm
  • Docker version (e.g. docker -v): 1.12.3
  • Install tools: ???
  • Others:

What happened:

# minikube start \
                 --vm-driver=kvm \
                 --container-runtime=rkt
[... failed ...]
# sudo apt install libvirt-clients
[...]
# minikube start \
                 --vm-driver=kvm \
                 --container-runtime=rkt
[... failed ...]
# sudo apt install libvirt-daemon libvirt-daemon-system
[...]
[libvirtd could not access KVM, due to permission issues, thus:]
# reboot
[...]
# minikube start \
                 --vm-driver=kvm \
                 --network-plugin=cni \
                 --container-runtime=rkt \
                 --iso-url=http://storage.googleapis.com/minikube/iso/buildroot/minikube-v0.0.6.iso
Starting local Kubernetes cluster...
Downloading Minikube ISO
 68.79 MB / 68.79 MB [==============================================] 100.00% 0s
E1118 13:37:13.086967    7590 start.go:92] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: [Code-55] [Domain-19] Requested operation is not valid: network 'default' is not active. Retrying.
E1118 13:37:13.087235    7590 start.go:98] Error starting host:  Error creating host: Error creating machine: Error in driver during machine creation: [Code-55] [Domain-19] Requested operation is not valid: network 'default' is not active
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
        minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:

Please note that I never get a chance to actually respond to the “report error” question. The console prompt was already flashing on the next line, which leads me to believe that the report was sent without my consent.

What you expected to happen:

Minikube should have started Kubernetes using KVM and created any missing networks.

How to reproduce it (as minimally and precisely as possible):

Hopefully the information given above is enough to reproduce it on a Debian 9.0 “Stretch” installation.

Anything else do we need to know:

There appear to be no networks configured in libvirt right now:

# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 18 (6 by maintainers)

Most upvoted comments

First time users need currently do:

virsh net-autostart default
virsh net-start default

Using virt-manager, I started the default network (virt-manager > edit > connection details > virtual networks > default) and enabled it start on boot.

That seemed to solve the issue somewhat: After repeatedly trying minikube start ..., followed by minikube delete and deleting ~/.minikube several times, I finally have a working minikube installation.

FYI I also see issues with virsh net-start default and have to bring down virbr0.

$ sudo virsh net-start default
error: Failed to start network default
error: error creating bridge interface virbr0: File exists

$ sudo ifconfig virbr0 down
$ sudo brctl delbr virbr0
$ sudo virsh net-start default
Network default started

Lots of great tips in here, but my system (new Manjaro install) was even more raw, not even including the default.xml file from the libvirt source.

Cribbing off of previous suggestions, the following worked for me:

virsh net-define <(curl -s https://raw.githubusercontent.com/libvirt/libvirt/v4.0.0/src/network/default.xml)
virsh net-autostart default
sudo virsh net-start default

To restore the default network when something went b0rked, please do:

virsh net-undefine default
virsh net-destroy default
virsh net-list
virsh net-define /usr/share/libvirt/networks/default.xml
virsh net-start default

/remove-lifecycle stale

I saw this issue with minikube v0.25.0 and --vm-driver=kvm2 on a Debian Buster-like-system.

virsh net-autostart default failed with:

error: failed to get network 'default'                                                                                            
error: Network not found: no network with matching name 'default'

But with virt-manager I was able to start and enable-autostart for default, and then minikube start --vm-driver=kvm2 worked correctly.

EDIT: sudo virsh net-autostart default seems to work. id | grep virt shows I’m in libvirt and libvirt-qemu so group membership isn’t the issue.

A reboot did the job for me after running sudo virsh net-autostart default