Skip to content
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

[BUG] Error getting MAC address from UUID on macOS with hyperkit #882

Closed
arthurbarr opened this issue Dec 10, 2019 · 50 comments
Closed

[BUG] Error getting MAC address from UUID on macOS with hyperkit #882

arthurbarr opened this issue Dec 10, 2019 · 50 comments
Assignees
Labels
kind/bug Something isn't working kind/documentation Documentation issues. status/need more information Issue needs more information before it will be looked at status/stale Issue went stale; did not receive attention or no reply from the OP

Comments

@arthurbarr
Copy link

General information

  • OS: macOS
  • Hypervisor: hyperkit
  • Did you run crc setup before starting it? Yes

CRC version

# Put `crc version` output here

CRC status

Machine 'crc' does not exist. Use 'crc start' to create it.

CRC config

Host Operating System

ProductName:	Mac OS X
ProductVersion:	10.15.1
BuildVersion:	19B88

Steps to reproduce

  1. crc start

Expected

CRC to start

Actual

CRC fails with following error:

ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1 

Logs

crc start -p ~/Downloads/pull-secret --log-level debug    
DEBU Unable to find out if a new version is available: Get https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/release-info.json: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 
INFO Checking if running as non-root              
INFO Checking if oc binary is cached              
DEBU oc binary already cached                     
INFO Checking if HyperKit is installed            
DEBU Checking if hyperkit is installed            
INFO Checking if crc-driver-hyperkit is installed 
DEBU Checking if crc-driver-hyperkit is installed 
DEBU crc-driver-hyperkit is already installed in /Users/arthurbarr/.crc/bin/crc-driver-hyperkit 
INFO Checking file permissions for /etc/resolver/testing 
INFO Checking file permissions for /etc/hosts     
Checking file: /Users/arthurbarr/.crc/machines/crc/.crc-exist
INFO Loading bundle: crc_hyperkit_4.2.8.crcbundle ... 
INFO Creating CodeReady Containers VM for OpenShift 4.2.8... 
Found binary path at /Users/arthurbarr/.crc/bin/crc-driver-hyperkit
Launching plugin server for driver hyperkit
Plugin server listening at address 127.0.0.1:63732
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(crc) Calling .GetMachineName
(crc) Calling .DriverName
Running pre-create checks...
(crc) Calling .PreCreateCheck
(crc) DBG | exe=/Users/arthurbarr/.crc/bin/crc-driver-hyperkit uid=0
(crc) Calling .GetConfigRaw
Creating machine...
(crc) Calling .Create
(crc) DBG | exe=/Users/arthurbarr/.crc/bin/crc-driver-hyperkit uid=0
(crc) Downloading /Users/arthurbarr/.crc/cache/crc.disk from file:///Users/arthurbarr/.crc/cache/crc_hyperkit_4.2.8/crc.qcow2...
(crc) DBG | exe=/Users/arthurbarr/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | clean start, hyperkit pid file doesn't exist: /Users/arthurbarr/.crc/machines/crc/hyperkit.pid
(crc) DBG | Using hyperkit binary from /Users/arthurbarr/.crc/bin/hyperkit
(crc) DBG | Using UUID c3d68012-0208-11ea-9fd7-f2189899ab08
(crc) DBG | virtio_net: Could not create vmnet interface, permission denied or no entitlement?
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1 
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary
(crc) DBG | Closing plugin on server side
@arthurbarr arthurbarr added the kind/bug Something isn't working label Dec 10, 2019
@praveenkumar
Copy link
Member

@arthurbarr Looks like you hit kubernetes/minikube#5594 one, can you try to do following and let us know if that works?

$ crc delete
$ cd ~/.crc/bin
$ rm hyperkit
$ curl -L -O https://686-55985023-gh.circle-artifacts.com/0/hyperkit
$ chmod +x hyperkit
$ sudo chown root:wheel hyperkit 
$ sudo chmod u+s hyperkit

$ ./hyperkit version
hyperkit: v0.20190802-3-g3b296c

$ crc start --log-level debug

@praveenkumar praveenkumar added the status/need more information Issue needs more information before it will be looked at label Dec 13, 2019
@snowch
Copy link

snowch commented Dec 17, 2019

$ crc version
crc version: 1.2.0+c2e3c0f
OpenShift version: 4.2.8 (embedded in binary)

$ crc delete
Machine 'crc' does not exist. Use 'crc start' to create it.
$ cd ~/.crc/bin
$ rm hyperkit
override rwsr-xr-x  root/wheel for hyperkit? y
$ curl -L -O https://686-55985023-gh.circle-artifacts.com/0/hyperkit
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4176k    0 4176k    0     0  1320k      0 --:--:--  0:00:03 --:--:-- 1320k
$ chmod +x hyperkit
$ sudo chown root:wheel hyperkit
Password:
$ sudo chmod u+s hyperkit
$ ./hyperkit -v
hyperkit: v0.20190802-3-g3b296c

Homepage: https://github.com/docker/hyperkit
License: BSD

$ crc start --log-level debug
DEBU No new version available. The latest version is 1.2.0
INFO Checking if running as non-root
INFO Checking if oc binary is cached
DEBU oc binary already cached
INFO Checking if HyperKit is installed
DEBU Checking if hyperkit is installed
INFO Checking if crc-driver-hyperkit is installed
DEBU Checking if crc-driver-hyperkit is installed
DEBU crc-driver-hyperkit is already installed in /Users/christophersnow/.crc/bin/crc-driver-hyperkit
INFO Checking file permissions for /etc/resolver/testing
INFO Checking file permissions for /etc/hosts
Checking file: /Users/christophersnow/.crc/machines/crc/.crc-exist
? Image pull secret [? for help] *********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************INFO Loading bundle: crc_hyperkit_4.2.8.crcbundle ... ********************************************************************************************WARN Bundle certificates are going to expire in 5 days, better to use new release ****************************************************************INFO Creating CodeReady Containers VM for OpenShift 4.2.8... *************************************************************************************Found binary path at /Users/christophersnow/.crc/bin/crc-driver-hyperkit**************************************************************************Launching plugin server for driver hyperkit*******************************************************************************************************Plugin server listening at address 127.0.0.1:60799************************************************************************************************() Calling .GetVersion****************************************************************************************************************************Using API Version  1******************************************************************************************************************************() Calling .SetConfigRaw**************************************************************************************************************************() Calling .GetMachineName************************************************************************************************************************(crc) Calling .GetMachineName*********************************************************************************************************************(crc) Calling .DriverName*************************************************************************************************************************Running pre-create checks...**********************************************************************************************************************(crc) Calling .PreCreateCheck*********************************************************************************************************************(crc) DBG | exe=/Users/christophersnow/.crc/bin/crc-driver-hyperkit uid=0*************************************************************************(crc) Calling .GetConfigRaw***********************************************************************************************************************Creating machine...
(crc) Calling .Create
(crc) DBG | exe=/Users/christophersnow/.crc/bin/crc-driver-hyperkit uid=0
(crc) Downloading /Users/christophersnow/.crc/cache/crc.disk from file:///Users/christophersnow/.crc/cache/crc_hyperkit_4.2.8/crc.qcow2...
(crc) DBG | exe=/Users/christophersnow/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | clean start, hyperkit pid file doesn't exist: /Users/christophersnow/.crc/machines/crc/hyperkit.pid
(crc) DBG | Using hyperkit binary from /Users/christophersnow/.crc/bin/hyperkit
(crc) DBG | Using UUID c3d68012-0208-11ea-9fd7-f2189899ab08
(crc) DBG | virtio_net: Could not create vmnet interface, permission denied or no entitlement?
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1
Making call to close driver server
(crc) Calling .Close
(crc) DBG | Closing plugin on server side
Successfully made call to close driver server
Making call to close connection to plugin binary

@arthurbarr
Copy link
Author

Is https://686-55985023-gh.circle-artifacts.com/0/hyperkit a custom build of hyperkit? Or a nightly build? My spidey-sense is tingling just thinking about about running a random binary on my machine.

@rlangbehn
Copy link

Anything new on this issue? I have exactly the same error.

@praveenkumar
Copy link
Member

a custom build of hyperkit? Or a nightly build?

@arthurbarr This is the build artifact of moby/hyperkit#263 one if you check the details for circleCI it will take you to the circleCI UI, here you can check the artifact tab after login.

@cfergeau
Copy link
Contributor

cfergeau commented Jan 7, 2020

@rlangbehn You can also follow the suggestion from #882 (comment) and tell us if it helps.

@marchmallow
Copy link

I am hitting the same with Max OS Catalina version 10.15.3 and latest crc version downloaded from RedHat developer site:

$ ./crc version
crc version: 1.5.0+e1c8fb8
OpenShift version: 4.2.14 (embedded in binary)

$ ./crc start --pull-secret-file ./pull-secret.txt 
INFO Checking if oc binary is cached              
INFO Checking if running as non-root              
INFO Checking if HyperKit is installed            
INFO Checking if crc-driver-hyperkit is installed 
INFO Checking file permissions for /etc/resolver/testing 
INFO Checking file permissions for /etc/hosts     
INFO Extracting bundle: crc_hyperkit_4.2.14.crcbundle ... 
INFO Creating CodeReady Containers VM for OpenShift 4.2.14-x86_64... 
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1 

@marchmallow
Copy link

Comment above mentions issue moby/hyperkit#263 but that has been merged 3 months ago and I am on latest patch level of Mac OS, but realised my version of hyperkit failry outdated:

hyperkit -v
hyperkit: v0.20180403-36-ge3b37f

Moved to latest available from brew:

hyperkit -v
hyperkit: 0.20190802

And cleaned up/tried again but yet failing with the same:

$ rm -fr  ~/.crc
$ ./crc setup
INFO Checking if oc binary is cached              
INFO Caching oc binary                            
INFO Checking if CRC bundle is cached in '$HOME/.crc' 
INFO Unpacking bundle from the CRC binary         
INFO Checking if running as non-root              
INFO Checking if HyperKit is installed            
INFO Setting up virtualization with HyperKit      
INFO Will use root access: change ownership of /Users/gallomas/.crc/bin/hyperkit 
Password:
INFO Will use root access: set suid for /Users/gallomas/.crc/bin/hyperkit 
INFO Checking if crc-driver-hyperkit is installed 
INFO Installing crc-machine-hyperkit              
INFO Will use root access: change ownership of /Users/gallomas/.crc/bin/crc-driver-hyperkit 
INFO Will use root access: set suid for /Users/gallomas/.crc/bin/crc-driver-hyperkit 
INFO Checking file permissions for /etc/resolver/testing 
INFO Checking file permissions for /etc/hosts     
Setup is complete, you can now run 'crc start' to start the OpenShift cluster
$ ./crc start --pull-secret-file ./pull-secret.txt 
INFO Checking if oc binary is cached              
INFO Checking if running as non-root              
INFO Checking if HyperKit is installed            
INFO Checking if crc-driver-hyperkit is installed 
INFO Checking file permissions for /etc/resolver/testing 
INFO Checking file permissions for /etc/hosts     
INFO Extracting bundle: crc_hyperkit_4.2.14.crcbundle ... 
INFO Creating CodeReady Containers VM for OpenShift 4.2.14-x86_64... 
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1 

@marchmallow
Copy link

So guess need to rebuild hyperkit from latest master.. but now I am getting afraid of messing up my docker install since hyperkit is supposedly a core component for it

@cfergeau
Copy link
Contributor

cfergeau commented Feb 3, 2020

Can you try the steps from #882 (comment) ? This will not impact your system-wide hyperkit install.

@marchmallow
Copy link

Ok yes I did not realize that comment points to just replace the hyperkit within ~/.crc/bin, so tried and failed again:

$ curl -L -O https://686-55985023-gh.circle-artifacts.com/0/hyperkit
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4176k    0 4176k    0     0  2957k      0 --:--:--  0:00:01 --:--:-- 2955k
$ chmod +x hyperkit
$ sudo chown root:wheel hyperkit 
$ sudo chmod u+s hyperkit

$ ls -la
total 192584
drwxr-x---  5 gallomas  staff       160  3 Feb 17:11 .
drwxr-x---  6 gallomas  staff       192  3 Feb 17:10 ..
-rwsr-xr-x  1 root      wheel  11794380  3 Feb 17:10 crc-driver-hyperkit
-rwsr-xr-x  1 root      wheel   4276480  3 Feb 17:11 hyperkit
-r-x------  1 gallomas  staff  82523984  3 Feb 17:10 oc
$ ./hyperkit -v
hyperkit: v0.20190802-3-g3b296c

Start command failed:

$ ./crc start --log-level debug --pull-secret-file ./pull-secret.txt 
DEBU No new version available. The latest version is 1.5.0 
INFO Checking if oc binary is cached              
DEBU oc binary already cached                     
INFO Checking if running as non-root              
INFO Checking if HyperKit is installed            
DEBU Checking if hyperkit is installed            
INFO Checking if crc-driver-hyperkit is installed 
DEBU Checking if crc-driver-hyperkit is installed 
DEBU crc-driver-hyperkit is already installed in /Users/gallomas/.crc/bin/crc-driver-hyperkit 
INFO Checking file permissions for /etc/resolver/testing 
INFO Checking file permissions for /etc/hosts     
Checking file: /Users/gallomas/.crc/machines/crc/.crc-exist
INFO Extracting bundle: crc_hyperkit_4.2.14.crcbundle ... 
DEBU Uncompressing /Users/gallomas/.crc/cache/crc_hyperkit_4.2.14.crcbundle to /Users/gallomas/.crc/cache 
INFO Creating CodeReady Containers VM for OpenShift 4.2.14-x86_64... 
Found binary path at /Users/gallomas/.crc/bin/crc-driver-hyperkit
Launching plugin server for driver hyperkit
Plugin server listening at address 127.0.0.1:61016
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(crc) Calling .GetMachineName
(crc) Calling .DriverName
Running pre-create checks...
(crc) Calling .PreCreateCheck
(crc) DBG | exe=/Users/gallomas/.crc/bin/crc-driver-hyperkit uid=0
(crc) Calling .GetConfigRaw
Creating machine...
(crc) Calling .Create
(crc) DBG | exe=/Users/gallomas/.crc/bin/crc-driver-hyperkit uid=0
(crc) Downloading /Users/gallomas/.crc/cache/crc.disk from file:///Users/gallomas/.crc/cache/crc_hyperkit_4.2.14/crc.qcow2...
(crc) DBG | exe=/Users/gallomas/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | clean start, hyperkit pid file doesn't exist: /Users/gallomas/.crc/machines/crc/hyperkit.pid
(crc) DBG | Using hyperkit binary from /Users/gallomas/.crc/bin/hyperkit
(crc) DBG | Using UUID c3d68012-0208-11ea-9fd7-f2189899ab08
(crc) DBG | virtio_net: Could not create vmnet interface, permission denied or no entitlement?
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1 
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary

@marchmallow
Copy link

Do I need to download a different version of crc-driver-hyperkit too?

@gbraad
Copy link
Contributor

gbraad commented Feb 4, 2020

crc-driver-hyperkit drivers are bound to the version of CRC. they act as an intermediate between the actual hyperkit binary and CRC. @cfergeau perhaps something caused by macOS Catalina updates that causes hyperkit to fail?

@cfergeau
Copy link
Contributor

cfergeau commented Feb 4, 2020

This is what moby/hyperkit#263 says, assuming it's the same issue.

@gbraad
Copy link
Contributor

gbraad commented Feb 4, 2020

that is something that came back from quite a while ago when @praveenkumar and I discussed this. perhaps we need to make crc-driver-hyperkit enforce a minimum version... much higher than 2018 as is now the case.

@cfergeau
Copy link
Contributor

cfergeau commented Feb 4, 2020

Looking more closely at the logs/code, this macos issue may not be hyperkit-related after all (?) https://github.com/code-ready/machine-driver-hyperkit/blob/master/pkg/hyperkit/driver.go#L218 if you look at the logs, this fails between log.Debugf("Using UUID %s", h.UUID) and log.Debugf("Generated MAC %s", mac), more specifically at mac, err := GetMACAddressFromUUID(h.UUID), which leads to https://github.com/zchee/go-vmnet/blob/master/vmnet.go

@cfergeau
Copy link
Contributor

cfergeau commented Feb 4, 2020

I've put a small binary which should exhibit the problem at https://teuf.fedorapeople.org/vmnet.tar.gz. Unpack, and run sudo vmnet/vmnet, and check if it errors out or print a mac address. Alternatively vmnet/vmnet.c has some instruction regarding how to rebuild vmnet/vmnet binary.
On my system, it was failing when hyperkit was already running, but after stopping it, it gives me a mac address:

$ sudo vmnet/vmnet
Password:
mac: 0e:f0:e3:c7:4f:be

@marchmallow
Copy link

So I tried and hit the issue indeed:

$ sudo ./vmnet
virtio_net: Could not create vmnet interface, permission denied or no entitlement?
iface: 0x7fe30d802800 iface_status: 1001
get_mac_address_from_uuid failed

Then I restarted docker to get it to restart the docker bound hyperkit and also killed the hyperkit process spinned up from crc/bin and then vmnet gets the MAC address:

$ ps -ef|grep hyperkit
0  7984     1   0 Mon10am ttys004    4:04.50 /Users/gallomas/.crc/bin/hyperkit  .....
501  3296  3264   0 Fri06am ??        90:44.29 com.docker.hyperkit -A -u -F vms/0/hyperkit.pid  ....

kill -9 7984

$ ps -ef|grep hyperkit
  501 24912 24906   0  9:46am ??         0:13.40 com.docker.hyperkit .....

$ sudo ./vmnet
mac: 0e:f0:e3:c7:4f:be

Is there any workaround to get crc to work or need to wait for Mac OS updates then?

@cfergeau
Copy link
Contributor

cfergeau commented Feb 6, 2020

I'm a bit confused by these hyperkit processes which are running. Why was there a crc hyperkit process running? I thought crc start failed? Was the docker bound hyperkit causing vmnet to fail until restarted?
I suspect this vmnet invocation will fail when a hyperkit instance is already running

@marchmallow
Copy link

So one of the hyperkit processes is owned by docker desktop, the other one was left over from the failed crc start attempt.. I did not think of checking this and kill it before trying to rerun start with the newer hyperkit binary copied in ~/.crc/bin earlier one, but just done that now and turns out it finally works!!

INFO Starting OpenShift cluster ... [waiting 3m]  
DEBU NAME        AGE     REQUESTOR                                                                   CONDITION
csr-4q6hq   7d8h    system:node:crc-q4zfq-master-0                                              Approved,Issued
csr-9r9mz   2m28s   system:node:crc-q4zfq-master-0                                              Pending
csr-j598d   7d9h    system:serviceaccount:openshift-machine-config-operator:node-bootstrapper   Approved,Issued
csr-jfjs2   7d9h    system:node:crc-q4zfq-master-0                                              Approved,Issued
csr-lrtqp   7d8h    system:serviceaccount:openshift-machine-config-operator:node-bootstrapper   Approved,Issued
csr-slmt9   4m      system:node:crc-q4zfq-master-0                                              Pending 
DEBU Approving csr csr-9r9mz                      
DEBU Approving csr csr-slmt9                      
INFO                                              
INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions 
INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443' 
INFO To login as an admin, run 'oc login -u kubeadmin -p ***** https://api.crc.testing:6443' 
INFO                                              
INFO You can now run 'crc console' and use these credentials to access the OpenShift web console 
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
(crc) DBG | Closing plugin on server side
Making call to close connection to plugin binary
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
(crc) DBG | Closing plugin on server side
Making call to close connection to plugin binary
Started the OpenShift cluster
WARN The cluster might report a degraded or error state. This is expected since several operators have been disabled to lower the resource usage. For more information, please consult the documentation 

$ ./crc status
CRC VM:          Running
OpenShift:       Stopped
Disk Usage:      10.11GB of 32.2GB (Inside the CRC VM)
Cache Usage:     12.13GB
Cache Directory: /Users/gallomas/.crc/cache

@cfergeau
Copy link
Contributor

cfergeau commented Feb 6, 2020

Great to know! Could you do one last test, move away ~/.crc/bin/hyperkit, run crc setup, and try crc start again to see if this keeps failing? If it fails, I'd be interested in the log, and in knowing if there's an hyperkit process still alive.

@marchmallow
Copy link

I tried but could not repro the error anymore, did the following:

crc stop
crc delete
change name of ~/.crc/bin/hyperkit
crc setup
crc start 
crc stop
crc delete
rm -fr ~/.crc
crc setup
crc start

And it worked both times. Now fairly puzzled..

@marchmallow
Copy link

Maybe the first time I updated hyperkit with brew the failure was caused by the leftover hyperkit process and subsequent errors have been due to that all along.. have not really restarted my Mac since

@cfergeau
Copy link
Contributor

cfergeau commented Feb 7, 2020

leftover hyperkit process can probably happen and cause these issues... We probably should check more carefully for its presence. Thanks for the additional testing!
Could the other persons who were having this issue check if they have an hyperkit process running in the background?

@praveenkumar
Copy link
Member

@marchmallow If it possible can you run docker for Mac first and then run crc to see if it is reproducible? We just want to be sure is it because of any hyperkit process or just the one which leftover (zombie one)?

@jeyaramashok
Copy link

I had the same issue today, I followed the steps in #882 (comment), but had the same error.

after reading other comments here, I restarted my macOS, followed by

$ rm ~/.crc
$ crc setup
$ crc start

worked for me.

I was also running into this same issues, which the crc start stuck trying to SSH for long time #1033. But it got fixed somehow I don't see it happening now.

@EnriqueL8
Copy link

I had the same issue - old hyperkit process was causing the problem as the comment mentioned. Killing that process, rm -r ~/crc, crc setup and crc start worked!

@stale
Copy link

stale bot commented May 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label May 23, 2020
@cfergeau cfergeau removed the status/stale Issue went stale; did not receive attention or no reply from the OP label May 25, 2020
@mayankhacharya
Copy link

Hello guys, I am trying to install CRC on MacOs Catalina (10.15.4). However, I have received the following error after doing ./crc setup and then ./crc start

(crc) Calling .GetConfigRaw
Creating machine...
(crc) Calling .Create
(crc) DBG | exe=/Users/USERNAME/.crc/bin/crc-driver-hyperkit uid=0 (crc) Downloading /Users/USERNAME/.crc/cache/crc.disk from file:///Users/USERNAME/.crc/cache/crc_hyperkit_4.4.3/crc.qcow2...
(crc) DBG | exe=/Users/USERNAME/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | clean start, hyperkit pid file doesn't exist: /Users/USERNAME/.crc/machines/crc/hyperkit.pid
(crc) DBG | Using hyperkit binary from /Users/USERNAME/.crc/bin/hyperkit
(crc) DBG | Using UUID **SOME BIG UUID NUMBER**
(crc) DBG | virtio_net: Could not create vmnet interface, permission denied or no entitlement?
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary
(crc) DBG | Closing plugin on server side

I run above commands after stopping docker desktop too but the issue is still the same.

I run the steps mentioned at #882 (comment)
but I received following message.
./hyperkit: line 1: Artifact: command not found

Can anyone please help me to resolve it? :)

@Aenima4six2
Copy link

Aenima4six2 commented May 29, 2020

Hello guys, I am trying to install CRC on MacOs Catalina (10.15.4). However, I have received the following error after doing ./crc setup and then ./crc start

(crc) Calling .GetConfigRaw
Creating machine...
(crc) Calling .Create
(crc) DBG | exe=/Users/USERNAME/.crc/bin/crc-driver-hyperkit uid=0 (crc) Downloading /Users/USERNAME/.crc/cache/crc.disk from file:///Users/USERNAME/.crc/cache/crc_hyperkit_4.4.3/crc.qcow2...
(crc) DBG | exe=/Users/USERNAME/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | clean start, hyperkit pid file doesn't exist: /Users/USERNAME/.crc/machines/crc/hyperkit.pid
(crc) DBG | Using hyperkit binary from /Users/USERNAME/.crc/bin/hyperkit
(crc) DBG | Using UUID **SOME BIG UUID NUMBER**
(crc) DBG | virtio_net: Could not create vmnet interface, permission denied or no entitlement?
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1
Making call to close driver server
(crc) Calling .Close
Successfully made call to close driver server
Making call to close connection to plugin binary
(crc) DBG | Closing plugin on server side

I run above commands after stopping docker desktop too but the issue is still the same.

I run the steps mentioned at #882 (comment)
but I received following message.
./hyperkit: line 1: Artifact: command not found

Can anyone please help me to resolve it? :)

Also getting the same issue as @mayankhacharya.

Updated to Catalina 10.15.5 (19F96)
Pullled hyperkit from source and re-compiled. Still getting the same issue

cd ~/projects
git clone https://github.com/moby/hyperkit
cd hyperkit
make
mv build/hyperkit ~/.crc/bin
chmod +x hyperkit
sudo chown root:wheel hyperkit 
sudo chmod u+s hyperkit
crc start

...
ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: getting MAC address from UUID: vmnet: error from vmnet.framework: -1

@Aenima4six2
Copy link

I solved the issue on my machine. I disabled "Internet Sharing" and the issue is no longer present.

@mayankhacharya
Copy link

@Aenima4six2 "Internet Sharing" option has been disabled on my machine. I still have the issue.

@praveenkumar
Copy link
Member

@mayankhacharya I highly doubt this issue because of internet sharing can you check #882 (comment) one looks like you might have a hyperkit process which own by crc so better to kill it before start.

Provide following output of the ps command

$ ps aux | grep hyperkit

@mayankhacharya
Copy link

@praveenkumar Now I am getting following error after implementing your suggestion from the comment. internet sharing option is disabled on MacBook already.

(crc) DBG | Starting with cmdline: BOOT_IMAGE=(hd0,gpt1)/ostree/rhcosec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f39e39cada/vmlinuz-4.18.0147.8.1.el8_1.x86_64 rhcos.root=crypt_rootfs console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu rd.luks.options=discard ostree=/ostree/boot.1/rhcos/ec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f9e39cada/0
(crc) DBG | Error trying to execute /Users/mayankhacharya/.crc/bin/hyperkit -A -u -F /Users/mayankhacharya/.crc/machines/crc/hyperkit.pid -c 4 -m 9216M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-net -U c3d68012-0208-11ea-9fd7-f2189899ab08 -s 2:0,virtioblk,file:///Users/mayankhacharya/.crc/machines/crc/crc.disk,format=qcow -s 3,virtio-rnd -l com1,autopty=/Users/mayankhacharya/.crc/machines/crc/tty,log=/Users/mayankhacharya/.crcmachines/crc/console-ring -f kexec,/Users/mayankhacharya/.crc/cache/crc_hyperkit_4.4.3/vmlinuz-4.18.0147.8.1.el8_1.x86_64,/Users/mayankhacharya/.crc/cache/crc_hyperkit_4.4.3/initramfs-4.18.0147.8.1.el8_1.x86_64.img,earlyprintk=serial BOOT_IMAGE=(hd0,gpt1)/ostree/rhcosec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f39e3cada/vmlinuz-4.18.0-147.8.1.el8_1.x86_64 rhcos.root=crypt_rootfs console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu rd.luks.options=discard ostree=/ostree/boot.1/rhcos/ec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f39e39cada/0 ERRO Error creating host: Error creating the VM: Error creating machine: Error in driver during machine creation: starting with cmd line: BOOT_IMAGE=(hd0,gpt1)/ostree/rhcos ec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f39e39cada/vmlinuz-4.18.0147.8.1.el8_1.x86_64 rhcos.root=crypt_rootfs console=tty0 console=ttyS0,115200n8 ignition.platform.id=qemu rd.luks.options=discard ostree=/ostree/boot.1/rhcos/ec6f097d71f19d2713779aeb6d2296122dec138ffa31e2fd0a15a0f9e39cada/0: fork/exec /Users/mayankhacharya/.crc/bin/hyperkit: exec format error
Making call to close driver server

@Aenima4six2
Copy link

Aenima4six2 commented May 30, 2020

@mayankhacharya I highly doubt this issue because of internet sharing can you check #882 (comment) one looks like you might have a hyperkit process which own by crc so better to kill it before start.

Provide following output of the ps command

$ ps aux | grep hyperkit

Thanks for the disregard bro. The suggestion to disable internet sharing came from feedback on the minikube github issue you referenced, and it worked for me.

kubernetes/minikube#5594 (comment)

kubernetes/minikube#5594 (comment)

@Aenima4six2
Copy link

@Aenima4six2 "Internet Sharing" option has been disabled on my machine. I still have the issue.

Sorry it didn’t help you. Do you have docker for Mac installed ?

@gbraad
Copy link
Contributor

gbraad commented May 30, 2020 via email

@mayankhacharya
Copy link

@Aenima4six2 Yes I do have docker on mac but before running this setup, I stopped it.

@gbraad I executed those steps mentioned in comment and then I received the above error.

@gbraad
Copy link
Contributor

gbraad commented May 30, 2020

$ ls -al ~/.crc/bin

@mayankhacharya
Copy link

mayankhacharya commented May 30, 2020

@gbraad I fixed the above-mentioned error. This URL https://686-55985023-gh.circle-artifacts.com/0/hyperkit doesn't work anymore. I can't find any artifacts from there. As a workaround, I copied the latest version of hyperkit binary from my mac and placed it inside this directory to test.
I have hyperkit version v0.20200224-18-gf1dd3c

Now I am getting below error.
(crc) DBG | hyperkit pid from json: 8274
(crc) DBG | Searching for MAC_ADDRESS in /var/db/dhcpd_leases ...
(crc) DBG | error: Temporary Error: open /var/db/dhcpd_leases: no such file or directory - sleeping 2s
(crc) DBG | retry loop 36
(crc) DBG | exe=/Users/USERNAME/.crc/bin/crc-driver-hyperkit uid=0
(crc) DBG | hyperkit pid from json: 8274
(crc) DBG | Searching for MAC_ADDRESS in /var/db/dhcpd_leases ...
(crc) DBG | error: Temporary Error: open /var/db/dhcpd_leases: no such file or directory - sleeping 2s

Before running the execution, I have verified that there wasn't any process running with hyperkit.

I have verified many times that my internet sharing is off in my macbook.

@gbraad
Copy link
Contributor

gbraad commented May 30, 2020

Where did you get the binary from? They are included in our release as they are specific to crc as we modified them. I am now confused about the steps you took to make it work. I asked for the ls to confirm the size and flags.

A simple 'setup', 'start' is all that is needed to get the dependencies and environment working.

Please perform a clean and delete or the crc/bin folder and run setup. After this report back what start does and if failing m share the info about the used binaries.

@mayankhacharya
Copy link

@gbraad I followed the documentation when I was installing crc first time. But then I got some issue and after searching on google, I ended up at this ticket.

Based on your suggestion in the last comment, I followed the following steps.
crc cleanup
rm -rf ~/.crc
crc setup
crc start --log-level debug

After doing all this, I received again the same error log mentioned in comment

Before running above steps, I manually checked that there wasn't any process running with hyperkit and my internet sharing is switched off already.

@praveenkumar
Copy link
Member

Thanks for the disregard bro. The suggestion to disable internet sharing came from feedback on the minikube github issue you referenced, and it worked for me.

@Aenima4six2 I said, I highly doubt not disregarded, Thanks for sharing the issue reference 👍

@Aenima4six2
Copy link

Aenima4six2 commented Jun 2, 2020

@gbraad I followed the documentation when I was installing crc first time. But then I got some issue and after searching on google, I ended up at this ticket.

Based on your suggestion in the last comment, I followed the following steps.
crc cleanup
rm -rf ~/.crc
crc setup
crc start --log-level debug

After doing all this, I received again the same error log mentioned in comment

Before running above steps, I manually checked that there wasn't any process running with hyperkit and my internet sharing is switched off already.

I got the issue again, but on a different version of crc (v1.8.0), after a downgrade from latest since there are cert renewal issues. I installed the latest hyperkit from hombrew and I got past the issue. Not sure if it will work for you, but worth a shot.

brew uninstall hyperkit
rm $(which hyperkit)
brew install hyperkit

rm ~/.crc/bin/hyperkit
ln -s /usr/local/bin/hyperkit ~/.crc/bin/hyperkit
(cd ~/.crc/bin && sudo chown root:wheel hyperkit  && sudo chmod u+s hyperkit && chmod +x hyperkit)

sudo pkill hyperkit
crc start

Of particular interest, I found that if I didn't kill any existing hyperkit process, the issue was still present.

@mayankhacharya
Copy link

@Aenima4six2 I tried your mentioned steps. I downgraded crc version to 1.6.0 and used latest version of hyperkit.

I am still getting this error
Temporary Error: open /var/db/dhcpd_leases: no such file or directory
Temporary Error: open /var/db/dhcpd_leases: no such file or directory

@praveenkumar
Copy link
Member

@mayankhacharya can you try kubernetes/minikube#4206 (comment) (also check other comments) and also kubernetes/minikube#6143 one, try to use the latest version of crc.

@lsalotto-ingenia
Copy link

Just to mention that somehow I got this issue in version 1.11.0 but got past it with Aenima4six2's comment

@jaysonwor
Copy link

I was running into the same issues. Turned out had nothing to do with either bootp or internet sharing, and was due to the fact the mac firewall was enabled. Once I disabled the FW the hyperkit issue was resolved on minikube: kubernetes/minikube#8287

To get it working in crc I had to do a few additional things:

  • ./crc start led to: virtio_net: Could not create vmnet interface, permission denied or no entitlement?
  • this was resolved by copying latest hyperkit from my local (e.g /usr/local/bin/hyperkit) to .crc, and also had to restart docker daemon and kill any existing hyperkit instances (wasn't attaching for some reason), this helped: [BUG] Error getting MAC address from UUID on macOS with hyperkit #882 (comment)

Hopefully this helps anyone whom is still running into issues getting crc working.

CRC 1.12
Catalina Version: 10.15.5 (19F101)
Hyperkit Version: v0.20200224-27-g79c6a

@jseabold
Copy link

jseabold commented Jul 20, 2020

Just ran into this issue on a fresh install of crc 1.13. This comment #882 (comment) worked for me, though I didn't need to install a new version of hyperkit. I just needed to copy the newer on over to ~/crc/.bin and to kill the running hyperkit (which crashed docker desktop) but allowed crc start to work.

@praveenkumar praveenkumar added the kind/documentation Documentation issues. label Aug 27, 2020
@stale
Copy link

stale bot commented Oct 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label Oct 26, 2020
@stale stale bot closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/documentation Documentation issues. status/need more information Issue needs more information before it will be looked at status/stale Issue went stale; did not receive attention or no reply from the OP
Projects
None yet
Development

No branches or pull requests