Giter VIP home page Giter VIP logo

boot2docker-vagrant-box's People

Contributors

bountin avatar dduportal avatar dlitz avatar felixbuenemann avatar ffung avatar fnichol avatar hnakamur avatar ingoclaro avatar irvis avatar jfoy avatar laurent-sarrazin avatar legal90 avatar lmars avatar luislavena avatar mitchellh avatar myatagaw avatar phpguru avatar refractalize avatar sennerholm avatar shawnbutts avatar simongiraud avatar simonista avatar spheromak avatar tfduesing avatar wjordan avatar wojtekmach avatar yungsang avatar yurtaev 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-box's Issues

Error: Docker is not running on the guest VM

I'm using v1.4.1 of the plugin, Parallels 10.2.2 (29105), and the parallels/boot2docker 1.7.1 image. I updated to plugin v1.4.1 last night.

This worked up until last night after upgrading. Now when I try to start my VM using Vagrant and parallels, I get the following error during Docker provisioning: Docker is not running on the guest VM.

My Vagrantfile is pretty simple. I'm just trying to deploy RabbitMQ:

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

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

  config.vm.network "forwarded_port", guest: 5672, host: 5672
  config.vm.network "forwarded_port", guest: 15672, host: 15672

  config.vm.provision "docker" do |d|
    d.pull_images "rabbitmq:3-management"

    d.run "rabbitmq", image: "rabbitmq:3-management",
      args: "-p 5672:5672 -p 15672:15672"
  end
end

The log from running "vagrant up --provider=parallels" is below:

Bringing machine 'default' up with 'parallels' provider...
==> default: Importing base box 'parallels/boot2docker'...
==> default: Checking if box 'parallels/boot2docker' is up to date...
==> default: Setting the name of the VM: test_default_1438438394332_37076
==> default: Preparing network interfaces based on configuration...
    default: Adapter 0: shared
==> default: Clearing any previously set network interfaces...
==> default: Forwarding ports...
    default: 5672 => 5672
    default: 15672 => 15672
==> default: Setting power consumption mode: "Longer battery life"
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.211.55.124:22
    default: SSH username: docker
    default: SSH auth method: private key
    default: Warning: Connection refused. Retrying...
==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools were not detected on this VM! They are required
==> default: for forwarded ports, shared folders, host only networking and more.
==> default: If SSH fails or shared folders are not working on this machine,
==> default: please install Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Mounting shared folders...
    default: /Users => /Users
    default: /vagrant => /Users/michaelcollins/Projects/test
==> default: Running provisioner: docker...
Docker is not running on the guest VM.
Connection to 10.211.55.124 closed.

After the box is running, if I vagrant ssh into the box, I can run Docker commands.

Any help would be greatly appreciated.

Cannot access my OSX files on containers

Hello here

I am trying to use parallels within vagrant to replace the “normal” boot2docker due to performance issues on sharing folders.

But I am having trouble on sharing my host files (on mac OS X) to the containers.

My vagrant file looks like this:

config.vm.box = "parallels/boot2docker"
config.vm.synced_folder ".", "/vagrant", type: “nfs"

And I am following these docker compose steps to boot a simple rails app: https://docs.docker.com/compose/rails/

But the files does seem to be shared between the container and the host app

Do you have a tip on how to do this without needing to run the docker commands inside the VM?

Thanks in advance!

Upgrade to Docker 1.4.1

The Docker 1.3.3 server is incompatible with Docker 1.4.1. Would it be possible to upgrade the boot2docker ISO?

when will 1.7.1 be on atlas?

currently I am still getting 1.7.0 which seems to be missing the parallels tools at least this is what I am getting when booting the VM

==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools were not detected on this VM! They are required
==> default: for forwarded ports, shared folders, host only networking and more.
==> default: If SSH fails or shared folders are not working on this machine,
==> default: please install Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Mounting shared folders...

Docker 1.8

Docker and boot2docker 1.8 are out. An update would be highly appreciated.

Mounting an external disk

I've been using the following to add a disk for container persistence:

config.vm.provider 'parallels' do |v|
  v.customize ['set', :id, '--device-add', 'hdd']
  # other configuration options
end

However, it looks like this adds a disk every time vagrant up is executed. Is it possible to specify a custom path for a disk so that can be checked for existence on startup, ensuring --device-add is only called once? If a custom path can't be used with prlctl, how can one prevent duplicate disks from being created?

Possible to exclude folders?

Is it possible to exclude folders with Parallels Shared Folders?

I have an Ember application running a local server that watches for file changes in the shared directories. Unfortunately, sometimes it appears to flip out and think that a ton of files have been changed causing issues. I haven't seen this issue when running it on my machine locally rather than in the VM.

Thanks!
James

unable to use chef_solo inside parallels/boot2docker

I could install a riak docker image. but when I try to use my chef recipe to install rvm on the default machine I get an error.

==> default: Running provisioner: chef_solo...
    default: Installing Chef (latest)...
Vagrant attempted to execute the capability 'chef_install'
on the detect guest OS 'tinycore', 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.

My Vagrantfile:


VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.define "default", autostart: false do |default|

        # vagrant up default --provider virtualbox

        default.vm.box = "parallels/boot2docker"
        default.vm.network "private_network", ip: "192.168.33.15"
        default.vm.synced_folder ".", "/vagrant"

        default.vm.network :forwarded_port, guest: 8098, host: 8098
        default.vm.network :forwarded_port, guest: 8087, host: 8087
        #default.omnibus.chef_version = :latest
        default.berkshelf.enabled = true

        default.vm.provider "parallels" do |virtualbox|
            virtualbox.memory = 2048
        end

        default.ssh.insert_key = false
        default.ssh.username = "docker"
        default.ssh.password = "tcuser"

        config.vm.provision :chef_solo do |chef|

            chef.add_recipe "rvm::vagrant"
            chef.add_recipe "rvm::system"

            chef.json = {
                :rvm => {
                    :rubies => ['2.2.1'], 
                    :global => ['2.2.1'],
                    :default_ruby => "ruby-2.2.1",
                    :user_default_ruby => "ruby-2.2.1",
                    :gems =>  {
                        "2.2.1"=> [ 
                            {"name" => "bundler"},
                            {"name" => "passenger"},
                            {"name" => "rake"}
                        ]
                    },
                    'vagrant' => {
                        'system_chef_solo' => '/opt/chef/bin/chef-solo'
                    }
                }
            }
        end
    end


    config.vm.define "app" do |app|                                      
        app.vm.provider "docker" do |docker|                             
            docker.image = "hectcastro/riak"                             
            docker.name  = "riak"                                        
            docker.ports = %w(3333:22 8087:8087 8098:8098)               
            docker.vagrant_vagrantfile = __FILE__                        
            docker.remains_running = true                                
        end                                                              
        #docker ps                                                       
        #docker exec -it [container-id] bash                             
        # GO EDIT THE conf                                               
        # ERROR                                                          
        # riak console                                                   
        #  /etc/riak/riak.conf after line 334 column 1, parsing incomplet
        #  localstorage error                                            
        #                                                                
        #                                                                
        #  BROWSER                                                       
        #  http://192.168.33.15:8098/                                    
    end                                                                  

end                                                                      

I have some ruby scripts on the /vagrant folder of my default machine and I want to run them to feed my riak database.
How can I use both chef_solo and docker?

Update to 1.5

I've tried building the box with the 1.5 iso but it does not work properly, seems like something else needs updating as well.

With the 1.5 ISO docker on the host can't connect to docker running in the VM and the provisioned containers don't start with the VM.

Folders that are not relative to the Vagrantfile can not be mounted with docker -v

Problem

When using boot2docker-vagrant-box, sharing folders with docker [create|run] -v <local_folder>:<docker_folder> does not work if the <local_folder> path is not a sub-folder of the folder containing the Vagrantfile.

Steps to Reproduce

  1. mkdir -p /tmp/boot2docker; cd /tmp/boot2docker
  2. vagrant init parallels/boot2docker; vagrant up --provider parallels
  3. docker run -P -v $HOME/shared:/root/shared precise64 su - root -c 'ls -lart /root/shared'

Expected Result

The command at the aforementioned step 3. lists the contents of the $HOME/shared folder mapped to /root/shared.

Actual Result

The command at the aforementioned step 3. yields no results, the folder is empty (not synched).

Environment

  • OS X 10.10.x
  • Vagrant 1.7.2
  • Parallels 10.2.x
  • Parallels provider 1.4.1

Work-around

  1. mkdir -p /tmp/boot2docker; cd /tmp/boot2docker
  2. vagrant init parallels/boot2docker; vagrant up --provider parallels
  3. docker run -P -v /tmp/boot2docker/shared:/root/shared precise64 su - root -c 'ls -lart /root/shared'

If the shared folder is a sub-folder of /tmp/boot2docker (location of Vagrantfile), the share works correctly.

vagrant up asking for password

Fresh install. This is the result of my vagrant up

Bringing machine 'boot2docker' up with 'parallels' provider...
==> boot2docker: Importing base box 'parallels/boot2docker'...
==> boot2docker: Checking if box 'parallels/boot2docker' is up to date...
==> boot2docker: Setting the name of the VM: host_boot2docker_1432207690787_92688
==> boot2docker: Preparing network interfaces based on configuration...
boot2docker: Adapter 0: shared
boot2docker: Adapter 1: hostonly
==> boot2docker: Clearing any previously set network interfaces...
==> boot2docker: Forwarding ports...
boot2docker: 2375 => 2375
==> boot2docker: Setting power consumption mode: "Longer battery life"
==> boot2docker: Running 'pre-boot' VM customizations...
==> boot2docker: Booting VM...
==> boot2docker: Waiting for machine to boot. This may take a few minutes...
boot2docker: SSH address: 10.211.55.15:22
boot2docker: SSH username: docker
boot2docker: SSH auth method: private key
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
[email protected]'s password:

if I wait (or use tcuser as password)

[email protected]'s password: boot2docker: Warning: Connection timeout. Retrying...
==> boot2docker: Machine booted and ready!
==> boot2docker: Configuring and enabling network interfaces...
==> boot2docker: Exporting NFS shared folders...
==> boot2docker: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:

Nothing happens after this. Keeps waiting for the password.

vagrant version
Installed Version: 1.7.2
Latest Version: 1.7.2

Keeping VM running on window close?

How are you instructing Parallels to keep the VM open and running when the window is closed? I have attempted to do this with other operating systems previously to no avail.

NFS mounts fail with 1.7.0 and 1.7.1 on Mavericks

I'm using the following in my 'Vagrantfile':

require('fileutils')

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.define(:boot2docker) do |boot2docker|
        # ...
        boot2docker.vm.synced_folder('.', '/vagrant', disabled: true)
        mnt_path = FileUtils.pwd()
        boot2docker.vm.synced_folder(mnt_path, mnt_path, nfs: true)
        # ...
    end
end

1.6.0 works fine for nfs mounts:

% uname -a
Darwin [...] 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64
% vagrant up
Bringing machine 'boot2docker' up with 'parallels' provider...
==> boot2docker: Importing base box 'parallels/boot2docker'...
==> boot2docker: Checking if box 'parallels/boot2docker' is up to date...
==> boot2docker: A newer version of the box 'parallels/boot2docker' is available! You currently
==> boot2docker: have version '1.6.0'. The latest is version '1.7.1'. Run
==> boot2docker: `vagrant box update` to update.
==> boot2docker: Setting the name of the VM: boot2docker
==> boot2docker: Preparing network interfaces based on configuration...
    boot2docker: Adapter 0: shared
    boot2docker: Adapter 1: hostonly
==> boot2docker: Clearing any previously set network interfaces...
==> boot2docker: Setting power consumption mode: "Longer battery life"
==> boot2docker: Running 'pre-boot' VM customizations...
==> boot2docker: Booting VM...
==> boot2docker: Waiting for machine to boot. This may take a few minutes...
    boot2docker: SSH address: 10.211.55.194:22
    boot2docker: SSH username: docker
    boot2docker: SSH auth method: password
    boot2docker:
    boot2docker: Inserting generated public key within guest...
    boot2docker: Removing insecure key from the guest if its present...
    boot2docker: Key inserted! Disconnecting and reconnecting using new SSH key...
==> boot2docker: Machine booted and ready!
==> boot2docker: Configuring and enabling network interfaces...
==> boot2docker: Exporting NFS shared folders...
==> boot2docker: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> boot2docker: Mounting NFS shared folders...
==> boot2docker: Running triggers after up...
...

This is what I get for 1.7.0:

Bringing machine 'boot2docker' up with 'parallels' provider...
==> boot2docker: Importing base box 'parallels/boot2docker'...
==> boot2docker: Checking if box 'parallels/boot2docker' is up to date...
==> boot2docker: A newer version of the box 'parallels/boot2docker' is available! You currently
==> boot2docker: have version '1.7.0'. The latest is version '1.7.1'. Run
==> boot2docker: `vagrant box update` to update.
==> boot2docker: Setting the name of the VM: boot2docker
==> boot2docker: Preparing network interfaces based on configuration...
    boot2docker: Adapter 0: shared
    boot2docker: Adapter 1: hostonly
==> boot2docker: Clearing any previously set network interfaces...
==> boot2docker: Setting power consumption mode: "Longer battery life"
==> boot2docker: Running 'pre-boot' VM customizations...
==> boot2docker: Booting VM...
==> boot2docker: Waiting for machine to boot. This may take a few minutes...
    boot2docker: SSH address: 10.211.55.195:22
    boot2docker: SSH username: docker
    boot2docker: SSH auth method: password
    boot2docker:
    boot2docker: Inserting generated public key within guest...
    boot2docker: Removing insecure key from the guest if its present...
    boot2docker: Key inserted! Disconnecting and reconnecting using new SSH key...
==> boot2docker: Machine booted and ready!
==> boot2docker: Checking for Parallels Tools installed on the VM...
==> boot2docker: Parallels Tools were not detected on this VM! They are required
==> boot2docker: for forwarded ports, shared folders, host only networking and more.
==> boot2docker: If SSH fails or shared folders are not working on this machine,
==> boot2docker: please install Parallels Tools within the virtual machine and
==> boot2docker: reload your VM.
==> boot2docker: Configuring and enabling network interfaces...
==> boot2docker: Exporting NFS shared folders...
==> boot2docker: Preparing to edit /etc/exports. Administrator privileges will be required...
==> boot2docker: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' 10.211.55.2:'/Users/[path/to/vagrant/directory]' /Users/Users/[path/to/vagrant/directory]

Stdout from the command:



Stderr from the command:

mount.nfs: an incorrect mount option was specified
mount: mounting 10.211.55.2:/Users/Users/[path/to/vagrant/directory] on /Users/Users/[path/to/vagrant/directory] failed: Connection refused

I get the same for 1.7.1 (without the box version warning):

Bringing machine 'boot2docker' up with 'parallels' provider...
==> boot2docker: Importing base box 'parallels/boot2docker'...
==> boot2docker: Checking if box 'parallels/boot2docker' is up to date...
==> boot2docker: Setting the name of the VM: boot2docker
==> boot2docker: Preparing network interfaces based on configuration...
    boot2docker: Adapter 0: shared
    boot2docker: Adapter 1: hostonly
==> boot2docker: Clearing any previously set network interfaces...
==> boot2docker: Setting power consumption mode: "Longer battery life"
==> boot2docker: Running 'pre-boot' VM customizations...
==> boot2docker: Booting VM...
==> boot2docker: Waiting for machine to boot. This may take a few minutes...
    boot2docker: SSH address: 10.211.55.196:22
    boot2docker: SSH username: docker
    boot2docker: SSH auth method: password
    boot2docker: Warning: Connection refused. Retrying...
    boot2docker:
    boot2docker: Inserting generated public key within guest...
    boot2docker: Removing insecure key from the guest if its present...
    boot2docker: Key inserted! Disconnecting and reconnecting using new SSH key...
==> boot2docker: Machine booted and ready!
==> boot2docker: Checking for Parallels Tools installed on the VM...
==> boot2docker: Parallels Tools were not detected on this VM! They are required
==> boot2docker: for forwarded ports, shared folders, host only networking and more.
==> boot2docker: If SSH fails or shared folders are not working on this machine,
==> boot2docker: please install Parallels Tools within the virtual machine and
==> boot2docker: reload your VM.
==> boot2docker: Configuring and enabling network interfaces...
==> boot2docker: Exporting NFS shared folders...
==> boot2docker: Preparing to edit /etc/exports. Administrator privileges will be required...
==> boot2docker: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o 'vers=3,udp' 10.211.55.2:'/Users/[path/to/vagrant/directory]' /Users/[path/to/vagrant/directory]

Stdout from the command:



Stderr from the command:

mount.nfs: an incorrect mount option was specified
mount: mounting 10.211.55.2:/Users/[path/to/vagrant/directory] on /Users/[path/to/vagrant/directory] failed: Connection refused

Changing the first argument to synched_folder to '.' and removing the line boot2docker.vm.synced_folder('.', '/vagrant', disabled: true) doesn't seem help any. (I get the same results.)

Logging in via vagrant ssh and trying to mount explicitly gives the same error:

% cat /etc/exports
# VAGRANT-BEGIN: 501 5c733968-21bb-4716-b43e-56252f575c97
"/Users/[path/to/vagrant/directory]" 10.211.55.199 -alldirs -mapall=501:501
# VAGRANT-END: 501 5c733968-21bb-4716-b43e-56252f575c97
% vagrant ssh
...
docker@boot2docker:~$ sudo mkdir /mnt/foo
docker@boot2docker:~$ sudo mount 10.211.55.2:/Users/[path/to/vagrant/directory] /mnt/foo
mount.nfs: an incorrect mount option was specified
mount: mounting 10.211.55.2:/Users/[path/to/vagrant/directory] on /mnt/foo failed: Connection refused
docker@boot2docker:~$ sudo mount -t nfs -o vers=3,udp 10.211.55.2:/Users/[path/to/vagrant/directory] /mnt/foo
mount.nfs: an incorrect mount option was specified
mount: mounting 10.211.55.2:/Users/[path/to/vagrant/directory] on /mnt/foo failed: Connection refused

Project support status

This seems like exactly the perfect tool I want to use, with everything I need perfectly for use on Vagrant with Parallels and instructions for mounting folders.
Unfortunately, boot2docker has been recently deprecated, and this repository has not been updated in 3 years. The updated version (as of 2017) of boot2docker has not been merged even then.

Are there any alternatives? For example, creating a box from a different base image. I guess that would work fine, I just need it to work with Parallels.

Can I help? If so, how?

Thanks in advance.

P.S.: even if you decide not to support this repository anymore, I still wish to use it in my project because it's the only resource I've found so far for creating the smallest possible Docker/Kubernetes image on Parallels Desktop with shared folders to macOS

CoreOS Vagrant Box

Sorry I'm posting here, but I would be great if you can create CoreOS vagrant box with shared folders support.

Can't connect host docker client to VM on explicit IP

I'm using this Vagrantfile. Note (from L20; VM_IP_ADDR defaults to 10.1.2.3):

...
        vagrant_b2d_nfs_test.vm.network(:private_network, ip: VM_IP_ADDR)
...

When I attempt to connect to the explicit IP from the host, I'm rejected. It looks like the certificate only accommodates localhost and the dynamic IP set by Vagrant:

% DOCKER_HOST=tcp://10.1.2.3:2376 DOCKER_TLS_VERIFY=0 DOCKER_CERT_PATH="${PWD}/certs" docker images
FATA[0000] An error occurred trying to connect: Get https://10.1.2.3:2376/v1.18/images/json: x509: certificate is valid for 127.0.0.1, 10.211.55.239, not 10.1.2.3

See also dduportal/boot2docker-vagrant-box#30.

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.