Giter Club home page Giter Club logo

boot2docker-vagrant's Introduction

Boot2docker Vagrant Box

Boot2docker Vagrant box for optimized Docker and Docker Compose use on Mac and Windows.

What is this?

This is a temporary solution to achieve better performance with synced folders and docker data volumes on Mac and Windows.

The stock boot2docker/docker-machine mounts host volumes via VirtualBox Guest Additions (vboxsf) mode, which is is terribly slow. Much better performance can be achieved with nfs (Mac), smb (Windows) or rsync (Mac and Windows).

Prerequisites

  1. VirtualBox 5.1.x
  2. Vagrant 1.8.5+
  3. Babun - A Linux-type shell + winpty, Windows only

For best result and a clean setup it is recommended to remove any previous versions of VirtualBox, Vagrant, boot2docker, docker and docker-compose.

Automatic installation and updates of prerequisites is available via the one-liners below.
Make sure to stop all VirtualBox VMs prior to performing updates.

Note: If you already have brew/cask and necessary versions of VirtualBox and Vagrant installed, prefer to install them manually or would like to not update these components automatically, prefix the command with B2D_INSTALL_MODE=docker .

Mac

Prerequisites are installed using brew/cask (brew and cask will be installed if missing).

bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/scripts/presetup-mac.sh)

Windows

All automated scripts and instructions in this project assume using Babun shell and are not tested with other shells.

Prerequisites are installed using babun and chocolatey (chocolatey will be installed if missing).

bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/scripts/presetup-win.sh)

Setup and usage

Automatic installation

Designate a root folder that the VM will have access to (e.g. ~/Projects) and run there:

bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/scripts/setup.sh)

Manual installation

Use these steps if you have VirtualBox and/or Vagrant already installed or prefer/need to install them manually.

  1. Copy Vagrantfile and vagrant.yml into a designated folder

  2. Inside the folder run

    vagrant up
    
  3. Verify your setup by checking docker client and server versions

    docker version
    

Documentation

License

The MIT License (MIT)

Copyright (c) 2015 BlinkReaction

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

boot2docker-vagrant's People

Contributors

achekulaev avatar lmakarov avatar meuk avatar nebel54 avatar terwilligergreen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boot2docker-vagrant's Issues

Vagrant box stores docker images/containers on same disk at boot2docker

The typical boot2docker VM mounts boot2docker as an ISO (like a LiveCD), and mounts a separate disk (vmdk) for /var/lib/docker and /var/lib/boot2docker where it stores things like images, containers, and other docker-related state.

This arrangement allows for the boot2docker ISO to be updated without losing all the previously downloaded images or state.

Is it possible for the Vagrantfile to do something similar? If so, we might be able to vagrant destroy then vagrant up and keep all docker state.

Stale NFS file handle

Sometimes the application will stop working, and when I attempt fig up, it fails with the error "stale NFS file handle"

Source code of blinkreaction/boot2docker box

Hi Leonid,

Is it possible to seesomewhere the source of vagrant blinkreaction/boot2docker box ?

Is it build with packer or smth else? Looks like it is very close to what is included in DockerToolbox itself, but still different. Something similar can be found in dduportal/boot2docker-vagrant-box,
but it is still not so close.

Vagrant is not on PATH

I followed all steps from README on a Windows 10 machine running in virtualbox.
On the final step where I have to run

bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/scripts/setup.sh)

I got the error: vagrant: command not found

So I had to put vagrant on PATH manually with

setx PATH "%PATH%;C:\HashiCorp\Vagrant\bin"

Use --force with brew install?

Looks like brew/cask may not always detect updates.

Currently, Homebrew-Cask cannot always detect if an application has been updated. You can force an update via the command brew cask install --force. We are working on improving this.

We may have to force the install in order to get things updated for existing users:

brew install virtualbox --force
brew install vagrant --force

https://github.com/blinkreaction/boot2docker-vagrant/blob/develop/scripts/presetup-mac.sh#L31
https://github.com/blinkreaction/boot2docker-vagrant/blob/develop/scripts/presetup-mac.sh#L38

The downside of this is a full reinstall every time prerequisites are installed, which is far from being ideal.

Errors during installation phase

This is a report back on my first attempts to install this using the one-liner provided, e.g.

curl https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/setup.sh | bash

I am running Mac OSX 10.8.5, Homebrew 0.9.5, git 2.3.0, bash 3.2

Error 1:

This error presented immediately upon first executing the script:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/brew-cask
/usr/local/bin is not writable.

You can try again using:
  brew link brew-cask

Solution:

I ran sudo brew link brew-cask which worked

Error 2:

Error: Unknown command: cask

Solution:

N/A, this is a symptom of the previous error

Error 3:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local

Error
Could not symlink etc/bash_completion.d/docker
/usr/local/etc/bash_completion.d is not writable.

You can try again using:
  brew link docker

Solution:

I ran sudo brew link docker and chmod 777 /usr/local/etc/bash_completion.d which worked

Error 4:

bash: line 14: vagrant: command not found
bash: line 21: docker: command not found

Solution (sort of):
After running completing solutions 1-3, I attempted to rerun the script. Which returned Error 5 (see bellow)

Error 5:

brew-cask: could not find Ruby 2.0 or greater.  Try 'brew install ruby'.

Solution:

This is a confusing one, because I definitely have ruby (osX native version) but maybe this script needs ruby installed via brew. I ran sudo brew install ruby and ruby was installed successfully.

Error 6:

I again reran the script, and again it failed with the following output:

==> Symlinking Binary 'VBoxHeadless' to '/usr/local/bin/VBoxHeadless'
==> ln: /usr/local/bin/VBoxHeadless: Permission denied
Error: Command failed to execute!

==> Failed command:
["/bin/ln", "-hfs", "--", "#<Pathname:/Applications/VirtualBox.app/Contents/MacOS/VBoxHeadless>", "#<Pathname:/usr/local/bin/VBoxHeadless>"]

==> Output of failed command:

Solution:

At this this point it seemed rather clear that permissions were the problem here. So I tried an alternate version of the one-liner supplied at the beginning of this bug report, e.g.

curl https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/setup.sh | sudo bash

At this point, the script appeared to execute without error.

Error 7:

I then gave the following commands:

mkdir ~/Sites/docking
cp ~/Vagrantfile ~/Sites/docking/Vagrantfile
cd ~/Sites/docking
vagrant up

And received the following error:

Vagrant failed to initialize at a very early stage:

The home directory you specified is not accessible. The home
directory that Vagrant uses must be both readable and writable.

You specified: /Users/matt/.vagrant.d

Solution:

I ran sudo chmod 777 /Users/matt/.vagrant.d and then ran vagrant up again.

Error 8:

Upon the second run of vagrant up I received the following error:

/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine_index.rb:321:in `initialize': Permission denied - /Users/matt/.vagrant.d/data/machine-index/index.lock (Errno::EACCES)

Solution:

I ran sudo vagrant up

Error 9:

Upon running sudo vagrant up I received the following error:

Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 2375 is already in use
on the host machine.

To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:

  config.vm.network :forwarded_port, guest: 2375, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.

Solution:

I opened ~/Sites/docking/Vagrantfile in a text editor, and changed 2375 to another port (9885, which was just a random selection). I tried to run sudo vagrant up and received the exact same error. I tried editing ~/Vagrantfile and then running sudo vagrant up again. I received the exact same error. Finally, based on this stackoverflow post http://stackoverflow.com/a/25142933/1209832 I tried editing ~/.vagrant.d/boxes/yungsang-VAGRANTSLASH-boot2docker/1.4.1/virtualbox/Vagrantfile. Then I ran sudo vagrant up again, and it worked.

Error 10:

I ran the following commands:

export DOCKER_HOST=tcp://localhost:9885
docker version

I received the following error:

FATA[0000] Get http://localhost:9885/v1.16/version: EOF. Are you trying to connect to a TLS-enabled daemon without TLS?

Solution:

  1. Ran sudo brew install boot2docker
  2. Ran boot2docker init
  3. Ran boot2docker start

Docker replied:

Waiting for VM and Docker daemon to start...
.......................ooooooooooooooooo
Started.
Writing /Users/matt/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/matt/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/matt/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH=/Users/matt/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

So I gave the three export commands listed above. And then FINALLY, I gave the command docker version and got the response:

Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.4
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

In truth, I don't really know what this means. However, I did notice that I was now able to do this:

docker

So I guess something happened?

Running dsh in vagrant box: tput: command not found

I tried running the example from drude-d7-testing in boot2docker-vagrant. The first problem I encountered, which the instructions do not mention (I'll see if I can come up with a good pull request), is that there is an example docker-compose file that needs to be copied and renamed for things to work.

However, I then run into this error:

$ dsh drush si -y
/usr/local/bin/dsh: line 945: tput: command not found
Error response from daemon: no such id: bash

Is this a missing dependency in the vagrant box? Or should I not be running dsh from within the box?

DNS service discovery with dnsdock

With dnsdock each container can be addressed by a descriptive DNS name, which resolves to it's docker internal network IP. This solves potential circular reference issues with the stock container linking (e.g. service-a => service-b, service-b => service-c, service-c => service-a).

dnsdock will also replace both dnsmasq and nginx-proxy micro-services. This simplifies this project setup as well as the stack composition for each project - no more reverse proxy component.

The host machine DNS resolver has to be configured to resolve all container DNS names (e.g. *.docker) via dnsdock and have a static route for the docker internal network to be routed to the VM.

Feature request

Is possible to add ubuntu as vm.box + needed script to install docker (optionaly, maybe as plugin)?

Reason - digitalocean vagrant plugin not support vagrant box integrations (maybe AWS too)... And looks like DO not contain boot2docker image + official box more secure for me xD (hashicorp/precise64).

Yes I know - ubuntu as basebox - overkill.

Anyway - my message is just question, maybe I will just continue use my personal fork =)

Reconsider VirtualBox DNS proxy on/off

We are currently turning these off:

    # Disable VirtualBox DNS proxy as it may cause issues.
    # See https://github.com/docker/machine/pull/1069
    v.customize ['modifyvm', :id, '--natdnshostresolver1', 'off']
    v.customize ['modifyvm', :id, '--natdnsproxy1', 'off']

I ran into two use cases where it would be better to keep them on:

  1. Moving from one LAN to another will break DNS resolution

    B2D VM inherits the DNS server list from the host at boot. Moving into a different LAN (e.g. home <=> office) will mean a change of the network subnet and/or the DNS server IP address in most cases.

  2. I had a really weird issue on one Windows box with very poor network performance. I fixed it by switching natdnshostresolver1 and natdnsproxy1 ON.

At the minimum adding a note to the Troubleshooting docs about the switch would be good.

Make bash available inside boot2docker's tinycore

Motivation
tinycore comes with busybox, which also has an alias for sh, but not bash.

Bash scripts cannot be run inside a boot2docker VM.
Changing the script header from #!/bin/bash to #!/bin/sh fixes the issue.

However here come another problem. The sh implementation in busybox is closer to bash than to sh.
Scripts with #!/bin/sh header may run fine fine on tinycore, but will fail in a true sh on another Linux version.

One way would be to make sure all scripts are written in pure sh.
Another way would be to just have bash installed in tinycore.

Make sure ~./bash_profile is not edited multiple times upon running install multiple times in a row

After making multiple attempts to install docker using the one liner in README.md, I found that my .bash_profile file contained several instances of the same line, over and over:

# Docker (default for Vagrant based boxes)
export DOCKER_HOST=tcp://localhost:2375


# Docker (default for Vagrant based boxes)
export DOCKER_HOST=tcp://localhost:2375


# Docker (default for Vagrant based boxes)
export DOCKER_HOST=tcp://localhost:2375


# Docker (default for Vagrant based boxes)
export DOCKER_HOST=tcp://localhost:2375


# Docker (default for Vagrant based boxes)
export DOCKER_HOST=tcp://localhost:2375

local image not found

The command vagrant up fails on pulling local images (even when those images have been built with boot2docker).

==> boot2docker: Pulling image symfony/code:latest...
==> boot2docker: Pulling repository symfony/code
==> boot2docker: Traceback (most recent call last):
==> boot2docker:   File "/usr/local/bin/docker-compose", line 9, in <module>
==> boot2docker:     load_entry_point('docker-compose==1.2.0', 'console_scripts', 'docker-compose')()
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/main.py", line 31, in main
==> boot2docker:     command.sys_dispatch()
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/docopt_command.py", line 21, in sys_dispatch
==> boot2docker:     self.dispatch(sys.argv[1:], None)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/command.py", line 27, in dispatch
==> boot2docker:     super(Command, self).dispatch(*args, **kwargs)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/docopt_command.py", line 24, in dispatch
==> boot2docker:     self.perform_command(*self.parse(argv, global_options))
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/command.py", line 59, in perform_command
==> boot2docker:     handler(project, command_options)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/cli/main.py", line 464, in up
==> boot2docker:     do_build=not options['--no-build'],
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/project.py", line 208, in up
==> boot2docker:     do_build=do_build):
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/service.py", line 214, in recreate_containers
==> boot2docker:     **override_options)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/service.py", line 199, in create_container
==> boot2docker:     stream_output(output, sys.stdout)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/progress_stream.py", line 37, in stream_output
==> boot2docker:     print_output_event(event, stream, is_terminal)
==> boot2docker:   File "/usr/local/lib/python2.7/dist-packages/docker_compose-1.2.0-py2.7.egg/compose/progress_stream.py", line 50, in print_output_event
==> boot2docker:     raise StreamOutputError(event['errorDetail']['message'])
==> boot2docker: compose.progress_stream.StreamOutputError: Error: image symfony/code:latest not found
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

What's wrong ?

'docker ps' from the host

I wasn't able to run 'docker ps' or use any docker-compose command from my Mac, I need to vagrant ssh to do that.. any help ?

This is where I setup boot2docker-vagrant :

-- <== here (vagrant.yml, Vagrantfile)
-- code_base
-------- docker-compose.yml

How to test installation?

Problem/Motivation

It is not clear from the current README what functional goal this is meant to accomplish. (See error/solution #10 in my previous issue thread). Once you successfully install this, it is difficult to know what should happen next. More generally, it is difficult to know what this does in a material, concrete way.

Proposed resolution

Expand the current readme file to include the following:

  • Screen shots of a system which has successfully installed this project (e.g. http://i.imgur.com/RXDFWzb.gif).
  • Instructions for verifying that installation succeeded (e.g. "If you give the command ABC and get the response XYZ then congratulations, boot2docker-vagrant has been successfully installed).
  • An example real-world use case.
  • A more detailed "What Is This?" section.

Vagrant seems unable to "reload" this box

I've been using your box for quite a while here over at phpdocker.io, it's been an absolute godsend. I've been experiencing the following however.

I'm not exactly sure where to report the issue as obviously this repo is for your share-optimised Vagrantfile, and the issue might be on the box itself.

Always get this error:

[development@localhost ~/P/p/z/phpdocker] (master) vagrant reload
==> default: Attempting graceful shutdown of VM...
The SSH connection was unexpectedly closed by the remote end. This
usually indicates that SSH within the guest machine was unable to
properly start up. Please boot the VM in GUI mode to check whether
it is booting properly.

When I query vagrant on the machine status, it is powered off:

[development@localhost ~/P/p/z/phpdocker] (master) [1] vagrant status
Current machine states:

default                   poweroff (virtualbox)

The VM is powered off. To restart the VM, simply run `vagrant up`

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
    config.vm.box = "blinkreaction/boot2docker"

    # Network config & shared folders
    config.vm.network "private_network", ip: "192.168.33.31"
    config.vm.synced_folder "..", "/home/docker/generic-php7", id: "generic-php7-dev"
    config.vm.synced_folder "~/.composer/", "/home/docker/.composer", id: "generic-php7-composer"

    # VM definition
    config.vm.provider "virtualbox" do |vb|
        vb.name = "Generic PHP7"
        vb.memory = 1024
        vb.cpus = 1
    end

    # Bring up containers
    config.vm.provision "shell", run: "always", inline: "cd /home/docker/generic-php7/phpdocker && docker-compose up -d 1>&2"

    # Redirect webserver port down 80, etc
    config.vm.provision "shell", run: "always", inline: "/usr/local/sbin/iptables -i eth1 -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 17000 1>&2"

    # Disable guest additions auto update as it won't work on boot2docker, and slows vm boot down boot
    if Vagrant.has_plugin?("vagrant-vbguest")
        config.vbguest.auto_update = false
    end
end

Other info:

  • Ubuntu 16.04 fresh (also happened on 15.10)
  • Virtualbox 5.0.16_Ubuntur105871
  • Vagrant 1.8.1

I'm not sure what information you'll need to diagnose it?

Explore syncthing as a folder sync option

Syncthing is a relatively new kid on the block. It does bi-directional file sync and is cross-platform (Mac, Windows, Linux).
We will be exploring it as an alternative option to the rsync option we currently have available.

Windows 7: Remote I/O error

==> boot2docker: mount: mounting //192.168.10.1/projects on /c/projects failed: Remote I/O error
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
==> boot2docker: The previous process exited with exit code 1.

The following fixes the issue:
http://www.linuxquestions.org/questions/linux-server-73/mount-cifs-cannot-allocate-memory-or-remote-i-o-error-after-data-transfer-4175508385/#post5246812

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache - set it to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size - set it to 3

After updating the following to registry entries SMB mount is working.

Changing the 3rd key (as per the thread linked above) was not necessary, but might help someone, so here it is (create it if it does not exist):

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\IRPStackSize DWORD 0x0000000f (15)

client and server don't have same version

I am getting the following error message

FATA[0000] Error response from daemon: client and server don't have same version (client : 1.18, server: 1.17) 

How can I upgrade docker on the VM?

Support for Docker 1.7.1 and Compose 1.3.3

I was wondering if an upgrade to the latest stable version of docker/compose could be considered? I can put together a PR if this is something others my find useful.

I was also wondering if there should be a mechanism/option to easily do this without putting together a PR ever any of those components are updated

Conflicts with default drude settings

Issue

Installing drude causes this to be installed, but there is a conflict that causes the error:

$ dsh reset
...
Creating devinciwebdrupal7_web_1...
Cannot start container 5cb8370b6d828207980b85c8a5260feca72c1f1d0a9c76777b56e69d6397921c: Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use

Diagnosing

ssh into the boot2docker VM w/ vagrant

vagrant ssh 

check the listening ports

$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.10.10:443       0.0.0.0:*               LISTEN      1495/docker-proxy
tcp        0      0 192.168.10.10:80        0.0.0.0:*               LISTEN      1503/docker-proxy
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      972/sshd
tcp        0      0 :::2375                 :::*                    LISTEN      1148/docker
tcp        0      0 :::3306                 :::*                    LISTEN      2900/docker-proxy
tcp        0      0 :::22                   :::*                    LISTEN      972/sshd

You should then be able to see what's listening on port 443, which in this case is the docker-proxy (aka vhost_proxy)

Fix

Disable the vhost_proxy in the vagrant.yml file (usually up one level from the git repo). The Vagrantfile

# Use a reverse proxy to map host name to containers.
# This is an alternative to using dedicated IP addresses in the 'hosts' section above.
# Containers must define a "VIRTUAL_HOST" environment variable to be recognized and routed by the vhost-proxy.
- vhost_proxy: true
+ # vhost_proxy: true

Restart the VM

$ dsh restart

The restart should now be successful, but without the vhost_proxy setting, you'll need to set the hostname of your site manually.

sudo vim /etc/hosts

Add the line

192.168.10.10 hello-world.drude

You should now be able to view the site at http://hello-world.drude

Improve UX on existing packages when installing

When you install this, and have Homebrew or Cask already installed, it throws two errors. These errors don't make the installation stop but UX can always be improved.

Installing Homebrew...
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
    rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
Installing Cask...
==> Installing brew-cask from caskroom/homebrew-cask
Error: brew-cask-0.50.0 already installed
To install this version, first `brew unlink brew-cask'
I'm going to go ahead and add a check for the two packages and I'll issue a pull request.

can't mount smb share

hi ,

been trying to use smb folder, but everytime i try here's how it behave:

==> boot2docker: Configuring and enabling network interfaces...
==> boot2docker: Mounting SMB shared folders...
==> boot2docker: Forcing shutdown of VM...
==> boot2docker: Destroying VM and associated drives...
==> boot2docker: Running cleanup tasks for 'shell' provisioner...
==> boot2docker: Running cleanup tasks for 'shell' provisioner...
==> boot2docker: Running cleanup tasks for 'shell' provisioner...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/guests/linux/cap/choose_addressable_ip_addr.rb:7:in `block in choose_addressable_ip_addr': undefined method `each' for nil:NilClass (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/guests/linux/cap/choose_addressable_ip_addr.rb:6:in `tap'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/guests/linux/cap/choose_addressable_ip_addr.rb:6:in `choose_addressable_ip_addr'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/capability_host.rb:111:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/capability_host.rb:111:in `capability'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/guest.rb:43:in `capability'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/synced_folders/smb/synced_folder.rb:109:in `enable'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/synced_folders.rb:92:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/synced_folders.rb:89:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/synced_folders.rb:89:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/synced_folders/nfs/action_cleanup.rb:19:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:160:in `handle'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:42:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in `lock'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:41:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/env_set.rb:19:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:80:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/box_check_outdated.rb:68:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/match_mac_address.rb:16:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/import.rb:32:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/customize.rb:40:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Users/Administrateur/.vagrant.d/gems/gems/vagrant-triggers-0.5.2/lib/vagrant-triggers/action/trigger.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Users/Administrateur/.vagrant.d/gems/gems/vagrant-triggers-0.5.2/lib/vagrant-triggers/action/trigger.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Users/Administrateur/.vagrant.d/gems/gems/vagrant-triggers-0.5.2/lib/vagrant-triggers/action/trigger.rb:17:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:in `action_raw'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in `block in action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:in `lock'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in `action'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

i created a local user named vagrant, configured properly the vagrant.yml and give full control over the directory i wan't to mount in my boot2docker.

still same behavior.
it works with vboxsf, but fails with smb/smb2

configuration:

  • host : windows 7 64 bits ,
  • modules: powershell V3, babun, vagrant 1.7.4
  • virtualbox : 4.3.30 (tried also with 5.0.4)

any clues on what's going on ?

Switch from NAT to private network for docker client

This has been bugging me for a while and I finally found the answer.

Performance comparison of using the NAT vs the private network interface with the docker client (docker build in this case):

vbox-docker-build-natvsprivate-performance

So instead of pointing docker client to the NAT interface we should point it to the private network interface: export DOCKER_HOST=tcp://localhost:2375 => export DOCKER_HOST=tcp://192.168.10.10:2375

Some history

Apparently VirtualBox has issues with the Intel adapter implementation (used by default) - they perform very poorly in NAT mode (at least with docker).

There were attempts to use the virtio adapter instead (#13), however there must have been issue with it as well, since docker-machine now defaults to the Intel PRO/1000 MT Desktop adapter and not virtio:
https://github.com/docker/machine/releases/tag/v0.3.0

Use Intel network interface driver (adds great stability)

client and server don't have same version (client : 1.19, server: 1.18)

After running the setup.sh we're seeing this error regarding client-server version mismatch:

» docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
Error response from daemon: client and server don't have same version (client : 1.19, server: 1.18)

So I assume we either need to downgrade the docker client, or upgrade the vagrant box docker server.

|| non valid parameter

since latest release , everytime i do a vagrant up

i have an error saying that || isn't a correct parameter.
this parameter is using in the vagrantfile to create the useraccount and the network share (smb windows).

how to fix ? any clue ?

machine dies and reports "aborted" state in VirtualBox

vagrant up reports:

ringing machine 'boot2docker' up with 'virtualbox' provider...
==> boot2docker: Importing base box 'blinkreaction/boot2docker'...
==> boot2docker: Matching MAC address for NAT networking...
==> boot2docker: Setting the name of the VM: Sites_boot2docker
==> boot2docker: Clearing any previously set network interfaces...
==> boot2docker: Preparing network interfaces based on configuration...
boot2docker: Adapter 1: nat
boot2docker: Adapter 2: hostonly
==> boot2docker: Forwarding ports...
boot2docker: 2375 => 2375 (adapter 1)
boot2docker: 2376 => 2376 (adapter 1)
boot2docker: 22 => 2222 (adapter 1)
==> boot2docker: Running 'pre-boot' VM customizations...
==> boot2docker: Booting VM...
==> boot2docker: Waiting for machine to boot. This may take a few minutes...
boot2docker: SSH address: 127.0.0.1:2222
boot2docker: SSH username: docker
boot2docker: SSH auth method: private key
boot2docker: Warning: Remote connection disconnect. Retrying...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run vagrant up while the
VirtualBox GUI is open.

If I debug the virtual machine with the virtualbox console it seems to start without any major errors, but right at the last shell prompt it always exits into "aborted" state. Subsequent vagrant up commands result in the same behavior. I have also tried removing all dependencies and starting from scratch, as well as previous boot2docker image version (tried 1.5.0, 1.6.0 and 1.7.0).

OSX 10.10.2
virtualbox-4.3.28
Vagrant 1.7.2

with a fresh install of all components (using presetup and setup scripts from this repo), and no changes to the Vagrantfile or vagrant.yml

NFS on Mac

NFS was failing to mount in Mac OSX. Further investigation showed that the vagrant box could not be pinged from host and the host could not be pinged from within the vagrant machine. Removing these directories/files and re-installing got me back up.

~/.vagrant
~/.vagrant.d
~/<project folder>/.vagrant

Vagrant and VirtualBox version incompatibility problems

Hi,

We've recently updates our docker machines here, and we're running into the issue that the .ssh folder cannot be mounted, thus stopping the whole vagrant up proces. The error is

==> boot2docker: Mounting shared folders...
boot2docker: /.ssh => /Users/gnoesiboe/.ssh
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attemped was:

set -e
mount -t vboxsf -o uid=id -u docker,gid=getent group docker | cut -d: -f3 .ssh /.ssh
mount -t vboxsf -o uid=id -u docker,gid=id -g docker .ssh /.ssh

The error output from the command was:

mount: mounting .ssh on /.ssh failed: Protocol error

when running the commands

set -e
mount -t vboxsf -o uid=id -u docker,gid=getent group docker | cut -d: -f3 .ssh /.ssh
mount -t vboxsf -o uid=id -u docker,gid=id -g docker .ssh /.ssh

in the guest, we're getting the following error

docker@b2d-vagrant:~$ mount -t vboxsf -o uid=id -u docker,gid=getent group do cker | cut -d: -f3 .ssh /.ssh
-sh: getent: not found
mount: you must be root

How change the default IP

AT the office the network is 192.168.10.*, and the VB IP is the same range, how I can change the default IP?

Sending build context to Docker daemon VERY slow

Has anyone else found that if you run docker build with the boot2docker-vagrant setup, the portion that says "Sending build context to Docker daemon" takes a VERY long time?

brikis98-pro:$ docker build .
Sending build context to Docker daemon 42.34 MB

The total size of the context is ~100MB, but it takes 5-10 min to get through that step. When I was using vanilla Boot2Docker, it only took a few seconds.

Any ideas what could cause that?

OSX doesn't read ~/.bashrc by default

I'm setting up a new user on my OSX box to use this and since it was so new, there wasn't a ~/.bashrc or ~/.bash_profile setup yet. OSX only reads ~/.bash_profile when creating a new tab, which CAN then have the following in it to load the ~/.bashrc, but ~/.bash_profile doesn't exist by default either.

# Load ~/.bashrc as well
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

I'd recommend throwing an error if ~/.bashrc doesn't already exist, and then maybe creating ~./bash_profile and adding this line if it doesn't ?

without it, you get this error since docker still doesn't know where to look..

Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Can't configure network interfaces

Hi,
just tried this solution for working with vagrant and docker. Did a clean install using pre-instalation scripts on osx and all went fine until last step of running the machine. I got this vagrant error:

==> boot2docker: Configuring and enabling network interfaces...
Vagrant attempted to execute the capability 'configure_networks'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.
Checking that everything is in place...
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      darwin/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Something went wrong. Please review console output for possible clues.
Vagrant 1.8.7
VirtualBox 5.1.8

Docker 1.10

Docker 1.10 has been out for about a month and a half, any chance of upgrading to it? With it comes new format for docker-compose as well.

VirtualBox GuestAdditions property timesync-set-threshold doesn't adjust syncing box time to host

I'm trying to get the virtualbox to sync it's time with the host machine as described in these settings here: http://www.virtualbox.org/manual/ch09.html#changetimesync

modinfo vboxguest verifies that version 4.3.30 of VirtualBox Guest Additions is installed.

However, the following configuration in Vagrantfile seems to make no difference:
v.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000 ]

If you wait long enough (~30 minutes), the virtualbox will eventually sync to the host, so that at least verifies that the timesync service is running in some capacity.

Windows 10 shared folders with smb2

Hello,

this vagrant box is really great, docker apps with shared folders works really fast on Mac, however i have problems with mounting shared folders on windows 10. I am doing everything according to documentation vagrant box starts properly i have access to docker in command line my docker-compose file starts containers correctly but when I try to enter inside container using docker exec shared folders are not present. Did you try it on windows 10, is there anything else that i need to make in order to make it work on windows 10?

Explore vagrant-gatling-rsync

Explore if it makes sense to start using vagrant-gatling-rsync for the rsync shared folder option on Mac and Windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.