machine-drivers/docker-machine-driver-xhyve

Reporting for launched xhyve

zchee opened this issue ยท 124 comments

zchee commented

This thread is not issue thread. Post a report only.
See also Would you do me a favor?

OK, Running, Good, etc...
Anything will do.

Hey, I would like to try the driver, but it seems to have a lot of dependencies https://github.com/zchee/docker-machine-xhyve#libguestfs (OSX Fuse, etc.). Mind uploading a binary?

zchee commented

@johanneswuerbach Thanks issue!

I can upload the binary, but the binary requests a libguestfs.dylib as a dynamic linking.
The reason, OS X does not support static build.
If remove the libguestfs, there are several problems.

  • Needs way to copy the userdata.tar to disk image before launch the xhyve
  • Give up use extfs Docker Backing Filesystem (will be using tmpfs. bad performance)

I know how to solve these without libguestfs, but I felt that pretty way used libguestfs.

If you are satisfied with tmpfs, I will make use tmpfs version binary from now.

BTW, I also have a problem in many of dependency.
I'm looking for a better way to make ext.4 disk image without a libguestfs.

Sorry terrible English :(

I definitely see why you used libguestfs, but can't b2d auto-format the disk when it discovers an unformatted one? https://github.com/boot2docker/boot2docker/blob/master/rootfs/rootfs/etc/rc.d/automount#L13-L16

zchee commented

@johanneswuerbach I tried before. I don't remember so much...

But, docker-machine can not first connect the vm use ssh in that case.
docker-machine core implementation is create id_rsa, id_rsa, *.pem based on $HOME/.docker/machine/certs/* before launch any vm.

And, docker also docker-machine is doing a secure remote connection use *.pem.

So, need to copy the locally created userdata.tar in the first.

zchee commented

@johanneswuerbach
But, not accurate, I will check by gdb from now.

Looks like b2d is just dd-ing a tar on that specific partition containing the certs: https://github.com/boot2docker/boot2docker/blob/master/rootfs/rootfs/etc/rc.d/automount#L22

Maybe the xhyve driver could create the same using hdiutil and dd.

zchee commented

@johanneswuerbach I remembered.

Yes. The method was previously used.

docker-machine boot2docker provisioner requires ssh login to some of the setting.
e.g. https://github.com/docker/machine/blob/master/libmachine/provision/boot2docker.go#L117-L127

If not exist /var/lib/boot2docker/userdata.tar, boot2dokcer is automatically formatted own disk, and create *.pem.
and, did not write hostid_rsa.pub data into authorized_keys.
In that case, It means for ssh login is needs tcuser password.

create blank disk image use dd
    |
boot2docker automatically create some files
    |
ssh login use tcuser password
    |
delete *.pem, and copy the local pem to img. and edit authorized_keys

I knew this way, but I feel it's pushy.

Hmm...
Let me think about it.

Works like a charm now! :-)

zchee commented

@johanneswuerbach Oh! Thanks :)

I've been trying for a while to get this working, but it fails to find the -F flag (introduced in an unmerged PR against xhyve):

$ docker-machine -D create -d xhyve xhyve-dev
...
(xhyve-dev) DBG | operation not supported by device
(xhyve-dev) DBG | xhyve: illegal option -- F
(xhyve-dev) DBG | Usage: xhyve [-behuwxMACHPWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]
(xhyve-dev) DBG |              [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] -f <fw>
...

The full output: debug.txt

zchee commented

@aybabtme Thanks issue :)

Could you create a new issue thread?

@zchee cool, just opened #59

It's working for me! Only thing was for some reason it didn't set up the boot script for the XHYVE_EXPERIMENTAL_NFS_SHARE, so I had to manually ssh in and mount the NFS share. After doing that, it's cranking away on building Swift from source now!

zchee commented

@rothomp3 Thanks a report!!

and, Sure thing for nfs issue.
I will create a issue threads, and debugging after fix already exists some of the issue :)
Could you provide us with information in order to solve the problem?

(xhyve-dev) DBG | Not there yet 1/60, error: IP not found for MAC 4a:db:63:46:cf:32 in DHCP leases
(xhyve-dev) DBG | operation not supported by device
(xhyve-dev) Waiting on a pseudo-terminal to be ready... virtio_net: Could not create vmnet interface, permission denied or no entitlement?
(xhyve-dev) DBG | exit status 1 &{0xc8200140f0} &{0xc820014120}
...
(xhyve-dev) DBG | Not there yet 60/60, error: IP not found for MAC 4a:db:63:46:cf:32 in DHCP leases
Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds, aborting

zchee commented

@Jaesin Hi,

Could you try this command and post result?

ls -la $(which -a docker-machine-driver-xhyve)

I just wiped it out and started again and got it to work. 3rd try is a charm!

Thanks for the effort @zchee

docker-machine ssh xhyve-dev
(xhyve-dev) Getting to VM state...
                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.9.1, build master : cef800b - Fri Nov 20 19:33:59 UTC 2015
Docker version 1.9.1, build a34a1d5
docker@boot2docker:~$
zchee commented

@Jaesin ๐ŸŽ‰

Didn't use the NFS flag as I already have some NFS stuff setup.

Worked brilliantly with Boot2Docker - b2d image 1.9.1

Didn't work with RancherOS because the ROS image has a vmlinuz file, not a vmlinuz64 file - ROS image 0.4.2

When it failed with ROS, it didn't clean up after itself (left the mount point).
Within B2D it was reporting it had 17GiB ram when running top .

zchee commented

@far-blue Thanks, issue :) and reporting.
but, I am not good English :(
So, I do not yet understand all.

Do you want to run the RancherOS use docker-machine-driver-xhyve?

Within B2D it was reporting it had 17GiB ram when running top.

ram...? In fact, that means available B2D memory size?

I just installed and tested xhyve-docker-machine-driver on OS X El Capitan, docker machine 0.5.6, and it worked brilliantly from the first try with a fairly complex project involving:

  • running 3 containers (1 mongodb, 1 api server and 1 web app on nginx)
  • using a bridge network
  • mounting host files and directories using the experimental nfs share
  • mounting the docker socket as a volume in the server container
  • building docker images inside the server container
  • and running the generated image

So big thanks to @zchee (and the xhyve project too) and keep up the good work !

@zchee:

Do you want to run the RancherOS use docker-machine-driver-xhyve?

Yes, RancherOS (https://github.com/rancher/os) has support for docker-machine as an alternative for Boot2Docker and it provided support for xhyve early on. This is the command I used:

docker-machine create --driver xhyve --xhyve-boot2docker-url https://github.com/rancher/os/releases/download/v0.4.2/rancheros.iso dev

ram...? In fact, that means available B2D memory size?

When I ssh into boot2docker (docker-machine ssh dev) and run top I receive the following:

Tasks:  93 total,   1 running,  92 sleeping,   0 stopped,   0 zombie
%Cpu0  :   0.7/0.0     1
GiB Mem : 17.2/0.973
GiB Swap:  0.0/0.207

This might be something best reported to the xhyve project but I just wanted to mention it :)

zchee commented

@far-blue I understand :)

RancherOS provision does not support Now. Currently, boot2docker only :(
but, I was planning to support CoreOS and RancherOS provisioning from previous.

However, The first goal is to work perfectly the boot2docker.
I think boot2docker is a standard specification of use the docker in OSX.
What do you think?

BTW, If the PR does not come, I want to start with its implementation in about next month.

zchee commented

@jawher Thanks for Detailed reporting of operations!!
This report is good references to me.

Iโ€™m going to give it everything Iโ€™ve got.

@zchee:

RancherOS provision does not support Now. Currently, boot2docker only :(

Given RancherOS has worked with xhyve in the past (rancher/os#379) my guess is that you just need to modify the following line to check for either 'vmlinuz64' or 'vmlinuz':

https://github.com/zchee/docker-machine-driver-xhyve/blob/d61209a16e2082074a146da646d3e7269da94ab9/xhyve/xhyve.go#L710

However, you are right, it is best to focus on Boot2Docker first because it is the default and most widely used configuration :)

And thank you for all the work you've done so far - it is looking great!

I followed the guide in https://allysonjulian.com/setting-up-docker-with-xhyve/ and it worked like a charm.

However when I then started setting up a project to use vagrant, with docker as the provider, it wanted to download the virtualbox box as a host rather than my local dev docker machine.

I've limited experience so I'd love a pointer in the right direction.

Thanks for the project.

Great that you created this driver, thanks! ๐Ÿ™Œ๐Ÿผ I wanted to use xhyve in a Docker context for some time but didn't find the time to get familiar with the tooling and automation.

I installed docker, docker-machine, xhyve and docker-machine-driver-xhyve using Homebrew. Running the following doesn't succeed:

$ docker-machine create xhyve-vm -d xhyve
Running pre-create checks...
Creating machine...
(xhyve-vm) Copying /Users/lenn4rd/.docker/machine/cache/boot2docker.iso to /Users/lenn4rd/.docker/machine/machines/xhyve-vm/boot2docker.iso...
(xhyve-vm) Creating VM...
(xhyve-vm) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(xhyve-vm) /dev/disk5                                           /Users/lenn4rd/.docker/machine/machines/xhyve-vm/b2d-image
(xhyve-vm) "disk5" unmounted.
(xhyve-vm) "disk5" ejected.
(xhyve-vm) Generating 20000MB disk image...
(xhyve-vm) created: /Users/lenn4rd/.docker/machine/machines/xhyve-vm/root-volume.sparsebundle
(xhyve-vm) Creating SSH key...
(xhyve-vm) Fix file permission...
(xhyve-vm) Generate UUID...
(xhyve-vm) Convert UUID to MAC address...
Error creating machine: Error in driver during machine creation: exit status 1

I remember that xhyve has or had some issues creating network interfaces unless it is executed as root, so I tried sudo:

# sudo docker-machine create xhyve-vm -d xhyve
Password:
Running pre-create checks...
Creating machine...
(xhyve-vm) Copying /Users/lenn4rd/.docker/machine/cache/boot2docker.iso to /Users/lenn4rd/.docker/machine/machines/xhyve-vm/boot2docker.iso...
(xhyve-vm) Creating VM...
(xhyve-vm) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(xhyve-vm) /dev/disk6                                           /Users/lenn4rd/.docker/machine/machines/xhyve-vm/b2d-image
(xhyve-vm) "disk6" unmounted.
(xhyve-vm) "disk6" ejected.
(xhyve-vm) Generating 20000MB disk image...
(xhyve-vm) created: /Users/lenn4rd/.docker/machine/machines/xhyve-vm/root-volume.sparsebundle
(xhyve-vm) Creating SSH key...
(xhyve-vm) Fix file permission...
(xhyve-vm) Generate UUID...
(xhyve-vm) Convert UUID to MAC address...
(xhyve-vm) Starting xhyve-vm...
(xhyve-vm) Waiting for VM to come online...
(xhyve-vm) Waiting on a pseudo-terminal to be ready... done
(xhyve-vm) Hook up your terminal emulator to /dev/ttys004 in order to connect to your VM
Waiting for machine to be running, this may take a few minutes...
(xhyve-vm) Getting to VM state...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine env xhyve-vm

I had to try a couple of times to chown the entire VM, enable it unsuccessfully, remove it and re-create it and on the third try I'm able to use it:

$ eval $(docker-machine env xhyve-vm)
$ docker-machine ls
NAME       ACTIVE   URL            STATE     URL                       SWARM   DOCKER    ERRORS
xhyve-vm   *        xhyve          Running   tcp://192.168.64.4:2376           v1.9.1

I was able to do a quick test as per @dwijnand's blog post.

Is there an easier way not using sudo? Or am I missing a step? I remember reading about code-signing the xhyve binary to be able to use it without sudo but I haven't tried this yet.

@lenn4rd Did you do the

$ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
$ sudo chmod u+s /usr/local/bin/docker-machine-driver-xhyve

steps from the release notes? https://github.com/zchee/docker-machine-driver-xhyve/releases/tag/v0.2.1

@dwijnand No, I didn't see them because I didn't use one of those releases but the Homebrew formula that @zchee created. Due to security concerns the Homebrew maintainers don't allow neither chmoding installed binaries nor including the steps you mentioned in the caveat section.

I now tried again with chown and chmod as you suggested and the VM is then created as expected. Thanks!

๐Ÿ‘

zchee commented

@lenn4rd Thanks issue :) and @dwijnand Thanks follow up!!
I fixed README.md
https://github.com/zchee/docker-machine-driver-xhyve#install
and, added owner check method.
64b81cf

sudo is not required.
and, We can not automatically setuid of root use homebrew, The caused by Homebrew spirit(way).

So, Current situation there is no way other than to set manually.
Thanks!!

@zchee You should probably get it added to the caveats of in the homebrew formula.

zchee commented

@dwijnand No.
Homebrew did not allowed also even it...:(

zchee commented

@dwijnand
It's very vain, but there was no way other than to measures in the docker-machine-driver-xhyve core code.

wow.. :(

zchee commented

@dwijnand ๐Ÿ™€

The PR to Homebrew is at Homebrew/legacy-homebrew#48002

zchee commented

@lenn4rd Yes, I discussed with homebrew owners in this pull-request.

zchee commented

@lenn4rd I think that's a freedom of users to change the owner of binary.
but, It seems that it is not allowed.

and, Even if you installed in homebrew, but they do not know the flag, users will see the repository.
And should find a description of the README.md.
I'm going to respond sincerely for the issue of against it.

So, I'm going to not send pull-request only the version up.

WDYT?

I of course second their security concerns but I think itโ€™s weird that the Homebrew maintainers donโ€™t even allow hints for how to setup the driver in this case. But one could argue itโ€™s our responsibility to get familiar with it if we want to try it, so I wonโ€™t challenge your and their decision. ๐Ÿ˜Š

zchee commented

@lenn4rd Thank you for understanding and consent :)
I also wonโ€™t challenge homebrew owner decision lol.

mcoms commented

Works great for me on OSX 10.10.5, with docker-machine version 0.5.6, build 61388e9, from ZSH.

The error message that's shown if you don't run the two sudo commands is a bit cryptic. I assumed the driver was broken, but I found the commands today in the README and after running those, it works fine.

zchee commented

@mcoms Thanks report :)
I'm sorry for the confusion, but the current situation can not be helped... :(

$ docker-machine create -d xhyve xhyve-test
Running pre-create checks...
Creating machine...
(xhyve-test) Copying /Users/kuaner/.docker/machine/cache/boot2docker.iso to /Users/kuaner/.docker/machine/machines/xhyve-test/boot2docker.iso...
(xhyve-test) Creating VM...
(xhyve-test) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(xhyve-test) /dev/disk7                                             /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) "disk7" unmounted.
(xhyve-test) "disk7" ejected.
(xhyve-test) Generating 20000MB disk image...
(xhyve-test) created: /Users/kuaner/.docker/machine/machines/xhyve-test/root-volume.sparsebundle
(xhyve-test) Creating SSH key...
(xhyve-test) Fix file permission...
(xhyve-test) Generate UUID...
(xhyve-test) Convert UUID to MAC address...
Error creating machine: Error in driver during machine creation: exit status 2

any suggest?

zchee commented

@kuaner Thanks issue :)
I test later.

@zchee thanks
osx 10.11.4 Beta (15E27e)
installed with brew

zchee commented

@kuaner Could you post of result of this command?

docker-machine --debug create -d xhyve cao

--debug flag will be displayed docker-machine-driver-xhyve version.

here it is

$ docker-machine --debug create -d xhyve xhyve-test
Docker Machine Version:  0.5.6, build 61388e9
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:58311
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
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:58315
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(xhyve-test) Calling .GetMachineName
(xhyve-test) Calling .DriverName
(xhyve-test) Calling .GetCreateFlags
(xhyve-test) Calling .SetConfigFromFlags
Running pre-create checks...
(xhyve-test) Calling .PreCreateCheck
(xhyve-test) DBG | ===== Docker Machine xhyve Driver Version 0.2.2 (Homebrew) =====
(xhyve-test) DBG |
(xhyve-test) Calling .GetConfigRaw
Creating machine...
(xhyve-test) Calling .Create
(xhyve-test) DBG | local Boot2Docker ISO version:  v1.9.1
(xhyve-test) Copying /Users/kuaner/.docker/machine/cache/boot2docker.iso to /Users/kuaner/.docker/machine/machines/xhyve-test/boot2docker.iso...
(xhyve-test) Creating VM...
(xhyve-test) DBG | Mounting boot2docker.iso
(xhyve-test) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil attach /Users/kuaner/.docker/machine/machines/xhyve-test/boot2docker.iso -mountpoint /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image] []  <nil> 0xc82002a010 0xc82002a018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} attach /Users/kuaner/.docker/machine/machines/xhyve-test/boot2docker.iso -mountpoint /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) /dev/disk8                                             /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) DBG | Extracting vmlinuz64 into /Users/kuaner/.docker/machine/machines/xhyve-test
(xhyve-test) DBG | Extracting initrd.img into /Users/kuaner/.docker/machine/machines/xhyve-test
(xhyve-test) DBG | Unmounting boot2docker.iso
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil detach /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image] []  <nil> 0xc82002a010 0xc82002a018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} detach /Users/kuaner/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) "disk8" unmounted.
(xhyve-test) "disk8" ejected.
(xhyve-test) Generating 20000MB disk image...
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil create -megabytes 20000 -type SPARSEBUNDLE /Users/kuaner/.docker/machine/machines/xhyve-test/root-volume] []  <nil> 0xc82002a010 0xc82002a018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} create -megabytes 20000 -type SPARSEBUNDLE /Users/kuaner/.docker/machine/machines/xhyve-test/root-volume
(xhyve-test) created: /Users/kuaner/.docker/machine/machines/xhyve-test/root-volume.sparsebundle
(xhyve-test) Creating SSH key...
(xhyve-test) Fix file permission...
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/boot2docker.iso
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/config.json
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/id_rsa
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/id_rsa.pub
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/initrd.img
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/root-volume.sparsebundle
(xhyve-test) DBG | /Users/kuaner/.docker/machine/machines/xhyve-test/vmlinuz64
(xhyve-test) Generate UUID...
(xhyve-test) Convert UUID to MAC address...
(xhyve-test) DBG | Generated UUID: 3ED9CF67-4E0E-4FE8-99D2-31A39C377CC2
Error creating machine: Error in driver during machine creation: exit status 2
zchee commented

@kuaner Ah... 10.11.4 Beta (15E27e) has a bug...
The caused by Apple's Hypervisor.framework bug.
See #70

zchee commented

@kuaner If you want to use docker-machine-driver-xhyve, need downgrade OS X.
Overwride install OS X, or clean install :(

@zchee :( !!

zchee commented

@kuaner ๐Ÿ™€
I will write information to README.md

works fine but unable to share a volume (should i use --xhyve-experimental-nfs-share ?)
very great job!! thks :)

zchee commented

@sylvek Thanks report :)

Hmm...
I have recently investigated. but I do not yet know this cause :(
See also #71

I used docker-machine create -d xhyve --xhyve-cpu-count=4 --xhyve-memory-size=4096 --xhyve-disk-size=40000 --xhyve-experimental-nfs-share xhyve to create the VM and everything is working as expected, thank you @zchee! ๐Ÿ‘

zchee commented

@andreausu Thanks report!! :)

zchee commented

@kuaner FYI, I does not yet test, but Apple maybe fixed bug!!
e7a9548#commitcomment-15674187

zchee commented

@kuaner
Solved on 15E33e :)

See machyve/xhyve#83 (comment)

$ brew install xhyve docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ docker-machine -D create --driver xhyve develop
$ eval $(docker-machine env develop)
$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.5.3
 Git commit:   a34a1d5
 Built:        Sun Jan 17 16:14:45 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b901d36b6f2f: Pull complete
0a6ba66e537a: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
...
$ # Nice!
zchee commented

@mhubig ๐ŸŽ‰

To install: (essentially what the instructions/others have done)

brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
docker-machine create --driver xhyve --xhyve-cpu-count=4 --xhyve-memory-size=8192 --xhyve-disk-size=80000 --xhyve-experimental-nfs-share dock2
eval "$(docker-machine env dock2)"
docker-machine ls dock2
NAME    ACTIVE   URL            STATE     URL                       SWARM   DOCKER    ERRORS
dock2   *        xhyve          Running   tcp://192.168.64.3:2376           v1.9.1

Steps to get networking going:

  1. Find the ip address of your docker-machine
docker-machine ip dock2
192.168.64.3
  1. Find which bridge interface is being used
ifconfig | grep -B 3 192.168.64 | head -n 1
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
  1. Start container
docker run -it alpine ash
docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
c64b45c9b8ff        alpine              "ash"               9 seconds ago       Up 8 seconds                            tender_wilson
  1. Get ip address of container
    option "a")
docker inspect --format '{{ .NetworkSettings.IPAddress }}' c64b45c9b8ff
172.17.0.2

option "b")

docker exec -it c64b45c9b8ff ifconfig eth0 | head -n 2
eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02
          inet addr:172.17.0.2  Bcast:0.0.0.0  Mask:255.255.0.0
  1. Add default route for container subnet to mac
sudo route -n add 172.17.0.0/16 192.168.64.3
add net 172.17.0.0: gateway 192.168.64.3
# Note: Can check routing:
netstat -rn | grep 172.17
172.17             192.168.64.3       UGSc            2        8 bridge1
  1. Run this command:
sudo ifconfig bridge100 -hostfilter en7
hostfilter interface address
             Configure the bridge to accept incoming packet on the interface
             only if they match the given MAC address and IP address -- use
             the command twice to set both type of addresses.  Other filtering
             restrictions apply.
  1. Ping container ip address
ping 172.17.0.2
PING 172.17.0.2 (172.17.0.2): 56 data bytes
64 bytes from 172.17.0.2: icmp_seq=0 ttl=63 time=0.315 ms
64 bytes from 172.17.0.2: icmp_seq=1 ttl=63 time=0.480 ms
^C
--- 172.17.0.2 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss

Nice!

When I first spun up a docker-machine, I did not use 4 cores and one of my test processes took 2 minutes and 21 seconds. After I switched to 4 cores, it only takes 20 seconds, which is about the same as what vmware fusion was doing.

I'd still like to see how to get portforwarding going so I can use localhost, but the above networking will work for me, too.

I saw others using "socat" for this:

brew install socat
socat TCP-LISTEN:48130,fork TCP:192.168.64.3:48120 &

But, it did not work for me and I don't know why yet.

Thanks! This is really cool. Especially after the concerns that VMware may no longer be developing vmware fusion/workstation.

I'm using this everyday for now and it works great!

Works like a charm...Great stuff. Thanks!

Working nicely on 10.11.3 over the 3GB limit and with 4 cores. NFS sharing also seems to work, though I have to figure out how to map the uids and gids properly. Thanks so much for your work!

zchee commented

@edlitmus @dekstroza @erikrose Thank report!!

@erikrose

though I have to figure out how to map the uids and gids properly

I'm sorry for the confusion :(
I'm looking for something means.

zchee commented

@mkinney I little fixed your comment, sorry ๐Ÿ™‡
but, Thanks good tutorials :)

Ninir commented

@zchee Working like a charm :-)

@zchee even though it's early days, this is working perfectly on my end. including zfs mounts. awesome stuff dude ๐Ÿ™Œ๐Ÿ‘๐Ÿ˜„

It works well for me. But I have had strange networking problems after waking up my laptop from sleep. Specifically, after waking up my laptop I'll have extremely slow DNS access (e.g. my web browser will sit for a long time at "Resolving Host"). If I restart the xhyve docker machine, then this problem disappears and everything is fine. I assume this has something to do with the "bridge100" network, but I can't imagine what. Anyone else see this? But I consider that problem to be minor -- other than that xhyve seems to work great! Thanks for doing this work. -- Adam

zchee commented

@Ninir @theundebruijn @lyon-fnal
Thanks reports :)

I want to even harder in the future.

docker-machine-driver-xhyve is working well for me. Thank you for your good work.

I installed through Homebrew, and once my college (Adam, above) noted the instructions to chown and chmod the appropriate file, everything just worked.

I have since updated to docker 1.10 (through homebrew's update mechanism). I then got error messages that the client and server API versions were different. I hoped to fix this using 'docker-machine upgrade', but that did not work. In the end, I removed the machine and created a new one, and things are now working again.

I have attached a log file showing the error I encountered.
docker-machine-error.txt

Is there a way to upgrade the docker version in an already-existing machine?

zchee commented

@marcpaterno Sorry late reply :(
I have also this problem.
I do not know what is the cause. I continue to debug.

I just tried upgrading my xhyve docker VM to 1.10.1. The docker-machine upgrade command claimed to work, but docker version still shows 1.10.0. I've attached my output...
docker-machine-upgrade-out.txt

sudo salt-call grains.item osrelease
local:
    ----------
    osrelease:
        10.10.5
docker-machine -v
docker-machine version 0.5.6, build 61388e9

and here's my SaltStack formula to install and got it working:

{%- from "macros.jinja2" import user, home with context %}

include:
  - brew
  - xhyve

docker:
  pkg:
    - installed
    - pkgs:
      - docker
      - docker-compose
      - docker-machine
    - require:
      - cmd: brew_update

docker-xhyve:
  file:
    - managed
    - name: /usr/local/bin/docker-machine-driver-xhyve
    - source: https://github.com/zchee/docker-machine-driver-xhyve/releases/download/v0.2.1/docker-machine-driver-xhyve
    - source_hash: md5=e8d2e23d76e29e13dd050c912916f0af
    - user: root
    - group: wheel
    - mode: 4755
    - require:
      - pkg: xhyve

com.apple.NetworkSharing:
  service:
    - running

{%- set machine_name = salt['pillar.get']('docker:machine_name', 'boot2docker') %}
docker-machine:
  cmd:
    - run
    - name: docker-machine create {{ machine_name }} --driver xhyve --xhyve-experimental-nfs-share
    - user: {{ user }}
    - unless: docker-machine status {{ machine_name }}
    - require:
      - pkg: docker
      - file: docker-xhyve
      - service: com.apple.NetworkSharing

{{ home }}/.zprofile:
  file:
    - append
    - text: |
        export DOCKER_HOST=tcp://192.168.64.2:2376
        export DOCKER_CERT_PATH={{ home }}/.docker/machine/certs
        export DOCKER_TLS_VERIFY=1
    - require:
      - cmd: docker-machine
noose commented

Hi!
I want to try your xhyve implementation for docker, but I can't. Here is my log.

docker-machine create xhyve --driver xhyve --xhyve-disk-size 30000 --xhyve-memory-size 2048 --xhyve-cpu-count 2
% docker-machine start xhyve
Starting "xhyve"...
(xhyve) Waiting for VM to come online...
(xhyve) Waiting on a pseudo-terminal to be ready... done
(xhyve) Hook up your terminal emulator to /dev/ttys007 in order to connect to your VM
Machine "xhyve" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded

When I wait 30-60sec more, then I can do:

% docker-machine env xhyve

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.64.7:2376": dial tcp 192.168.64.7:2376: getsockopt: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

so:

% docker-machine --debug regenerate-certs -f xhyve 
Docker Machine Version:  0.6.0, build e27fb87
Regenerating TLS certificates
Found binary path at /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:60725
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
command=configureAuth machine=xhyve
Waiting for SSH to be available...
Getting to WaitForSSH function...
(xhyve) Calling .GetSSHHostname
(xhyve) DBG | 192.168.64.7
(xhyve) DBG | IP found in DHCP lease table: 192.168.64.7
(xhyve) Calling .GetSSHPort
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHUsername
Using SSH client type: external
{[-o BatchMode=yes -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/noose/.docker/machine/machines/xhyve/id_rsa -p 22] /usr/bin/ssh}
About to run SSH command:
exit 0
SSH cmd err, output: <nil>:
Detecting the provisioner...
(xhyve) Calling .GetSSHHostname
(xhyve) DBG | 192.168.64.7
(xhyve) DBG | IP found in DHCP lease table: 192.168.64.7
(xhyve) Calling .GetSSHPort
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHUsername
Using SSH client type: external
{[-o BatchMode=yes -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/noose/.docker/machine/machines/xhyve/id_rsa -p 22] /usr/bin/ssh}
About to run SSH command:
cat /etc/os-release
SSH cmd err, output: <nil>: NAME=Boot2Docker
VERSION=1.10.1
ID=boot2docker
ID_LIKE=tcl
VERSION_ID=1.10.1
PRETTY_NAME="Boot2Docker 1.10.1 (TCL 6.4.1); master : b03e158 - Thu Feb 11 22:34:01 UTC 2016"
ANSI_COLOR="1;34"
HOME_URL="http://boot2docker.io"
SUPPORT_URL="https://github.com/boot2docker/boot2docker"
BUG_REPORT_URL="https://github.com/boot2docker/boot2docker/issues"

found compatible host: boot2docker
(xhyve) Calling .GetMachineName
(xhyve) Calling .GetSSHHostname
(xhyve) DBG | 192.168.64.7
(xhyve) DBG | IP found in DHCP lease table: 192.168.64.7
(xhyve) Calling .GetSSHPort
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHUsername
Using SSH client type: external
{[-o BatchMode=yes -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/noose/.docker/machine/machines/xhyve/id_rsa -p 22] /usr/bin/ssh}
About to run SSH command:
sudo /usr/bin/sethostname xhyve && echo "xhyve" | sudo tee /var/lib/boot2docker/etc/hostname
SSH cmd err, output: <nil>: Setting hostname to boot2docker Done.
xhyve

(xhyve) Calling .GetSSHHostname
(xhyve) DBG | 192.168.64.7
(xhyve) DBG | IP found in DHCP lease table: 192.168.64.7
(xhyve) Calling .GetSSHPort
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHKeyPath
(xhyve) Calling .GetSSHUsername
Using SSH client type: external
{[-o BatchMode=yes -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@192.168.64.7 -o IdentitiesOnly=yes -i /Users/noose/.docker/machine/machines/xhyve/id_rsa -p 22] /usr/bin/ssh}
About to run SSH command:
netstat -an
SSH cmd err, output: <nil>: Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 192.168.64.7:22         192.168.64.1:60730      ESTABLISHED
tcp        0      0 :::22                   :::*                    LISTEN
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     SEQPACKET  LISTENING      14658 /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING      16206 /var/run/acpid.socket
unix  3      [ ]         STREAM     CONNECTED      19793
unix  3      [ ]         DGRAM                      7930
unix  3      [ ]         DGRAM                      7929
unix  3      [ ]         STREAM     CONNECTED      19792

[...]
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded

What I need to do now? :)

zchee commented

@quantonganh Thanks report!
also, I'm interested in saltstack. I'll try saltstack with reference to your formula.
Thanks again :)

@lyon-fnal @noose Hi :)
Sorry for late reply...
Recently I have developed other projects. For now, I do not have time to spend in this repository.
but I'll be back!! Please wait for a little.

@lyon-fnal

I just tried upgrading my xhyve docker VM to 1.10.1. The docker-machine upgrade command claimed to work, but docker version still shows 1.10.0. I've attached my output...

Known bug. but I do not yet fix. Sorry :(

@noose I have experience of this error.
I do not remember now, but is what can be probably soon resolved.
Could you post the result of this commands?

docker-machine create --debug xhyve --driver xhyve xhyve-test

--debug flag are will be output of docker-machine-driver-xhyve version.

Success over here w/HEAD under homebrew, though I had to patch the formula:

Homebrew/legacy-homebrew#49467

I used the following command line:

docker-machine -D create -d xhyve --xhyve-virtio-9p --xhyve-boot2docker-url https://github.com/zchee/boot2docker-legacy/releases/download/v1.10.0-virtio-9p/boot2docker.iso xhyve-machine

I couldn't build HEAD with homebrew, so I patched the formula as best I could. Unfortunately, I've never done any development in go, so it's almost certainly not the best way to go about it.

Success here, just followed the screencast. ๐Ÿป

Working for me, just followed the instructions

$ docker-machine -D create --driver xhyve --xhyve-experimental-nfs-share xhyve-test
Docker Machine Version:  0.6.0, build e27fb87
Found binary path at /Users/nikora/go/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:54169
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /Users/nikora/go/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:54173
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(xhyve-test) Calling .GetMachineName
(xhyve-test) Calling .DriverName
(xhyve-test) Calling .GetCreateFlags
(xhyve-test) Calling .SetConfigFromFlags
Running pre-create checks...
(xhyve-test) Calling .PreCreateCheck
(xhyve-test) DBG | ===== Docker Machine xhyve Driver Version 0.2.2 (HEAD) =====
(xhyve-test) DBG |
(xhyve-test) DBG | executing: /usr/local/bin/VBoxManage -v
(xhyve-test) DBG | STDOUT: 5.0.16r105871
(xhyve-test) DBG |
(xhyve-test) DBG | STDERR:
(xhyve-test) Calling .GetConfigRaw
Creating machine...
(xhyve-test) Calling .Create
(xhyve-test) DBG | local Boot2Docker ISO version:  v1.10.3
(xhyve-test) Copying /Users/nikora/.docker/machine/cache/boot2docker.iso to /Users/nikora/.docker/machine/machines/xhyve-test/boot2docker.iso...
(xhyve-test) Creating VM...
(xhyve-test) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(xhyve-test) DBG | Mounting boot2docker.iso
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil attach /Users/nikora/.docker/machine/machines/xhyve-test/boot2docker.iso -mountpoint /Users/nikora/.docker/machine/machines/xhyve-test/b2d-image] []  <nil> 0xc82002e010 0xc82002e018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} attach /Users/nikora/.docker/machine/machines/xhyve-test/boot2docker.iso -mountpoint /Users/nikora/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) /dev/disk5                                             /Users/nikora/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) DBG | Extracting vmlinuz64 into /Users/nikora/.docker/machine/machines/xhyve-test
(xhyve-test) DBG | Extracting initrd.img into /Users/nikora/.docker/machine/machines/xhyve-test
(xhyve-test) DBG | Unmounting boot2docker.iso
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil detach /Users/nikora/.docker/machine/machines/xhyve-test/b2d-image] []  <nil> 0xc82002e010 0xc82002e018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} detach /Users/nikora/.docker/machine/machines/xhyve-test/b2d-image
(xhyve-test) "disk5" unmounted.
(xhyve-test) "disk5" ejected.
(xhyve-test) Generating 20000MB disk image...
(xhyve-test) DBG | executing: &{/usr/bin/hdiutil [hdiutil create -megabytes 20000 -type SPARSEBUNDLE /Users/nikora/.docker/machine/machines/xhyve-test/root-volume] []  <nil> 0xc82002e010 0xc82002e018 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} create -megabytes 20000 -type SPARSEBUNDLE /Users/nikora/.docker/machine/machines/xhyve-test/root-volume
(xhyve-test) created: /Users/nikora/.docker/machine/machines/xhyve-test/root-volume.sparsebundle
(xhyve-test) Creating SSH key...
(xhyve-test) Fix file permission...
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/boot2docker.iso
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/config.json
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/id_rsa
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/id_rsa.pub
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/initrd.img
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/root-volume.sparsebundle
(xhyve-test) DBG | /Users/nikora/.docker/machine/machines/xhyve-test/vmlinuz64
(xhyve-test) Generate UUID...
(xhyve-test) DBG | Generated UUID: F4BB3F79-AB4E-4708-95CA-E32FBFCDEFF2
(xhyve-test) Convert UUID to MAC address...
(xhyve-test) DBG | Converted MAC address: 72:c:db:5b:cf:32
(xhyve-test) Starting xhyve-test...
(xhyve-test) DBG | [xhyve -A -U F4BB3F79-AB4E-4708-95CA-E32FBFCDEFF2 -c 1 -m 1024M -l com1,autopty -s 0:0,hostbridge -s 31,lpc -s 2:0,virtio-net -s 3,ahci-cd,/Users/nikora/.docker/machine/machines/xhyve-test/boot2docker.iso -s 4:0,ahci-hd,/dev/rdisk5 -f kexec,/Users/nikora/.docker/machine/machines/xhyve-test/vmlinuz64,/Users/nikora/.docker/machine/machines/xhyve-test/initrd.img,loglevel=3 user=docker console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 base host=boot2docker -F /Users/nikora/.docker/machine/machines/xhyve-test/xhyve-test.pid]
(xhyve-test) Waiting for VM to come online...
(xhyve-test) DBG |
(xhyve-test) DBG | Not there yet 1/60, error: IP not found for MAC 72:c:db:5b:cf:32 in DHCP leases
(xhyve-test) DBG | operation not supported by device
(xhyve-test) DBG | xhyve: illegal option -- F
(xhyve-test) DBG | Usage: xhyve [-behuwxMACHPWY] [-c vcpus] [-g <gdb port>] [-l <lpc>]
(xhyve-test) DBG |              [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] -f <fw>
(xhyve-test) DBG |        -A: create ACPI tables
(xhyve-test) DBG |        -c: # cpus (default 1)
(xhyve-test) DBG |        -C: include guest memory in core file
(xhyve-test) DBG |        -e: exit on unhandled I/O access
(xhyve-test) DBG |        -f: firmware
(xhyve-test) DBG |        -g: gdb port
(xhyve-test) DBG |        -h: help
(xhyve-test) DBG |        -H: vmexit from the guest on hlt
(xhyve-test) DBG |        -l: LPC device configuration. Ex: -l com1,stdio -l com2,autopty -l com2,/dev/myownpty
(xhyve-test) DBG |        -m: memory size in MB
(xhyve-test) DBG |        -M: print MAC address and exit if using vmnet
(xhyve-test) DBG |        -p: pin 'vcpu' to 'hostcpu'
(xhyve-test) DBG |        -P: vmexit from the guest on pause
(xhyve-test) DBG |        -s: <slot,driver,configinfo> PCI slot config
(xhyve-test) DBG |        -u: RTC keeps UTC time
(xhyve-test) DBG |        -U: uuid
(xhyve-test) DBG |        -v: show build version
(xhyve-test) DBG |        -w: ignore unimplemented MSRs
(xhyve-test) DBG |        -W: force virtio to use single-vector MSI
(xhyve-test) DBG |        -x: local apic is in x2APIC mode
(xhyve-test) DBG |        -Y: disable MPtable generation
(xhyve-test) DBG | exit status 1 &{0xc820016180} &{0xc8200161b0}
(xhyve-test) DBG |
(xhyve-test) DBG | Not there yet 2/60, error: IP not found for MAC 72:c:db:5b:cf:32 in DHCP leases
(xhyve-test) DBG |
(xhyve-test) DBG | Not there yet 3/60, error: IP not found for MAC 72:c:db:5b:cf:32 in DHCP leases
(xhyve-test) DBG |
(xhyve-test) DBG | Not there yet 4/60, error: IP not found for MAC 72:c:db:5b:cf:32 in DHCP leases
(xhyve-test) DBG |
(xhyve-test) DBG | Not there yet 5/60, error: IP not found for MAC 72:c:db:5b:cf:32 in DHCP leases
(xhyve-test) DBG |

Edit: I have built a newer version of the driver. And now it works.

Everything's working great here. Just installed from brew a few minutes ago! ๐Ÿป

Works great (without folder sharing and very first start), after a quick brew install on osx 10.11.3

Thanks you very much for your works @zchee !

@zchee Appeared to work well on my MBA (with only 4GB RAM) instead of having to pollute it with VirtualBox. The problem I get appears to be around mounting volumes from my Mac.. with -v. The folders exist and are viewable but I can't access the files from within any container.

system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Air
      Model Identifier: MacBookAir6,2
      Processor Name: Intel Core i5
      Processor Speed: 1.3 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 3 MB
      Memory: 4 GB
      Boot ROM Version: MBA61.0099.B22
      SMC Version (system): 2.13f15

@zchee ye, It's cool, thanks a lot.

Entea commented

Working all right ๐Ÿ‘

mxl commented

Everything is working fine. For NFS support I used https://github.com/adlogix/docker-machine-nfs.

Working great.
Creating 3 nodes. Need to edit individual config.json to have different hostname and restart
Install rancher in one of the node.
Create kubernetes cluster.

Hardware Overview:

  Model Name: MacBook Air
  Model Identifier: MacBookAir6,1
  Processor Name: Intel Core i7
  Processor Speed: 1.7 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 8 GB

Using the plugin after waiting to long for Docker to come with news on their OSX native beta and being fed up with virtualbox. Plugin works as expected. No problem after upgrading to 10.11.4.

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro12,1
  Processor Name: Intel Core i7
  Processor Speed: 3,1 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 16 GB
  Boot ROM Version: MBP121.0167.B16
  SMC Version (system): 2.28f7

Tested on Yosemite 10.10.5 , xhyve 0.2.0 successfully
I had to tweak the permissions on docker-machine-driver-xhyve to make it work as below as I was not running as root:

$ sudo chown root:wheel /usr/local/bin/docker-machine-driver-xhyve
$ sudo chmod 4755 /usr/local/bin/docker-machine-driver-xhyve
$ ls -al /usr/local/bin/docker-machine-driver-xhyve
-rwsr-xr-x 1 root wheel 7866688 23 avr 17:30 /usr/local/bin/docker-machine-driver-xhyve

  Model Name: MacBook Air
  Model Identifier: MacBookAir5,2
  Processor Name: Intel Core i7
  Processor Speed: 2 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 8 GB
  Boot ROM Version: MBA51.00EF.B04
  SMC Version (system): 2.5f9
ired commented

Tested on El Capitan 10.11.5 Beta (15F24b):

Model Name: MacBook Pro
Model Identifier: MacBookPro11,5
Processor Name: Intel Core i7
Processor Speed: 2,5 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.B09
SMC Version (system): 2.30f2

Works. Thanks.

pires commented

I get the open : no such file or directory error with the following build:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.4
BuildVersion:   15E65

Is 15E65 prior to 15E33e ๐Ÿ˜• ?

Built using 0ca005c and it works like a charm! Thanks so much for the hard work you've put into this - it really is a great alternative to running VirtualBox

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro6,1
  Processor Name: Intel Core i7
  Processor Speed: 2.66 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 8 GB
  Processor Interconnect Speed: 4.8 GT/s
  Boot ROM Version: MBP61.0057.B11
  SMC Version (system): 1.57f18
  Serial Number (system): elided
  Hardware UUID: yup
  Sudden Motion Sensor:
      State: Enabled

ProductName:    Mac OS X
ProductVersion: 10.11.4
BuildVersion:   15E65

$ docker --version
Docker version 1.11.1, build 5604cbe
$ docker-machine --version
docker-machine version 0.7.0, build a650a40

Worked perfect for me. Thanks!

I can confirm success as well. Created the machine; Ran a test image.

Works great for me with dinghy.

OK @ home
NOT OK with XHYVE_EXPERIMENTAL_NFS_SHARE @ work

Wanna say HUGE thanks to @zchee ! We have 10+ successful installations on the various versions of OSX, from 10.10.5 to 10.11.4. All setups are working fine with NFS options.

Thanks! โค๏ธ

Doesn't work for me using docker-machine 0.7 & this MacOS version

ProductName:    Mac OS X
ProductVersion: 10.11.5
BuildVersion:   15F34

Error

docker-machine -D create --driver xhyve dev-xhyve
Docker Machine Version:  0.7.0, build a650a40
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:60681
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
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:60685
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(dev-xhyve) Calling .GetMachineName
(dev-xhyve) Calling .DriverName
(dev-xhyve) Calling .GetCreateFlags
(dev-xhyve) Calling .SetConfigFromFlags
Running pre-create checks...
(dev-xhyve) Calling .PreCreateCheck
(dev-xhyve) DBG | ===== Docker Machine xhyve Driver Version 0.2.2 (Homebrew) =====
(dev-xhyve) DBG |
(dev-xhyve) DBG | executing: /usr/local/bin/VBoxManage -v
(dev-xhyve) DBG | STDOUT: 5.0.20r106931
(dev-xhyve) DBG |
(dev-xhyve) DBG | STDERR:
(dev-xhyve) Calling .GetConfigRaw
Creating machine...
(dev-xhyve) Calling .Create
(dev-xhyve) DBG | local Boot2Docker ISO version:  v1.11.2
(dev-xhyve) Copying /Users/chmoulli/.docker/machine/cache/boot2docker.iso to /Users/chmoulli/.docker/machine/machines/dev-xhyve/boot2docker.iso...
(dev-xhyve) Creating VM...
(dev-xhyve) DBG | Mounting boot2docker.iso
(dev-xhyve) Extracting vmlinuz64 and initrd.img from boot2docker.iso...
(dev-xhyve) DBG | executing: &{/usr/bin/hdiutil [hdiutil attach /Users/chmoulli/.docker/machine/machines/dev-xhyve/boot2docker.iso -mountpoint /Users/chmoulli/.docker/machine/machines/dev-xhyve/b2d-image] []  <nil> 0xc82008a008 0xc82008a010 [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>} attach /Users/chmoulli/.docker/machine/machines/dev-xhyve/boot2docker.iso -mountpoint /Users/chmoulli/.docker/machine/machines/dev-xhyve/b2d-image
(dev-xhyve) DBG | hdiutil: attach failed - Operation timed out
Error creating machine: Error in driver during machine creation: exit status 1
Opting out of crash reporting.
jvz commented

Works fine for me. Installed from homebrew (version 0.2.2), created a new docker-machine using the xhyve driver, tried out some images, everything seems to work fine. Mac OS X 10.11.5.