kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.31k stars 4.88k forks source link

kvm2: unable to set user and group to '65534:992' on <iso>: Success #4467

Closed sjug closed 5 years ago

sjug commented 5 years ago

The exact command to reproduce the issue:

$ sudo minikube start --vm-driver kvm2

The full output of the command that failed:

πŸ˜„  minikube v1.1.1 on linux (amd64)
πŸ”₯  Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
E0611 11:31:32.516453   27643 start.go:529] StartHost: create: Error creating machine: Error in driver during machine creation: Error creating VM: virError(Code=38, Domain=24, Message='unable to set user and group to '65534:992' on '/root/.minikube/machines/minikube/boot2docker.iso': Success')

πŸ’£  Unable to start VM: create: Error creating machine: Error in driver during machine creation: Error creating VM: virError(Code=38, Domain=24, Message='unable to set user and group to '65534:992' on '/root/.minikube/machines/minikube/boot2docker.iso': Success')

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
πŸ‘‰  https://github.com/kubernetes/minikube/issues/new

The output of the minikube logs command:

πŸ’£  command runner: getting ssh client for bootstrapper: Error creating new ssh host from driver: Error getting ssh host name for driver: host is not running

The operating system version: Linux ryzen 5.1.7-arch1-1-custom #1 SMP PREEMPT Thu Jun 6 07:40:25 EDT 2019 x86_64 GNU/Linux

sjug commented 5 years ago

Also annoyingly after it fails to create it is unable to delete...

[user@host path]$ sudo minikube delete
πŸ”₯  Deleting "minikube" from kvm2 ...

πŸ’£  Failed to delete cluster: destroying running domain: virError(Code=55, Domain=20, Message='Requested operation is not valid: domain is not running')

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
πŸ‘‰  https://github.com/kubernetes/minikube/issues/new
afbjorklund commented 5 years ago

Why sudo ? The user is normally supposed to be part of a libvirt (or libvirtd) root-equivalent group.

sjug commented 5 years ago

Same error occurs without sudo, no difference except the path.

afbjorklund commented 5 years ago

UID 65534 is nobody, so there is something wrong with the libvirt configuration.

Check /etc/libvirt/qemu.conf

# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
#dynamic_ownership = 1

Similar to https://bugs.archlinux.org/task/58894

tstromberg commented 5 years ago

FWIW, the latest kvm2 driver should handle network cleanup better. I also concur: do not use root to run minikube, it causes more problems than it's worth.

Do you mind running: virt-host-validate and groups?

tstromberg commented 5 years ago

Please confirm if setting dynamic_ownership = 0 fixes the issue, as @afbjorklund suggested.

tomncooper commented 5 years ago

I can confirm that setting dynamic_ownership = 0 fixes this issue for me.

medyagh commented 5 years ago

@sjug could you please confirm if the solution also works for you?

tstromberg commented 5 years ago

Closing as a workaround appears to have been found.

BETLOG commented 1 year ago

After some messing around I just noticed that (sans workaround) virt-manager REQUIRES the file be located in /var/lib/libvirt/images before they will not throw errors similar to OP. As a filthy casual I like to keep my VM images in userspace.