ailispaw / boot2docker-xhyve Goto Github PK
View Code? Open in Web Editor NEWBoot2Docker running on xhyve hypervisor
Boot2Docker running on xhyve hypervisor
Hey there,
I want to run nginx-proxy
at startup, as combining it with dnsmasq
allows easy defining of URLs for web containers running on arbitrary ports.
How and where do I need to change to add this, and have it persist?
Is it possible to enable ssl somehow?
To migrate e.g. to the next boot2docker release.
$ sudo ./xhyverun.sh
vm exit[0]
reason VMX
rip 0x00000000004011be
inst_length 2
status 0
exit_reason 15
qualification 0x0000000000000000
inst_type 0
inst_error 0
./xhyverun.sh: line 35: 2288 Abort trap: 6 xhyve $ACPI $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $UUID -f kexec,$KERNEL,$INITRD,"$CMDLINE"
Hey there,
Great project. It made it super easy to get started with boot2docker and xhyve! Thanks for putting the work into it.
While working with docker-compose on a rails app, I use the "make a container for persisting database/gems" strategy. As a result, my host container (in this case boot2docker) needs a bit more space than the default. I'm not sure how to coordinate this, but I'm willing to learn if you have time to point me in the right direction.
Thanks!
I don't have access to the internet when I start the machine:
docker@boot2docker:~$ curl google.com
curl: (6) Could not resolve host: google.com
docker@boot2docker:~$ cat /etc/resolv.conf
nameserver 192.168.64.1
docker@boot2docker:~$ echo nameserver 8.8.8.8 > /etc/resolv.conf
docker@boot2docker:~$ curl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.pt/?gfe_rd=cr&ei=IVE7VrfKH_Gr8weGpKTgDw">here</A>.
</BODY></HTML>
But even with the changes above, this still does not work:
docker@boot2docker:~$ docker search ubuntu
Error response from daemon: Get https://index.docker.io/v1/search?q=ubuntu: dial tcp: lookup index.docker.io on 192.168.64.1:53: read udp 192.168.64.1:53: connection refused
I'm using MBA with a thunderbolt display and another USB-NIC.
MacOS recognizes wireless one, thunderbolt one and USB one.
In this case, uuid2ip's dispatch_semaphore_wait()
blocks forever.
Disconnecting either thunderbolt display or USB-NIC solves this problem.
Removing Network-service of thunderbolt display entry in system-config pane also solves.
in the pane, following does not work:
and following does work:
I'm suspecting that this caused in multi-NICs environment.
Currently I can boot and login coreos by disabling Thunderbolt Display LAN service.
nlf/dhyve#37 (comment)
nlf/dhyve#37 (comment)
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C uuid2ip
ld uuid2mac.sym
clang-3.6: error: unable to execute command: Segmentation fault: 11
clang-3.6: error: linker command failed due to signal (use -v to see invocation)
make[1]: *** [build/uuid2mac.sym] Error 254
make: *** [uuid2ip/build/uuid2mac] Error 2Yosemite is 10.10.5 (14F27)
I noticed that somehow it's possible that files get unsynchronized between the host and the guest, and even more, looks like after the mount files are stored in the guest?
From what I can see, there is no cron
installed in boot2docker-xhyve
, is this correct?
One interesting bug is that the clock drifts while the host machine is asleep; this can cause things like AWS APIs to fail within Docker.
An easy fix is to run sudo ntpclient -s -h pool.ntp.org
in the boot2docker
VM. Ideally I'd like to put this in a crontab
, however without cron
in the VM, I am rather at a loss!
Any ideas?
Hey there,
I have boot2docker-xhyve setup, and as far as I can tell it's set up correctly, however the client refuses to connect even with the environment variables set correctly?
$ docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Now, make ssh
works fine, and I can run docker
from inside the xhyve VM
In my ~/.zshrc
I have the following:
## Set up boot2docker-xhyve env vars
pushd $HOME/Development/tools/boot2docker-xhyve > /dev/null
unset DOCKER_TLS_VERIFY
unset DOCKER_CERT_PATH
export DOCKER_HOST=tcp://`make ip`:2375
popd &> /dev/null
$ echo $DOCKER_HOST
tcp://192.168.64.2:2375
Originally, this computer had the Docker Toolbox installed, however this should have all been removed: I deleted the ~/.docker
folder to ensure it wasn't loading the wrong configuration, but I can't for the life of me work out whats happening here. Docker versions in both the client and the VM are 1.9.1
make run
demands a password. In case it isn't obvious, this is your sudo password, not 'docker'.I'd like to see some description about how might go about sharing volumes, exposing ports etc.
I have built boot2docker
using the instructions, as well as the Homebrew-provided versions of xhyve
and Docker CLI. The VM runs successfully. However, I cannot connect to the VM. make env
fails, because to the file /var/db/dhcpd_leases
does not exist on my system. Setting DOCKER_HOST
to the IP address given by ifconfig
inside the VM does not work, as this IP is not visible outside the VM. What can I do?
(I am running OS X El Capitan 10.11.1, if it helps.)
$ make run
Booting up...
xhyverun.scpt:538:545: script error: Expected class name but found identifier. (-2741)
make: *** [run] Error 1
I hope that we could use the standard boot2docker distro (I am aware of the Parallel script issue)
By itself this isn't a problem (and given xhyve's issues with maintaining correct time after the host sleeps, may not actually matter for some time yet), but it does mess with some docker-compose wiring that we're doing to ensure that real servers keep consistent timezones with their hosts.
The base image that boot2docker-xhyve is based on should have a file at /etc/localtime
, not a directory. http://man7.org/linux/man-pages/man5/localtime.5.html
[colin@trymon boot2docker-xhyve (master)]$ make clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C uuid2ip clean
rm -f .mac_address
rm -f initrd.img vmlinuz64
rm -f boot2docker.iso
rm -f boot2docker-data.img
rm -f boot2docker-data.tar.gz
[colin@trymon boot2docker-xhyve (master)]$ make
curl -OL https://github.com/timfallmk/boot2docker/releases/download/v1.8.1/boot2docker.iso
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 578 0 578 0 0 1250 0 --:--:-- --:--:-- --:--:-- 1248
100 28.0M 100 28.0M 0 0 1480k 0 0:00:19 0:00:19 --:--:-- 1630k
hdiutil mount boot2docker.iso
/dev/disk6 /Volumes/Boot2Docker-v1.8
cp /Volumes/Boot2Docker-v1.8/boot/initrd.img . && sync
hdiutil unmount /Volumes/Boot2Docker-v1.8
"/Volumes/Boot2Docker-v1.8" unmounted successfully.
hdiutil mount boot2docker.iso
/dev/disk6 /Volumes/Boot2Docker-v1.8
cp /Volumes/Boot2Docker-v1.8/boot/vmlinuz64 . && sync
hdiutil unmount /Volumes/Boot2Docker-v1.8
"/Volumes/Boot2Docker-v1.8" unmounted successfully.
curl -OL https://github.com/ailispaw/boot2docker-xhyve/releases/download/v0.6.0/boot2docker-data.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 585 0 585 0 0 636 0 --:--:-- --:--:-- --:--:-- 636
100 4084k 100 4084k 0 0 785k 0 0:00:05 0:00:05 --:--:-- 1106k
tar zxvf boot2docker-data.tar.gz
x boot2docker-data.img
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C uuid2ip
cc main.c
ld uuid2mac.sym
dsym uuid2mac.dSYM
strip uuid2mac
[colin@trymon boot2docker-xhyve (master)]$ make run
Booting up...
tab 1 of window id 14807
[colin@trymon boot2docker-xhyve (master)]$ docker run -v /etc/localtime:/etc/localtime:ro -it --rm mongo bash
Unable to find image 'mongo:latest' locally
latest: Pulling from library/mongo
b1d080d9151f: Pull complete
59a090c1706e: Pull complete
f53919fe149a: Pull complete
c269a0ead17c: Pull complete
26dcb1a49c4a: Pull complete
b9d2e7e8c9ff: Pull complete
43acddfebe5b: Pull complete
510a7c497746: Pull complete
fefaf29784b7: Pull complete
2d187f187955: Pull complete
fe0d7236a147: Pull complete
bf4514e79915: Pull complete
d939f57bf29c: Pull complete
5f9d083f5bfb: Pull complete
2c273afa05c0: Pull complete
958ba566c40a: Pull complete
5e53867deb23: Pull complete
library/mongo:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:76fdd96ebcdece6a38b4caffc6e2fabf4e1934e944c792269b497f3edfeaa376
Status: Downloaded newer image for mongo:latest
Error response from daemon: Cannot start container 7c052ef5cd148dc94a16a4ae86af79b5bd03fff1a0a45881edddadd773976b01: [8] System error: not a directory
[colin@trymon boot2docker-xhyve (master)]$
Workaround:
[colin@trymon boot2docker-xhyve (master)]$ make ssh
[email protected]'s password:
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.8.1, build xhyve : e9e034e - Fri Sep 4 20:35:54 UTC 2015
Docker version 1.8.1, build d12ea79
docker@boot2docker:~$ sudo rm -rf /etc/localtime/
docker@boot2docker:~$ sudo touch /etc/localtime
docker@boot2docker:~$ ^D
[colin@trymon boot2docker-xhyve (master)]$ docker run -v /etc/localtime:/etc/localtime:ro -it --rm mongo bash
root@3bab6adb227a:/#
How do I mount something other than /Users? A command line flag would be good. For example, I use an external disk for all my virtualisation dev work, since my internal disk is too small, so I would like to nfs-mount /Volumes/my-external-disk/somefolder
.
Currently, the only way to do this seems to be to edit the last line of vmnet_export.sh
. And any path with an extra slash in it (e.g. /Users/fred/somefolder
) fails make export-clean
.
Something like sudo ./xhyverun.sh --nfs=/Volumes/my-external-disk/somefolder
would be awesome.
Hi, first great project ๐
In boot2docker using virtualbox if I want access to the the docker internal network 172.17.0.0/16 (default) I can simply create a route on my Mac
sudo route -n add 172.17.0.0/16 $(b2d ip)
If I try the same but with the xhyve VM IP address, but the traffic is not properly routed, for example if I ping a container IP from my Mac I get timeout.
Strangely enough if I look at the packets from the docker container using ifconfig it looks like they are coming through even if they are not really.
Hope it makes sense, I know accessing the docker internal network is not a common thing, but I have my specific use cases.
How to tests this (again this same example works fine using virtualbox/boot2docker):
sudo ./xhyverun.sh
#Login get the IP address
#Run a container
docker run -ti gliderlabs/alpine /bin/sh
#Get the container IP Address
#Add the route on the Mac
sudo route -n add 172.17.0.0/16 THE_VM_IP_ADDRESS
#Ping from the Mac to the container
ping THE_CONTAINER_IP
Having a weird issue on a clean install on a new mac (I've been running this for the past month and it's been a breeze!) If I make ssh
, I'm able to get into the boot2docker instance just fine, and docker
commands work without an issue. When I try from my mac though, I get an instant reply:
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
I'm setting DOCKER_HOST
with the results of make ip
(in the standard format, like tcp://192.168.64.2:2375
). Any idea what could be going wrong or anything I can provide to help debug this?
I have installed xhyve and tries to run it, but it fails.
$ sudo ./xhyverun.sh
/Users -network 192.168.64.0 -mask 255.255.255.0 -alldirs -mapall=501:20
sudo nfsd restart
/bin/sh: /usr/sbin/iasl: No such file or directory
Assertion failed: (error == 0), function main, file src/xhyve.c, line 909.
./xhyverun.sh: line 37: 9782 Abort trap: 6 xhyve $ACPI $MEM $SMP $PCI_DEV $LPC_DEV $NET $IMG_CD $IMG_HDD $UUID -f kexec,$KERNEL,$INITRD,"$CMDLINE"
sudo sed -E -e '/^\/Users -network 192.168.64.0 -mask 255.255.255.0 -alldirs -mapall=501:20$/d' -i.bak /etc/exports
sudo nfsd restart
I do lots of image builds and that leads to a boot2docker guest out of space
How do i increase it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.