Skip to content

kvm2 driver: operation failed: domain 'minikube' already exists with uuid #10102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
koyuch opened this issue Jan 7, 2021 · 8 comments
Closed
Assignees
Labels
co/kvm2-driver KVM2 driver related issues kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@koyuch
Copy link

koyuch commented Jan 7, 2021

I have similar/same issue here with kvm on Manjaro as here: #6254 - I've started minikube succesfully first time with kvm2, but when I tried to delete it and run again it always throws errors (even after rm -rf ~/.minikube)

Steps to reproduce the issue:

  1. start minikube with kvm on linux (manjaro in my case): minikube start
  2. added some pods in it
  3. remove minikube "machine": minikube delete --all
  4. try to start it again -> this crash

Full output of failed command:

$ minikube version
minikube version: v1.16.0
commit: 9f1e482427589ff8451c4723b6ba53bb9742fbb1-dirty

$ docker-machine-driver-kvm2 version
version: v1.16.0
commit: 9f1e482427589ff8451c4723b6ba53bb9742fbb1

$ minikube delete --all                                                                                                   
🔥  Deleting "minikube" in kvm2 ...
💀  Removed all traces of the "minikube" cluster.
🔥  Successfully deleted all profiles

 10:43:23  koyuch@thinky-t450  ~  ⬡ v15.4.0 
$ minikube start --kubernetes-version v1.19.4 --memory 6096 --cpus 4 --v=8 --driver kvm2 --disk-size 40g --alsologtostderr
I0107 10:43:39.645669  452773 out.go:221] Setting OutFile to fd 1 ...
I0107 10:43:39.645834  452773 out.go:273] isatty.IsTerminal(1) = true
I0107 10:43:39.645844  452773 out.go:234] Setting ErrFile to fd 2...
I0107 10:43:39.645853  452773 out.go:273] isatty.IsTerminal(2) = true
I0107 10:43:39.646009  452773 root.go:280] Updating PATH: /home/koyuch/.minikube/bin
I0107 10:43:39.646288  452773 out.go:228] Setting JSON to false
I0107 10:43:39.662185  452773 start.go:104] hostinfo: {"hostname":"thinky-t450","uptime":68784,"bootTime":1609943835,"procs":292,"os":"linux","platform":"arch","platformFamily":"arch","platformVersion":"20.2.1","kernelVersion":"5.10.2-2-MANJARO","virtualizationSystem":"kvm","virtualizationRole":"host","hostid":"db1b49b5-4c83-4fcb-8253-c377d6c834d3"}
I0107 10:43:39.662813  452773 start.go:114] virtualization: kvm host
I0107 10:43:39.663299  452773 out.go:119] 😄  minikube v1.16.0 on Arch 20.2.1
😄  minikube v1.16.0 on Arch 20.2.1
I0107 10:43:39.663450  452773 driver.go:303] Setting default libvirt URI to qemu:///system
I0107 10:43:39.663488  452773 notify.go:126] Checking for updates...
I0107 10:43:39.709491  452773 out.go:119] ✨  Using the kvm2 driver based on user configuration
✨  Using the kvm2 driver based on user configuration
I0107 10:43:39.709524  452773 start.go:277] selected driver: kvm2
I0107 10:43:39.709531  452773 start.go:686] validating driver "kvm2" against <nil>
I0107 10:43:39.709546  452773 start.go:697] status for kvm2: {Installed:true Healthy:true Running:false NeedsImprovement:false Error:<nil> Fix: Doc:}
I0107 10:43:39.710075  452773 install.go:51] acquiring lock: {Name:mk900956b073697a4aa6c80a27c6bb0742a99a53 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I0107 10:43:39.710264  452773 install.go:116] Validating docker-machine-driver-kvm2, PATH=/home/koyuch/.minikube/bin:/home/koyuch/.jenv/shims:/home/koyuch/.jenv/bin:/home/koyuch/.local/bin:/opt/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
I0107 10:43:39.730008  452773 install.go:136] /usr/bin/docker-machine-driver-kvm2 version is 1.16.0
I0107 10:43:39.730221  452773 start_flags.go:235] no existing cluster config was found, will generate one from the flags 
I0107 10:43:39.730715  452773 start_flags.go:648] Wait components to verify : map[apiserver:true system_pods:true]
I0107 10:43:39.731051  452773 cni.go:74] Creating CNI manager for ""
I0107 10:43:39.731092  452773 cni.go:139] CNI unnecessary in this configuration, recommending no CNI
I0107 10:43:39.731230  452773 start_flags.go:367] config:
{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot4@sha256:ef1f485b5a1cfa4c989bc05e153f0a8525968ec999e242efff871cbb31649c16 Memory:6096 CPUs:4 DiskSize:40960 VMDriver: Driver:kvm2 HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.4 ClusterName:minikube Namespace:default APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: CustomIngressCert: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ScheduledStop:<nil> ExposedPorts:[] MultiNodeRequested:false}
I0107 10:43:39.731632  452773 iso.go:119] acquiring lock: {Name:mka5de5d99e8661911fe7ebf85b8a90291fb0f88 Clock:{} Delay:500ms Timeout:10m0s Cancel:<nil>}
I0107 10:43:39.732366  452773 out.go:119] 👍  Starting control plane node minikube in cluster minikube
👍  Starting control plane node minikube in cluster minikube
I0107 10:43:39.732532  452773 preload.go:97] Checking if preload exists for k8s version v1.19.4 and runtime docker
I0107 10:43:39.732636  452773 preload.go:105] Found local preload: /home/koyuch/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v8-v1.19.4-docker-overlay2-amd64.tar.lz4
I0107 10:43:39.732711  452773 cache.go:54] Caching tarball of preloaded images
I0107 10:43:39.732785  452773 preload.go:131] Found /home/koyuch/.minikube/cache/preloaded-tarball/preloaded-images-k8s-v8-v1.19.4-docker-overlay2-amd64.tar.lz4 in cache, skipping download
I0107 10:43:39.732835  452773 cache.go:57] Finished verifying existence of preloaded tar for  v1.19.4 on docker
I0107 10:43:39.733276  452773 profile.go:147] Saving config to /home/koyuch/.minikube/profiles/minikube/config.json ...
I0107 10:43:39.733300  452773 lock.go:36] WriteFile acquiring /home/koyuch/.minikube/profiles/minikube/config.json: {Name:mk8cc833be400cd58e229719328d50b2e200be02 Clock:{} Delay:500ms Timeout:1m0s Cancel:<nil>}
I0107 10:43:39.733439  452773 cache.go:185] Successfully downloaded all kic artifacts
I0107 10:43:39.733468  452773 start.go:314] acquiring machines lock for minikube: {Name:mk341901855270bd8448b90ae7507cc1a06a63cf Clock:{} Delay:500ms Timeout:13m0s Cancel:<nil>}
I0107 10:43:39.733527  452773 start.go:318] acquired machines lock for "minikube" in 45.791µs
I0107 10:43:39.733543  452773 start.go:90] Provisioning new machine with config: &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.16.0.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot4@sha256:ef1f485b5a1cfa4c989bc05e153f0a8525968ec999e242efff871cbb31649c16 Memory:6096 CPUs:4 DiskSize:40960 VMDriver: Driver:kvm2 HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.4 ClusterName:minikube Namespace:default APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: CustomIngressCert: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.4 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ScheduledStop:<nil> ExposedPorts:[] MultiNodeRequested:false} &{Name: IP: Port:8443 KubernetesVersion:v1.19.4 ControlPlane:true Worker:true}
I0107 10:43:39.733596  452773 start.go:127] createHost starting for "" (driver="kvm2")
I0107 10:43:39.733717  452773 out.go:119] 🔥  Creating kvm2 VM (CPUs=4, Memory=6096MB, Disk=40960MB) ...
🔥  Creating kvm2 VM (CPUs=4, Memory=6096MB, Disk=40960MB) ...
I0107 10:43:39.733852  452773 main.go:119] libmachine: Found binary path at /usr/bin/docker-machine-driver-kvm2
I0107 10:43:39.733910  452773 main.go:119] libmachine: Launching plugin server for driver kvm2
I0107 10:43:39.754630  452773 main.go:119] libmachine: Plugin server listening at address 127.0.0.1:46411
I0107 10:43:39.755228  452773 main.go:119] libmachine: () Calling .GetVersion
I0107 10:43:39.755868  452773 main.go:119] libmachine: Using API Version  1
I0107 10:43:39.755893  452773 main.go:119] libmachine: () Calling .SetConfigRaw
I0107 10:43:39.756191  452773 main.go:119] libmachine: () Calling .GetMachineName
I0107 10:43:39.756325  452773 main.go:119] libmachine: (minikube) Calling .GetMachineName
I0107 10:43:39.756421  452773 main.go:119] libmachine: (minikube) Calling .DriverName
I0107 10:43:39.756539  452773 start.go:164] libmachine.API.Create for "minikube" (driver="kvm2")
I0107 10:43:39.756564  452773 client.go:165] LocalClient.Create starting
I0107 10:43:39.756597  452773 main.go:119] libmachine: Reading certificate data from /home/koyuch/.minikube/certs/ca.pem
I0107 10:43:39.756646  452773 main.go:119] libmachine: Decoding PEM data...
I0107 10:43:39.756669  452773 main.go:119] libmachine: Parsing certificate...
I0107 10:43:39.756810  452773 main.go:119] libmachine: Reading certificate data from /home/koyuch/.minikube/certs/cert.pem
I0107 10:43:39.756839  452773 main.go:119] libmachine: Decoding PEM data...
I0107 10:43:39.756863  452773 main.go:119] libmachine: Parsing certificate...
I0107 10:43:39.756915  452773 main.go:119] libmachine: Running pre-create checks...
I0107 10:43:39.756941  452773 main.go:119] libmachine: (minikube) Calling .PreCreateCheck
I0107 10:43:39.757198  452773 main.go:119] libmachine: (minikube) Calling .GetConfigRaw
I0107 10:43:39.757538  452773 main.go:119] libmachine: Creating machine...
I0107 10:43:39.757556  452773 main.go:119] libmachine: (minikube) Calling .Create
I0107 10:43:39.757659  452773 main.go:119] libmachine: (minikube) Creating KVM machine...
I0107 10:43:39.768614  452773 main.go:119] libmachine: (minikube) DBG | Trying to create network minikube-net...
I0107 10:43:40.040714  452773 main.go:119] libmachine: (minikube) Setting up store path in /home/koyuch/.minikube/machines/minikube ...
I0107 10:43:40.040755  452773 main.go:119] libmachine: (minikube) Building disk image from file:///home/koyuch/.minikube/cache/iso/minikube-v1.16.0.iso
I0107 10:43:40.040791  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:40.040608  452793 common.go:101] Making disk image using store path: /home/koyuch/.minikube
I0107 10:43:40.040829  452773 main.go:119] libmachine: (minikube) Downloading /home/koyuch/.minikube/cache/boot2docker.iso from file:///home/koyuch/.minikube/cache/iso/minikube-v1.16.0.iso...
I0107 10:43:40.241283  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:40.241197  452793 common.go:108] Creating ssh key: /home/koyuch/.minikube/machines/minikube/id_rsa...
I0107 10:43:40.559890  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:40.559805  452793 common.go:114] Creating raw disk image: /home/koyuch/.minikube/machines/minikube/minikube.rawdisk...
I0107 10:43:40.559921  452773 main.go:119] libmachine: (minikube) DBG | Writing magic tar header
I0107 10:43:40.559938  452773 main.go:119] libmachine: (minikube) DBG | Writing SSH key tar header
I0107 10:43:40.559952  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:40.559920  452793 common.go:128] Fixing permissions on /home/koyuch/.minikube/machines/minikube ...
I0107 10:43:40.560025  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube/machines/minikube
I0107 10:43:40.560047  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube/machines/minikube (perms=drwx------)
I0107 10:43:40.560073  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube/machines (perms=drwxr-xr-x)
I0107 10:43:40.560091  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube/machines
I0107 10:43:40.560108  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube (perms=drwxr-xr-x)
I0107 10:43:40.560118  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube
I0107 10:43:40.560146  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch
I0107 10:43:40.560161  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home
I0107 10:43:40.560180  452773 main.go:119] libmachine: (minikube) DBG | Skipping /home - not owner
I0107 10:43:40.560196  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch (perms=drwxr-xr-x)
I0107 10:43:40.560209  452773 main.go:119] libmachine: (minikube) Creating domain...
I0107 10:43:40.565238  452773 main.go:119] libmachine: (minikube) KVM machine creation complete!
I0107 10:43:40.565314  452773 client.go:168] LocalClient.Create took 808.738354ms
I0107 10:43:42.565534  452773 start.go:130] duration metric: createHost completed in 2.831898311s
I0107 10:43:42.565561  452773 start.go:81] releasing machines lock for "minikube", held for 2.832023727s
W0107 10:43:42.565601  452773 start.go:377] error starting host: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='b8:d4:a5:20:a1:ca'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='80:e9:c6:0e:ee:ec'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
I0107 10:43:42.566363  452773 main.go:119] libmachine: Found binary path at /usr/bin/docker-machine-driver-kvm2
I0107 10:43:42.566422  452773 main.go:119] libmachine: Launching plugin server for driver kvm2
I0107 10:43:42.584378  452773 main.go:119] libmachine: Plugin server listening at address 127.0.0.1:45915
I0107 10:43:42.584731  452773 main.go:119] libmachine: () Calling .GetVersion
I0107 10:43:42.585108  452773 main.go:119] libmachine: Using API Version  1
I0107 10:43:42.585126  452773 main.go:119] libmachine: () Calling .SetConfigRaw
I0107 10:43:42.585377  452773 main.go:119] libmachine: () Calling .GetMachineName
I0107 10:43:42.585754  452773 main.go:119] libmachine: Found binary path at /usr/bin/docker-machine-driver-kvm2
I0107 10:43:42.585791  452773 main.go:119] libmachine: Launching plugin server for driver kvm2
I0107 10:43:42.603303  452773 main.go:119] libmachine: Plugin server listening at address 127.0.0.1:40471
I0107 10:43:42.603758  452773 main.go:119] libmachine: () Calling .GetVersion
I0107 10:43:42.604213  452773 main.go:119] libmachine: Using API Version  1
I0107 10:43:42.604256  452773 main.go:119] libmachine: () Calling .SetConfigRaw
I0107 10:43:42.604756  452773 main.go:119] libmachine: () Calling .GetMachineName
I0107 10:43:42.605058  452773 main.go:119] libmachine: (minikube) Calling .GetState
I0107 10:43:42.609543  452773 main.go:119] libmachine: (minikube) Calling .DriverName
I0107 10:43:42.609823  452773 out.go:119] 🔥  Deleting "minikube" in kvm2 ...
🔥  Deleting "minikube" in kvm2 ...
I0107 10:43:42.609853  452773 main.go:119] libmachine: (minikube) Calling .Remove
I0107 10:43:42.609974  452773 main.go:119] libmachine: (minikube) DBG | Removing machine...
I0107 10:43:42.612804  452773 main.go:119] libmachine: (minikube) DBG | Trying to delete the networks (if possible)
I0107 10:43:42.615549  452773 main.go:119] libmachine: (minikube) DBG | Checking if network minikube-net exists...
I0107 10:43:42.615659  452773 main.go:119] libmachine: (minikube) DBG | Network minikube-net exists
I0107 10:43:42.615690  452773 main.go:119] libmachine: (minikube) DBG | Trying to list all domains...
I0107 10:43:42.615826  452773 main.go:119] libmachine: (minikube) DBG | Listed all domains: total of 1 domains
I0107 10:43:42.615853  452773 main.go:119] libmachine: (minikube) DBG | Trying to get name of domain...
I0107 10:43:42.615875  452773 main.go:119] libmachine: (minikube) DBG | Got domain name: minikube
I0107 10:43:42.615888  452773 main.go:119] libmachine: (minikube) DBG | Skipping domain as it is us...
I0107 10:43:42.615907  452773 main.go:119] libmachine: (minikube) DBG | Trying to reactivate network minikube-net first (if needed)...
I0107 10:43:42.616002  452773 main.go:119] libmachine: (minikube) DBG | Trying to destroy network minikube-net...
I0107 10:43:42.938118  452773 main.go:119] libmachine: (minikube) DBG | Trying to undefine network minikube-net...
I0107 10:43:42.938700  452773 main.go:119] libmachine: (minikube) Successfully deleted networks
I0107 10:43:42.938729  452773 main.go:119] libmachine: (minikube) DBG | Checking if the domain needs to be deleted
I0107 10:43:42.938869  452773 main.go:119] libmachine: (minikube) Domain minikube exists, removing...
I0107 10:43:42.939016  452773 main.go:119] libmachine: (minikube) Domain minikube already destroyed, skipping...
I0107 10:43:42.939239  452773 main.go:119] libmachine: (minikube) Domain minikube not defined, skipping undefine...
W0107 10:43:42.984091  452773 out.go:181] 🤦  StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='b8:d4:a5:20:a1:ca'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='80:e9:c6:0e:ee:ec'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
🤦  StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='b8:d4:a5:20:a1:ca'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='80:e9:c6:0e:ee:ec'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
I0107 10:43:42.984318  452773 start.go:392] Will try again in 5 seconds ...
I0107 10:43:47.984506  452773 start.go:314] acquiring machines lock for minikube: {Name:mk341901855270bd8448b90ae7507cc1a06a63cf Clock:{} Delay:500ms Timeout:13m0s Cancel:<nil>}
I0107 10:43:47.984770  452773 start.go:318] acquired machines lock for "minikube" in 174.067µs
I0107 10:43:47.984834  452773 start.go:90] Provisioning new machine with config: &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO:https://storage.googleapis.com/minikube/iso/minikube-v1.16.0.iso KicBaseImage:gcr.io/k8s-minikube/kicbase:v0.0.15-snapshot4@sha256:ef1f485b5a1cfa4c989bc05e153f0a8525968ec999e242efff871cbb31649c16 Memory:6096 CPUs:4 DiskSize:40960 VMDriver: Driver:kvm2 HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] ContainerVolumeMounts:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.19.4 ClusterName:minikube Namespace:default APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: LoadBalancerStartIP: LoadBalancerEndIP: CustomIngressCert: ExtraOptions:[] ShouldLoadCachedImages:true EnableDefaultCNI:false CNI: NodeIP: NodePort:8443 NodeName:} Nodes:[{Name: IP: Port:8443 KubernetesVersion:v1.19.4 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true] StartHostTimeout:6m0s ScheduledStop:<nil> ExposedPorts:[] MultiNodeRequested:false} &{Name: IP: Port:8443 KubernetesVersion:v1.19.4 ControlPlane:true Worker:true}
I0107 10:43:47.984956  452773 start.go:127] createHost starting for "" (driver="kvm2")
I0107 10:43:47.985531  452773 out.go:119] 🔥  Creating kvm2 VM (CPUs=4, Memory=6096MB, Disk=40960MB) ...
🔥  Creating kvm2 VM (CPUs=4, Memory=6096MB, Disk=40960MB) ...
I0107 10:43:47.985895  452773 main.go:119] libmachine: Found binary path at /usr/bin/docker-machine-driver-kvm2
I0107 10:43:47.986069  452773 main.go:119] libmachine: Launching plugin server for driver kvm2
I0107 10:43:48.010531  452773 main.go:119] libmachine: Plugin server listening at address 127.0.0.1:38737
I0107 10:43:48.011250  452773 main.go:119] libmachine: () Calling .GetVersion
I0107 10:43:48.012060  452773 main.go:119] libmachine: Using API Version  1
I0107 10:43:48.012103  452773 main.go:119] libmachine: () Calling .SetConfigRaw
I0107 10:43:48.012577  452773 main.go:119] libmachine: () Calling .GetMachineName
I0107 10:43:48.012833  452773 main.go:119] libmachine: (minikube) Calling .GetMachineName
I0107 10:43:48.013076  452773 main.go:119] libmachine: (minikube) Calling .DriverName
I0107 10:43:48.014315  452773 start.go:164] libmachine.API.Create for "minikube" (driver="kvm2")
I0107 10:43:48.014354  452773 client.go:165] LocalClient.Create starting
I0107 10:43:48.014390  452773 main.go:119] libmachine: Reading certificate data from /home/koyuch/.minikube/certs/ca.pem
I0107 10:43:48.014433  452773 main.go:119] libmachine: Decoding PEM data...
I0107 10:43:48.014458  452773 main.go:119] libmachine: Parsing certificate...
I0107 10:43:48.014569  452773 main.go:119] libmachine: Reading certificate data from /home/koyuch/.minikube/certs/cert.pem
I0107 10:43:48.014600  452773 main.go:119] libmachine: Decoding PEM data...
I0107 10:43:48.014619  452773 main.go:119] libmachine: Parsing certificate...
I0107 10:43:48.014696  452773 main.go:119] libmachine: Running pre-create checks...
I0107 10:43:48.014710  452773 main.go:119] libmachine: (minikube) Calling .PreCreateCheck
I0107 10:43:48.015403  452773 main.go:119] libmachine: (minikube) Calling .GetConfigRaw
I0107 10:43:48.016023  452773 main.go:119] libmachine: Creating machine...
I0107 10:43:48.016045  452773 main.go:119] libmachine: (minikube) Calling .Create
I0107 10:43:48.016180  452773 main.go:119] libmachine: (minikube) Creating KVM machine...
I0107 10:43:48.029978  452773 main.go:119] libmachine: (minikube) DBG | Trying to create network minikube-net...
I0107 10:43:48.318360  452773 main.go:119] libmachine: (minikube) Setting up store path in /home/koyuch/.minikube/machines/minikube ...
I0107 10:43:48.318400  452773 main.go:119] libmachine: (minikube) Building disk image from file:///home/koyuch/.minikube/cache/iso/minikube-v1.16.0.iso
I0107 10:43:48.318439  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:48.318312  452933 common.go:101] Making disk image using store path: /home/koyuch/.minikube
I0107 10:43:48.318552  452773 main.go:119] libmachine: (minikube) Downloading /home/koyuch/.minikube/cache/boot2docker.iso from file:///home/koyuch/.minikube/cache/iso/minikube-v1.16.0.iso...
I0107 10:43:48.602100  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:48.601992  452933 common.go:108] Creating ssh key: /home/koyuch/.minikube/machines/minikube/id_rsa...
I0107 10:43:48.719099  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:48.719012  452933 common.go:114] Creating raw disk image: /home/koyuch/.minikube/machines/minikube/minikube.rawdisk...
I0107 10:43:48.719137  452773 main.go:119] libmachine: (minikube) DBG | Writing magic tar header
I0107 10:43:48.719171  452773 main.go:119] libmachine: (minikube) DBG | Writing SSH key tar header
I0107 10:43:48.719217  452773 main.go:119] libmachine: (minikube) DBG | I0107 10:43:48.719155  452933 common.go:128] Fixing permissions on /home/koyuch/.minikube/machines/minikube ...
I0107 10:43:48.719280  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube/machines/minikube
I0107 10:43:48.719316  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube/machines
I0107 10:43:48.719335  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch/.minikube
I0107 10:43:48.719354  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube/machines/minikube (perms=drwx------)
I0107 10:43:48.719373  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube/machines (perms=drwxr-xr-x)
I0107 10:43:48.719392  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch/.minikube (perms=drwxr-xr-x)
I0107 10:43:48.719431  452773 main.go:119] libmachine: (minikube) Setting executable bit set on /home/koyuch (perms=drwxr-xr-x)
I0107 10:43:48.719446  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home/koyuch
I0107 10:43:48.719465  452773 main.go:119] libmachine: (minikube) DBG | Checking permissions on dir: /home
I0107 10:43:48.719479  452773 main.go:119] libmachine: (minikube) Creating domain...
I0107 10:43:48.719492  452773 main.go:119] libmachine: (minikube) DBG | Skipping /home - not owner
I0107 10:43:48.742937  452773 main.go:119] libmachine: (minikube) KVM machine creation complete!
I0107 10:43:48.742954  452773 client.go:168] LocalClient.Create took 728.584499ms
I0107 10:43:50.743148  452773 start.go:130] duration metric: createHost completed in 2.758167325s
I0107 10:43:50.743176  452773 start.go:81] releasing machines lock for "minikube", held for 2.758375866s
W0107 10:43:50.743413  452773 out.go:181] 😿  Failed to start kvm2 VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='f8:ec:2c:24:69:e3'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='4c:d3:da:ed:f2:60'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
😿  Failed to start kvm2 VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='f8:ec:2c:24:69:e3'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='4c:d3:da:ed:f2:60'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
I0107 10:43:50.744538  452773 out.go:119] 

W0107 10:43:50.744654  452773 out.go:181] ❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='f8:ec:2c:24:69:e3'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='4c:d3:da:ed:f2:60'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
❌  Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: creating domain: error defining domain xml: 
<domain type='kvm'>
  <name>minikube</name>
  <memory unit='MiB'>6096</memory>
  <vcpu>4</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    
  </features>
  <cpu mode='host-passthrough'/>
  <os>
    <type>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <devices>
    <disk type='file' device='cdrom'>
      <source file='/home/koyuch/.minikube/machines/minikube/boot2docker.iso'/>
      <target dev='hdc' bus='scsi'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='default' io='threads' />
      <source file='/home/koyuch/.minikube/machines/minikube/minikube.rawdisk'/>
      <target dev='hda' bus='virtio'/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='f8:ec:2c:24:69:e3'/>
      <model type='virtio'/>
    </interface>
    <interface type='network'>
      <source network='minikube-net'/>
      <mac address='4c:d3:da:ed:f2:60'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <rng model='virtio'>
      <backend model='random'>/dev/random</backend>
    </rng>
    
  </devices>
</domain>
: virError(Code=9, Domain=20, Message='operation failed: domain 'minikube' already exists with uuid 250b35a9-d2dc-4327-a646-deb3383d5e34')
W0107 10:43:50.744795  452773 out.go:181] 

W0107 10:43:50.744848  452773 out.go:181] 😿  If the above advice does not help, please let us know: 
😿  If the above advice does not help, please let us know: 
W0107 10:43:50.744905  452773 out.go:181] 👉  https://github.com/kubernetes/minikube/issues/new/choose
👉  https://github.com/kubernetes/minikube/issues/new/choose
I0107 10:43:50.744928  452773 out.go:119]

Optional: Full output of minikube logs command:

$ minikube logs       
🤷  The control plane node is not running (state=Paused)
👉  To start a cluster, run: "minikube start"
@koyuch
Copy link
Author

koyuch commented Jan 7, 2021

ok, I think I might have "solved" this, but I had to involve virsh commands (it was in paused state there..), so I had to shutdown & delete it manually: https://www.cyberciti.biz/faq/howto-linux-delete-a-running-vm-guest-on-kvm/
Weird that this isn't done when calling minikube delete (I probably didn't call minikube stop before, but I just get stuck in this paused state..)

@priyawadhwa priyawadhwa added the kind/support Categorizes issue or PR as a support question. label Jan 25, 2021
@priyawadhwa
Copy link

Hey @koyuch yah I think running those virsh commands is the only way I know of to resolve this. minikube delete should take care of it.

Has it happened since?

@priyawadhwa priyawadhwa added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jan 25, 2021
@koyuch
Copy link
Author

koyuch commented Jan 26, 2021

Hi @priyawadhwa . no this hasn't happened to me anymore, because now I try to always delete it "proper way" like this: minikube stop && minikube delete. but it would be nice if there was also some check in minikube delete which would also stop it before deleting.. (so this won't happen to anyone in the future..)

@tstromberg tstromberg added co/kvm2-driver KVM2 driver related issues kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed triage/needs-information Indicates an issue needs more information in order to work on it. kind/support Categorizes issue or PR as a support question. labels Feb 18, 2021
@prezha
Copy link
Contributor

prezha commented Mar 3, 2021

@koyuch this issue should be fixed now (in pr #10479), please let us know if it appears again

@prezha
Copy link
Contributor

prezha commented Mar 3, 2021

/assign

@prezha prezha added this to the v.1.19.0 milestone Mar 3, 2021
@prezha
Copy link
Contributor

prezha commented Mar 9, 2021

@koyuch thank you for opening this issue

we haven't heard back from you in a while, and the issue should be fixed in the recent/latest minikube version
so i'm closing this one now and if you still face the issue, please reopen it or create a new one
thank you!

/close

@k8s-ci-robot
Copy link
Contributor

@prezha: Closing this issue.

In response to this:

@koyuch thank you for opening this issue

we haven't heard back from you in a while, and the issue should be fixed in the recent/latest minikube version
so i'm closing this one now and if you still face the issue, please reopen it or create a new one
thank you!

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rkachach
Copy link

Not the same but a similar issue. I was struggling to create the minikube env because it was complaining that the mk-minikube network already exists. At the end I solved the problem y restarting libvirtd sudo service libvirtd restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kvm2-driver KVM2 driver related issues kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants