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
888 stars 73 forks source link

WIP: hyperkit go bindings. #189

Open dlorenc opened 7 years ago

dlorenc commented 7 years ago

This isn't fully ready yet, but I was able to get minikube booting with it.

dlorenc commented 7 years ago

Ref #168

dlorenc commented 7 years ago

OK, @zchee this should be ready for a look. I split the vendor changes into another commit to make it easier to review.

zchee commented 7 years ago

@dlorenc Woa, I’ll check it asap. Thanks great work!!

zchee commented 7 years ago

/cc @praveenkumar @dalehamel

praveenkumar commented 7 years ago

@dlorenc Great, I will test it out and let you know.

dlorenc commented 7 years ago

@zchee have you had a chance to look here?

zchee commented 7 years ago

@dlorenc Ah, sorry late. I joined @mercari yesterday. So, little busy. but I'll check asap.

dlorenc commented 7 years ago

I joined @mercari yesterday. So, little busy.

Congrats!

zchee commented 7 years ago

@dlorenc :D

zchee commented 7 years ago

@dlorenc I'll check today

praveenkumar commented 7 years ago

@dlorenc @zchee Is there anything we are waiting for? This PR still in WIP. @dlorenc There is some conflict, please rebase.

praveenkumar commented 7 years ago

@dlorenc I compiled from your PR and tried to provision minishift looks like networking doesn't go well and VM not able to get the IP. Another thing I noticed that now process id associate to hyperkit.

(minishift) DBG | Not there yet 60/60, error: IP not found for MAC 2:51:8:22:87:a6 in DHCP leases
- FAIL E0830 12:02:04.074449    1724 start.go:344] Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting. Retrying.
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:49376
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minishift) Calling .GetState
FAIL E0830 12:02:04.104117    1724 start.go:344] Error starting the VM: Error getting the state for host: Unable to find 'xhyve' process by PID: 1781. Retrying.
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
\ Plugin server listening at address 127.0.0.1:49380
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minishift) Calling .GetState
FAIL E0830 12:02:04.125552    1724 start.go:344] Error starting the VM: Error getting the state for host: Unable to find 'xhyve' process by PID: 1781. Retrying.
Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting
Error getting the state for host: Unable to find 'xhyve' process by PID: 1781
Error getting the state for host: Unable to find 'xhyve' process by PID: 1781

✘-INT ~/work/github/go_practice/bin 
12:02 $ ps aux | grep xhyve
prkumar          1844   0.0  0.0  2432804   1892 s002  S+   12:02PM   0:00.00 grep xhyve

✔ ~/work/github/go_practice/bin 
12:02 $ ps aux | grep hyperkit
root             1781   0.1  0.1 10855132  10612 s002  S    12:00PM   0:00.39 /Applications/Docker.app/Contents/MacOS/com.docker.hyperkit -A -u -F /Users/prkumar/.minishift/machines/minishift/hyperkit.pid -c 2 -m 8192M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=/Users/prkumar/Library/Containers/com.docker.docker/Data/s50 -s 2:0,virtio-net -U F4BB3F79-AB4E-4708-95CA-E32FBFCDEFD3 -s 3:0,ahci-hd,/dev/rdisk2 -s 4,virtio-rnd -l com1,autopty=/Users/prkumar/.minishift/machines/minishift/tty,log=/Users/prkumar/.minishift/machines/minishift/console-ring -f kexec,/Users/prkumar/.minishift/machines/minishift/vmlinuz64,/Users/prkumar/.minishift/machines/minishift/initrd.img,earlyprintk=serial loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10:LABEL=boot2docker-data base
prkumar          1857   0.0  0.0  2432804   1900 s002  S+   12:02PM   0:00.00 grep hyperkit
praveenkumar commented 7 years ago

@dlorenc @zchee ping !

zchee commented 7 years ago

@praveenkumar Ah, sorry. I"ll reply tomorrow.

periklis commented 7 years ago

@dlorenc & @zchee can some of you elaborate if this changeset removes the need to use sudo?