[KVM (Kernel-based Virtual Machine)](https://www.linux-kvm.org/page/Main_Page) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions. To work with KVM, minikube uses the [libvirt virtualization API](https://libvirt.org/)
*`minikube` will repeatedly ask for the root password if user is not in the correct `libvirt` group [#3467](https://github.com/kubernetes/minikube/issues/3467)
If you are running KVM in a nested virtualization environment ensure your config the kernel modules correctly follow either [this](https://stafwag.github.io/blog/blog/2018/06/04/nested-virtualization-in-kvm/) or [this](https://computingforgeeks.com/how-to-install-kvm-virtualization-on-debian/) tutorial.
****my-custom-kvm-priv-net*** is a custom private network name provided for minikube profile (eg, using `minikube start -p kvm1 --driver=kvm2 --network="my-custom-kvm-priv-net"`).
2. Run `sudo virsh net-autostart <network>` to manually set **network** to autostart, if not already set.
3. Run `sudo virsh net-start <network>` to manually start/activate **network**, if not already started/active.
1. In case that the ***default*** libvirt network is missing or is unable to start/activate - consult your OS/distro-specific libvirt docs; the following steps *might* help you to fix the issue:
1. Run `sudo virsh net-dumpxml default > default.xml` to backup the ***default*** libvirt network config.
2. Run `sudo virsh net-destroy default` to stop the ***default*** libvirt network.
3. Run `sudo virsh net-undefine default` to delete the ***default*** libvirt network.
4. Run `sudo virsh net-define /usr/share/libvirt/networks/default.xml` to recreate the ***default*** libvirt network.
* Note: repeat above steps ***b.*** and ***c.*** and then Run `sudo virsh net-define default.xml` to restore the original ***default*** libvirt network config, in case of any issue.
5. Run `sudo virsh net-start default` to start the ***default*** libvirt network.
6. Run `sudo virsh net-autostart default` to autostart the ***default*** libvirt network.
2. If ***non-default*** libvirt **network** is unable to start/activate, use the following steps:
1. Run `sudo virsh net-dumpxml <network>` to dump XML **network** config - note the `bridge name=<bridge>` and `ip address='<address>' netmask='<netmask>'` values. Example output:
```xml
<networkconnections='1'>
<name>mk-minikube</name>
<uuid>cfcb37fb-fd75-4599-825a-14bee5d863f5</uuid>
<bridgename='virbr1'stp='on'delay='0'/>
<macaddress='52:54:00:80:97:5a'/>
<dnsenable='no'/>
<ipaddress='192.168.39.1'netmask='255.255.255.0'>
<dhcp>
<rangestart='192.168.39.2'end='192.168.39.254'/>
</dhcp>
</ip>
</network>
```
b. Run `ip -4 -br -o a s` to show all interfaces with assigned IPs (in CIDR format), now compare the above IP **address** and **netmask** with those of the **bridge**. Example output:
```shell
lo UNKNOWN 127.0.0.1/8
virbr0 UP 192.168.122.1/24
wlp113s0 UP 192.168.42.17/24
br-08ada8d5dfa4 DOWN 172.22.0.1/16
docker0 DOWN 172.17.0.1/16
virbr1 UP 192.168.39.1/24
```
****IF THEY MATCH, or THE IP ADDRESS ISN'T LISTED ANYWHERE***: Run `sudo ip link delete <bridge>` followed by `sudo virsh net-start <network>` and `sudo virsh net-autostart <network>` to let libvirt recreate the **bridge** and [auto]start the **network**.
****IF THE IP ADDRESS BELONGS TO ANOTHER INTERFACE***: something else occupied the IP **address** creating the conflict, and you'll have to determine what and then choose between the two...
4. Run `sudo systemctl restart libvirtd` or `sudo systemctl restart libvirt` (depending on your OS/distro) to restart the libvirt daemon.
Hopefully, by now you have libvirt network operational, and you will be successfully running minikube again.