Closed bmaupin closed 1 year ago
Things I've tried:
crc delete -f
crc cleanup
rm -rf ~/.crc
This is very odd, I've just tried latest crc on an ubuntu 20.04, and I could not reproduce.
$ crc start --log-level debug
Machine does not exist. Use 'crc start' to create it
does not print any additional logs? Right after enabling its logging system, crc prints its version, it's surprising it errors out before this.
@cfergeau No, it doesn't print any additional logs at all. I found it very weird too.
I also forgot to mention, earlier this morning crc setup
was failing because I was connected to a VPN (via Cisco AnyConnect):
INFO Starting libvirt 'crc' network
Failed to start libvirt 'crc' network
exit status 1: error: Failed to start network crc
error: internal error: Network is already in use by interface cscotun0
I was also using CRC 2.10 so I upgraded to the latest version.
I'll try rebooting in case maybe the Cisco VPN client has my network in a weird state. But I find it very odd that I'm not getting any other logs
I rebooted; still stuck :confused:
Is there any other cleanup I'm missing? I've completely removed ~/.crc and reinstalled and it's still failing.
$ crc setup
INFO Using bundle path /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking crc daemon systemd service
INFO Checking crc daemon systemd socket units
INFO Checking if AppArmor is configured
INFO Checking if vsock is correctly configured
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle exists
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
$ crc start
Machine does not exist. Use 'crc start' to create it
$ crc delete -f
Machine does not exist. Use 'crc start' to create it
$ crc cleanup
INFO Removing vsock configuration
INFO Using root access: Removing udev rule in /etc/udev/rules.d/99-crc-vsock.rules
INFO Using root access: Removing vsock module autoload file /etc/modules-load.d/vhost_vsock.conf
INFO Removing 'crc' network from libvirt
INFO Removing /etc/NetworkManager/dispatcher.d/99-crc.sh file
INFO Cleaning up AppArmor configuration
INFO Using root access: Updating AppArmor configuration
INFO Using root access: Changing permissions for /etc/apparmor.d/libvirt/TEMPLATE.qemu to 644
INFO Removing crc daemon systemd socket units
INFO Removing crc daemon systemd service
INFO Removing crc's virtual machine
INFO Removing crc libvirt storage pool
INFO Removing hosts file records added by CRC
INFO Removing pull secret from the keyring
INFO Removing older logs
INFO Removing CRC Machine Instance directory
INFO Removing crc executable symlink
Cleanup finished
$ crc setup
INFO Using bundle path /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking crc daemon systemd service
INFO Setting up crc daemon systemd service
INFO Checking crc daemon systemd socket units
INFO Setting up crc daemon systemd socket units
INFO Checking if AppArmor is configured
INFO Updating AppArmor configuration
INFO Using root access: Updating AppArmor configuration
INFO Using root access: Changing permissions for /etc/apparmor.d/libvirt/TEMPLATE.qemu to 644
INFO Checking if vsock is correctly configured
INFO Setting up vsock support
INFO Using root access: Setting CAP_NET_BIND_SERVICE capability for /home/user/bin/crc executable
INFO Using root access: Creating udev rule for /dev/vsock
INFO Using root access: Changing permissions for /etc/udev/rules.d/99-crc-vsock.rules to 644
INFO Using root access: Reloading udev rules database
INFO Using root access: Loading vhost_vsock kernel module
INFO Using root access: Creating file /etc/modules-load.d/vhost_vsock.conf
INFO Using root access: Changing permissions for /etc/modules-load.d/vhost_vsock.conf to 644
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle exists
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
$ crc start
Machine does not exist. Use 'crc start' to create it
I was also using CRC 2.10 so I upgraded to the latest version.
@bmaupin did that 2.10 version work as expected on same host? can you check with sudo virsh list --all
?
did that 2.10 version work as expected on same host?
@praveenkumar It worked a while back but when I tried it again last week it didn't work, which is why I upgraded to 2.14.
can you check with
sudo virsh list --all
?
$ sudo virsh list --all
Id Name State
----------------------------
- minishift shut off
Is this after crc delete
? Or right after a failed crc start
?
@cfergeau I'm sorry, I don't understand the quesiton. Does this help?
$ sudo virsh list --all
Id Name State
----------------------------
- minishift shut off
$ crc delete
Machine does not exist. Use 'crc start' to create it
$ sudo virsh list --all
Id Name State
----------------------------
- minishift shut off
$ crc setup
INFO Using bundle path /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking crc daemon systemd service
INFO Checking crc daemon systemd socket units
INFO Checking if AppArmor is configured
INFO Checking if vsock is correctly configured
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle exists
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
$ crc start
Machine does not exist. Use 'crc start' to create it
$ sudo virsh list --all
Id Name State
----------------------------
- minishift shut off
It does not help solve your issue, but makes it clear when you ran virsh, thanks!
This got me thinking that maybe minishift was conflicting with CRC, so I ran minishift delete
to clean it up:
$ minishift status
Minishift: Stopped
Profile: minishift
OpenShift: Stopped
DiskUsage: Unknown
CacheUsage: 1.711 GB (used by oc binary, ISO or cached images)
$ ls ~/.minishift/machines/minishift
boot2docker.iso config.json id_rsa id_rsa.pub minishift.img
$ minishift delete
You are deleting the Minishift VM: 'minishift'. Do you want to continue [y/N]?: y
Removing entries from kubeconfig for cluster: :8443
Deleting the Minishift VM...
Minishift VM deleted.
$ sudo virsh list --all
Id Name State
--------------------
Unfortunately CRC still won't start:
$ crc start
Machine does not exist. Use 'crc start' to create it
$ rm -rf ~/.minishift/
$ crc setup
INFO Using bundle path /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle
INFO Checking if running as non-root
INFO Checking if running inside WSL2
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
INFO Checking if Virtualization is enabled
INFO Checking if KVM is enabled
INFO Checking if libvirt is installed
INFO Checking if user is part of libvirt group
INFO Checking if active user/process is currently part of the libvirt group
INFO Checking if libvirt daemon is running
INFO Checking if a supported libvirt version is installed
INFO Checking if crc-driver-libvirt is installed
INFO Checking crc daemon systemd service
INFO Checking crc daemon systemd socket units
INFO Checking if AppArmor is configured
INFO Checking if vsock is correctly configured
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /home/user/.crc/cache/crc_libvirt_4.12.5_amd64.crcbundle exists
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
$ crc start
Machine does not exist. Use 'crc start' to create it
(I also ran crc delete -f
and crc cleanup
again just in case)
I'm an idiot :facepalm:
I ran crc start
while tailing ~/.crc/crc.log
and I noticed this:
time="2023-03-21T14:21:31-04:00" level=debug msg="Running 'crc delete'"
time="2023-03-21T14:21:31-04:00" level=debug msg="Checking file: /home/user/.crc/machines/crc/.crc-exist"
I thought it was weird that it said Running 'crc delete'
until I remembered that I'd added this to my ~/.bashrc to work around this other issue: https://github.com/crc-org/crc/issues/3414
crc() {
if [ "$1" == "start" ]; then
crc delete -f && crc cleanup && crc setup && command crc "$@" --log-level debug
else
command crc "$@"
fi
}
Eh :( Great that you finally figured it out! (and I'm even more glad it's not an obscure crc bug ;)
General information
crc setup
before starting it (Yes/No)? YesCRC version
CRC status
CRC config
Host Operating System
Steps to reproduce
crc setup
crc start
Expected
I expected
crc start
to start CRCActual
Logs
Before gather the logs try following if that fix your issue
Please consider posting the output of
crc start --log-level debug
on http://gist.github.com/ and post the link in the issue.