machine-drivers / docker-machine-driver-xhyve

docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
https://godoc.org/github.com/machine-drivers/docker-machine-driver-xhyve
BSD 3-Clause "New" or "Revised" License
889 stars 73 forks source link

Issue booting, "open: no such file or directory" #70

Open cbarratt opened 8 years ago

cbarratt commented 8 years ago
(default) Generate UUID...
(default) DBG | Generated UUID: ACB20647-A8F7-45E4-8F52-3B30068D4F62
(default) Convert UUID to MAC address...
open : no such file or directory
notifying bugsnag: [Error in driver during machine creation: exit status 2]
Error creating machine: Error in driver during machine creation: exit status 2

I think it may be related to the fact I emptied /var/db/dhcpd_leases

The file exists but now has no content.

The docs confused me a little :( I did this because when I rebooted my machine, it wouldn't start xhyve - it would just hang and the process would exit/timeout

zchee commented 8 years ago

@cbarratt Thanks issue :)

Ah, good catch. I have not yet tested, but there is that possibility. and, did not error handling of this points. sorry.

I will debug and fix later!

zchee commented 8 years ago

@cbarratt and, I do not yet implement the functions of the cleaning of vmnet. https://github.com/zchee/docker-machine-driver-xhyve#does-not-clean-up-the-vmnet-when-remove-a-vm

Because that could be the cleaning of vmnet by editing the /var/db/dhcpd_leases and plist, I'll proceed with it after resolved this issue.

cbarratt commented 8 years ago

@zchee No problem - is there any work around that I can do now on my machine to try and get it to boot?

zchee commented 8 years ago

@cbarratt OK.

I want to re-check the current of your situation and environment.

  1. Exists doubtless /var/db/dhcpd_leases file, but it is empty?
  2. Result of sw_vers command
  3. Result of system_profiler SPHardwareDataType
    • but DO NOT POST Serial Number and Hardware UUID
    • That is very sensitive data
  4. Original xhyve with -s 2:0,virtio-net flag be fully working?
cbarratt commented 8 years ago

@zchee Here are the results:

  1. Correct, file exists but is empty.
  2. ProductName: Mac OS X ProductVersion: 10.11.4 BuildVersion: 15E27e
  3. Hardware: Hardware Overview: Model Name: MacBook Pro Model Identifier: MacBookPro11,4 Processor Name: Intel Core i7 Processor Speed: 2.2 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 6 MB Memory: 16 GB Boot ROM Version: MBP114.0172.B07 SMC Version (system): 2.29f24 Serial Number (system): XXXXXXXXXXXXX Hardware UUID: XXXXXXXXXXXXX
  4. Just figuring out how to do this one, reading xhyve documentation
cbarratt commented 8 years ago
~/projects/xhyve $ sudo build/xhyve -A -m 4G -c 4 -s 0:0,hostbridge -s 31,lpc -l com1,stdio -s 2:1,virtio-net -f "kexec,test/vmlinuz,test/initrd.gz,earlyprintk=serial console=ttyS0"
Password:
hv_vm_create failed
zchee commented 8 years ago

@cbarratt

Just figuring out how to do this one, reading xhyve documentation

i.g., run original xhyve with vmnet shared network.

$ git clone https://github.com/mist64/xhyve
$ cd xhyve
$ make
$ cp ./build/xhyve /usr/local/bin/xhyve
# booting tinycorelinux...
$ sudo build/xhyve -A -m 4G -c 4 -s 0:0,hostbridge -s 31,lpc -l com1,stdio -s 2:1,virtio-net -f "kexec,test/vmlinuz,test/initrd.gz,earlyprintk=serial console=ttyS0"
# in the tinycorelinux
$ ifconfig
$ ping google.com
$ sudo halt
cbarratt commented 8 years ago

Fails to boot :-1:

hv_vm_create failed

zchee commented 8 years ago

@cbarratt Hmm... The cause of this issue does not seem to be a docker-machine-driver-xhyve.

Do you have disabled the SIP (System Integrity Protection)?

sudo csrutil status
cbarratt commented 8 years ago

SIP is enabled, I had xhyve and the docker-machine driver working perfectly ok yesterday, after rebooting my machine today and trying to start the machine back up it failed, so then i deleted it and re-created and have been unsuccessful so far :(

I can try disable SIP and see if that helps?

zchee commented 8 years ago

@cbarratt Oh, I checked now, I also was enable SIP :(

Anyway, if the original xhyve does not start, strange something in your environment. I will cooperate in the improvement as much as possible, please feel free to comment.

zchee commented 8 years ago

@cbarratt Sorry, I'm not good at English.

I can try disable SIP and see if that helps?

Do you not know how to disable the SIP?

cbarratt commented 8 years ago

I was saying I could try run xhyve with SIP disabled, but as you said it is enabled for you also. I'm attempting to debug xhyve still.

It must be related to my vmnet

zchee commented 8 years ago

@cbarratt I understand. Thanks.

I also debug xhyve now. hv_vm_create is src/vmm/intel/vmx.c +467. Why this error handle is executed... :(

zchee commented 8 years ago

@cbarratt FYI, I and your difference is this points.

ProductName:    Mac OS X
ProductVersion: 10.11.3 # Not beta
BuildVersion:   15D13b

Did you update OS yesterday?

cbarratt commented 8 years ago

@zchee - I have only just recently updated today.

I updated after docker xhyve was already broken, I don't believe the beta has broken it. I think it was my own fault for amending the vmnet file

zchee commented 8 years ago

@cbarratt I was updated to 15E27e(beta) by mistake yesterday :scream_cat: It could not also be started.

This would be a apple's bug.

zchee commented 8 years ago

@cbarratt I have prepared a bootable install OS X USB, and forcible downgrade. (Not delete HDD, overwrite install) Improved, but it is not recommended.