Code Monkey home page Code Monkey logo

docker-machine-parallels's Introduction

Docker Machine Parallels Driver

This is a plugin for Docker Machine allowing to create Docker hosts locally on Parallels Desktop for Mac

Requirements

Attention! This will not work on the new Apple Silicon Macs.

Installation

Install via MacPorts:

sudo port install docker-machine-parallels

Install via Homebrew:

brew install docker-machine-parallels

To install this plugin manually, download the binary docker-machine-driver-parallels and make it available by $PATH, for example by putting it to /usr/local/bin/:

curl -L https://github.com/Parallels/docker-machine-parallels/releases/download/v2.0.1/docker-machine-driver-parallels > /usr/local/bin/docker-machine-driver-parallels

chmod +x /usr/local/bin/docker-machine-driver-parallels

The latest version of docker-machine-driver-parallels binary is available on the "Releases" page.

Usage

Official documentation for Docker Machine is available here.

To create a Parallels Desktop virtual machine for Docker purposes just run this command:

docker-machine create --driver=parallels prl-dev

Available options:

  • --parallels-boot2docker-url: The URL of the boot2docker image.
  • --parallels-disk-size: Size of disk for the host VM (in MB).
  • --parallels-memory: Size of memory for the host VM (in MB).
  • --parallels-cpu-count: Number of CPUs to use to create the VM (-1 to use the number of CPUs available).
  • --parallels-video-size: Size of video memory for host (in MB).
  • --parallels-share-folder: Path to the directory which should be shared with the host VM. Could be specified multiple times, once per each directory.
  • --parallels-no-share: Disable the sharing of any directory.
  • --parallels-nested-virtualization: Enable nested virtualization.

The --parallels-boot2docker-url flag takes a few different forms. By default, if no value is specified for this flag, Machine will check locally for a boot2docker ISO. If one is found, that will be used as the ISO for the created machine. If one is not found, the latest ISO release available on boot2docker/boot2docker will be downloaded and stored locally for future use.

This is the default behavior (when --parallels-boot2docker-url=""), but the option also supports specifying ISOs by the http:// and file:// protocols.

Environment variables and default values:

CLI option Environment variable Default
--parallels-boot2docker-url PARALLELS_BOOT2DOCKER_URL Latest boot2docker url
--parallels-cpu-count PARALLELS_CPU_COUNT 1
--parallels-disk-size PARALLELS_DISK_SIZE 20000
--parallels-memory PARALLELS_MEMORY_SIZE 1024
--parallels-video-size PARALLELS_VIDEO_SIZE 64
--parallels-share-folder - /Users
--parallels-no-share - false
--parallels-nested-virtualization - false

Development

Build from Source

If you wish to work on Parallels Driver for Docker machine, you'll first need Go installed (version 1.14+ is required). Make sure Go is properly installed, including setting up a GOPATH.

Run these commands to build the plugin binary:

go get -d github.com/Parallels/docker-machine-parallels
cd $GOPATH/src/github.com/Parallels/docker-machine-parallels
make build

After the build is complete, bin/docker-machine-driver-parallels binary will be created. If you want to copy it to the ${GOPATH}/bin/, run make install.

Managing Dependencies

When you make a fresh copy of the repo, all the dependencies are in vendor/ directory for the build to work. This project uses golang/dep as dependency management tool. Please refer to dep documentation for further details.

Acceptance Tests

We use Bats for acceptance testing, so, install it first.

You also need to build the plugin binary by calling make build.

Then you can run acceptance tests using this command:

make test-acceptance

Acceptance tests will invoke the general docker-machine binary available by $PATH. If you want to specify it explicitly, just set MACHINE_BINARY env variable:

MACHINE_BINARY=/path/to/docker-machine make test-acceptance

Authors

docker-machine-parallels's People

Contributors

bassam avatar blueimp avatar cjlapao avatar etehtsea avatar iby avatar legal90 avatar rickard-von-essen avatar romankulikov avatar rzr avatar velociround 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-machine-parallels's Issues

Cannot lookup registry-1.docker.io... again

I see that this issue has been filed several times, and is closed as fixed in Parallels 11.1.0. Unfortunately, I recently updated to 11.1.0, and I am still seeing the problem.

Parallels version: 11.1.0 (32202)
docker version: 1.9.1
docker-machine version: 1.5.1
docker-machine-parallels version: 1.1.0

$ docker pull busybox
Using default tag: latest
Pulling repository docker.io/library/busybox
Get https://registry-1.docker.io/v1/repositories/library/busybox/tags/latest: dial tcp: lookup registry-1.docker.io: no such host

I tried the debugging steps mentioned in #11, but dig worked fine in trying to resolve registry-1.docker.io.

can't create hard link in a volume

This is the version installed:

Camerons-iMac:visualfsharp-docker cameron$ brew list --versions
docker-machine 0.6.0
docker-machine-parallels 1.1.1_1

Steps to Reproduce

mkdir template
docker run --rm -ti -v $PWD/template:/root/template ctaggart/visualfsharp
cd template
echo 'zelda' > game.txt
ln game.txt game2.txt
cat game2.txt

Ouptut using Parallels driver

Camerons-iMac:visualfsharp-docker cameron$ docker run --rm -ti -v $PWD/template:/root/template ctaggart/visualfsharp
root@fa76a128f079:~# ls
template
root@fa76a128f079:~# cd template
root@fa76a128f079:~/template# echo 'zelda' > game.txt
root@fa76a128f079:~/template# echo 'zelda' > game.txt
root@fa76a128f079:~/template# ln game.txt game2.txt
ln: failed to create hard link 'game2.txt' => 'game.txt': Operation not permitted

Output using VirtualBox or Google drivers

root@d31410de4fb0:~# cd template/
root@d31410de4fb0:~/template# echo 'zelda' > game.txt
root@d31410de4fb0:~/template# ln game.txt game2.txt
root@d31410de4fb0:~/template# cat game2.txt
zelda

For now, I'll switch to VirtualBox, but I'd like to be able to use my Parallels for this. I found this while troubleshooting a File.Move from the new .NET Core. https://github.com/dotnet/corefx/issues/7091

"unexpected EOF" error when trying to create machine

I upgraded to the latest versions of docker-machine and Parallels Desktop Pro. I also made sure that I have the latest version of the Parallels plugin using Homebrew. When I try to create a machine, it fails with an "unexpected EOF" error. The debug log is below.

Any ideas what I can try to fix this?

Docker Machine Version: 0.6.0, build e27fb87
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:63500
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:63504
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(dev) Calling .GetMachineName
(dev) Calling .DriverName
(dev) Calling .GetCreateFlags
(dev) Calling .SetConfigFromFlags
Creating CA: /Users/michaelcollins/.docker/machine/certs/ca.pem
Creating client certificate: /Users/michaelcollins/.docker/machine/certs/cert.pem
Running pre-create checks...
(dev) Calling .PreCreateCheck
(dev) DBG | executing: prlctl --version
(dev) DBG | executing: prlsrvctl info --license
(dev) DBG | Found Parallels Desktop version: 11, edition: pro
(dev) Calling .GetConfigRaw
Creating machine...
(dev) Calling .Create
(dev) Image cache does not exist, creating it at /Users/michaelcollins/.docker/machine/cache...
(dev) No default boot2docker iso found locally, downloading the latest release...
Error creating machine: Error in driver during machine creation: unexpected EOF
open : no such file or directory
notifying bugsnag: [Error creating machine: Error in driver during machine creation: unexpected EOF]

No option to create container in a bridged network

So I've had trouble with trying to follow this guide.
http://docs.docker.com/engine/userguide/networking/get-started-overlay/

Most of the commands works, but falls over when creating the swarm hosts. Basically the port 3376 is closed due the container being created using a shared interface.

The docker-machine gets to last stage then reports

Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded

looking further into it, when using eval $(docker-machine env --swarm mhs-demo0)
I get

"10.211.55.6:3376": dial tcp 10.211.55.6:3376: getsockopt: connection refused

Which makes sense because there is no port forwarding for this port, but each swarm host 'needs' this port. So manually setting the port forwarding only works for one host, which is pointless.

Is there an option to create the host with docker-machine's parallel driver specifying the network type and adapter? If not is there any future plans in resolving this issue? As the above case is pretty useful for trying out a swarm deployment before it's deployed onto real servers.

Some errors with docker-machine 5.5

can not run such as ls rm even create

this is the create log:

ZHANGXIAOFENGdeMacBook:.docker zhangxiaofeng$ docker-machine --debug create --driver=parallels --parallels-disk-size=65536 --parallels-memory=4096 --parallels-cpu-count=-1 prl-new
Docker Machine Version: 0.5.5, build
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:50308
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:50312
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(prl-new) Calling .GetMachineName
(prl-new) Calling .DriverName
(prl-new) Calling .GetCreateFlags
(prl-new) Calling .SetConfigFromFlags
Creating CA: /Users/zhangxiaofeng/.docker/machine/certs/ca.pem
Creating client certificate: /Users/zhangxiaofeng/.docker/machine/certs/cert.pem
Running pre-create checks...
(prl-new) Calling .PreCreateCheck
Error creating machine: Error with pre-create check: connection is shut down

Parallels 13.0 issue

VM never starts.

> docker-machine -D create --driver=parallels prl-dev
Docker Machine Version:  0.12.2, build 9371605
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:58803
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:58807
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(prl-dev) Calling .GetMachineName
(prl-dev) Calling .DriverName
(prl-dev) Calling .GetCreateFlags
(prl-dev) Calling .SetConfigFromFlags
Running pre-create checks...
(prl-dev) Calling .PreCreateCheck
(prl-dev) DBG | executing: /usr/local/bin/prlctl --version
(prl-dev) DBG | executing: /usr/local/bin/prlsrvctl info --license
(prl-dev) DBG | Found Parallels Desktop version: 13, edition: business
(prl-dev) DBG | executing: /usr/local/bin/prlsrvctl net info Shared
(prl-dev) DBG | local Boot2Docker ISO version:  v17.06.1-ce
(prl-dev) Calling .GetConfigRaw
Creating machine...
(prl-dev) Calling .Create
(prl-dev) DBG | local Boot2Docker ISO version:  v17.06.1-ce
(prl-dev) Copying /Users/rolsen/.docker/machine/cache/boot2docker.iso to /Users/rolsen/.docker/machine/machines/prl-dev/boot2docker.iso...
(prl-dev) Creating SSH key...
(prl-dev) DBG | SSH key: /Users/rolsen/.docker/machine/machines/prl-dev/id_rsa
(prl-dev) Creating Parallels Desktop VM...
(prl-dev) DBG | executing: /usr/local/bin/prlctl --version
(prl-dev) DBG | executing: /usr/local/bin/prlctl create prl-dev --distribution boot2docker --dst /Users/rolsen/.docker/machine/machines/prl-dev --no-hdd
(prl-dev) DBG | executing: /usr/local/bin/prlctl set prl-dev --select-boot-device off --cpus 4 --memsize 4096 --cpu-hotplug off --on-window-close keep-running --longer-battery-life on --3d-accelerate off --device-bootorder cdrom0
(prl-dev) DBG | executing: /usr/local/bin/prlctl set prl-dev --device-set cdrom0 --iface sata --position 0 --image /Users/rolsen/.docker/machine/machines/prl-dev/boot2docker.iso --connect
(prl-dev) DBG | executing: /usr/local/bin/prlctl set prl-dev --device-add hdd --iface sata --position 1 --image /Users/rolsen/.docker/machine/machines/prl-dev/disk.hdd --type plain --size 32
(prl-dev) DBG | Writing magic tar header
(prl-dev) DBG | Writing SSH key tar header
(prl-dev) DBG | HDS image path: /Users/rolsen/.docker/machine/machines/prl-dev/disk.hdd/disk.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds
(prl-dev) DBG | executing: /usr/local/bin/prl_disk_tool convert --expanding --hdd /Users/rolsen/.docker/machine/machines/prl-dev/disk.hdd
Error creating machine: Error in driver during machine creation: exit status 2
notifying bugsnag: [Error creating machine: Error in driver during machine creation: exit status 2]
> /usr/local/bin/prl_disk_tool convert --expanding --hdd /Users/rolsen/.docker/machine/machines/prl-dev/disk.hdd
Unable to open the disk image.
> ls -la /Users/rolsen/.docker/machine/machines/prl-dev/disk.hdd
total 8
drwxr-xr-x 5 rolsen staff  170 Aug 29 11:12 .
drwx------ 8 rolsen staff  272 Aug 29 11:12 ..
-rw-r--r-- 1 rolsen staff 1600 Aug 29 11:12 DiskDescriptor.xml
-rw-r--r-- 1 rolsen staff 1600 Aug 29 11:12 DiskDescriptor.xml.Backup
-rw-rw-rw- 1 rolsen staff    0 Aug 29 11:12 disk.hdd

Parallels driver not syncing folder

I saw similar issue being already pasted, but saw no workaround or a solution, so I'd like to bring this to light again.

I am trying to docker-compose a set of images using Parallels on OS X 10.11.1 using this http://pastebin.com/dc3mNYY5. Resulting set of docker containers should be used as a symfony app server base with the whole app located in ./application directory relative to the docker-compose.yml file and that is all.

When this YML file is executed with virtualbox provider, everything works.

When it gets executed on a docker machine using parallels driver, the directory /var/www/app is there, but is empty.

Mount shows the /var/www/app mounted in both cases as follows:

Virtualbox

root@0c373a60e799:/var/www/app# ls
README.md  app  bin  composer.json  composer.lock  src  vendor  web
root@0c373a60e799:/var/www/app# mount | grep www/app
none on /var/www/app type vboxsf (rw,nodev,relatime)
root@0c373a60e799:/var/www/app#

Parallels

root@646168514ec2:/var/www/app# ls
root@646168514ec2:/var/www/app# mount | grep var/www
tmpfs on /var/www/app type tmpfs (rw,relatime,size=917172k)
root@646168514ec2:/var/www/app# 

I have freshly installed Parallels Desktop Pro 11.1.0 (32202) and Parallels driver for docker-machine installed via brew. I had boot2docker installed previously so I had to remove it's files in /usr/local/bin and then re-link brew-made binaries. I'm not sure if that is relevant in any way.

Any ideas?

Driver does not work with docker-machine 0.5.5

Reported by @leedm777
Moved from https://github.com/Parallels/docker-machine/issues/10

$ brew switch docker-machine 0.5.4
Cleaning /usr/local/Cellar/docker-machine/0.5.4
Cleaning /usr/local/Cellar/docker-machine/0.5.5
4 links created for /usr/local/Cellar/docker-machine/0.5.4

$ docker-machine ls
NAME          ACTIVE   DRIVER       STATE     URL                       SWARM   DOCKER    ERRORS
default       *        parallels    Running   tcp://10.211.55.70:2376           v1.9.1    
dev           -        virtualbox   Stopped                                     Unknown   
dns-testing   -        parallels    Stopped                                     Unknown   

$ brew switch docker-machine 0.5.5
Cleaning /usr/local/Cellar/docker-machine/0.5.4
Cleaning /usr/local/Cellar/docker-machine/0.5.5
4 links created for /usr/local/Cellar/docker-machine/0.5.5

$ docker-machine ls
Error attempting call to get driver name: connection is shut down
Error attempting call to get driver name: connection is shut down
NAME          ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER    ERRORS
default       -                     Error                   Unknown   unexpected EOF
dev           -        virtualbox   Stopped                 Unknown   
dns-testing   -                     Error                   Unknown   
Error closing a plugin driver: connection is shut down
Error closing a plugin driver: connection is shut down

Parallels docker-machine not working with custom $MACHINE_STORAGE_PATH

When I have $MACHINE_STORAGE_PATH=.machine , e.g. use folder .machine inside current directory, Parallels docker-machine fails to start with an error: Error creating machine: Error in driver during machine creation: prlctl create prl-dev --distribution boot2docker --dst .machine/machines/prl-dev --no-hdd failed: exit status 1. The same setting works, for example, with DigitalOcean driver.

Can't create VM problem with version parsing

docker-machine -D create -d parallels --parallels-memory 4096 --parallels-cpu-count 8 --parallels-disk-size 40000 --parallels-no-share dinghy          
Docker Machine Version:  0.12.2, build 9371605
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:49937
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:49941
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(dinghy) Calling .GetMachineName
(dinghy) Calling .DriverName
(dinghy) Calling .GetCreateFlags
(dinghy) Calling .SetConfigFromFlags
Running pre-create checks...
(dinghy) Calling .PreCreateCheck
(dinghy) DBG | executing: /usr/local/bin/prlctl --version
(dinghy) DBG | executing: /usr/local/bin/prlsrvctl info --license
(dinghy) DBG | Found Parallels Desktop version: &{%!d(string=) %!d(string=) [13 0 1] 3}, edition: business
(dinghy) DBG | executing: /usr/local/bin/prlsrvctl net info Shared
Error with pre-create check: "exit status 255"
notifying bugsnag: [Error with pre-create check: "exit status 255"]

Shared volume disappears after shut down

For some reason, every time I shut down (by quitting parallels) the vm, the /Users volume disappears resulting in a whole bunch of issues when starting docker with mounted volumes. Is there a way to manually mount the volume before there's a better solution?

Enable Parallels Desktop 10 support

Would you be opposed to introducing support for Parallels Desktop 10 and lower (if possible)?

Is there any technical reason why this plugin is limited to Parallels 11?

Error when creating new virtual machine

I use the command docker-machine create --driver=parallels prl-dev. But it failed with:

Error creating machine: Error in driver during machine creation: prlctl create prl-dev --distribution boot2docker --dst /Users/daniel/.docker/machine/machines/prl-dev --no-hdd failed: exit status 255

parallels version is 11.0.2 pro edition

docker-machine 0.6.0 incompability

When used with docker-machine 0.6.0, will get a "unexpected EOF" error from driver.

Creating machine...
(dev) Calling .Create
(dev) No default boot2docker iso found locally, downloading the latest release...
Error creating machine: Error in driver during machine creation: unexpected EOF
open : no such file or directory
notifying bugsnag: [Error creating machine: Error in driver during machine creation: unexpected EOF]

Shared files are not synced correctly on host and guest

I was having a nasty issue with VirtualBox / Kitematic awhile ago, which resulted in files stopping syncing across host and vm. I've seen a few related issues in the past, but never found this exact one. On the left is the file I've just updated on host, on the right is the same file but inside boot2docker vm running on parallels driver.

image

As I was typing, the file got synced with the host about 20 min later after I changed it. This is better than VirtualBox, as it never happened in there. I had to reboot the host os to see the effects or use some hacks like move the file from within the guest (see the aforementioned issue). The biggest problem with this is that it's completely inconsistent. It might be happening after vm wasn't touched for awhile, probably after going to sleep a few times and not updating the given file. I never was able to reproduce this 100% to provide clear steps.

Because of this I cannot use shared volumes to full capacity. That's already a huge problem with a single configuration file, scared to think what might go wrong when I save an entire database on a mounted volume. Is there any theoretical reason why this might be happening and how to trace this down? May this be a problem with boot2docker itself?

Feature request: support NFS as alternative means to mount /Users

There are host of permissions-related issues with both Docker in general as well as using it with OS X host volumes in particular (e.g., via Boot2Docker). Here is a decent summary:

Most of these issue can be worked around by careful use of NFS with the mapall option (see, e.g., this boot2docker/boot2docker#587 (comment), and even this #12 (comment)).

Parallels already supports a --parallels-no-share option (perhaps meant to address this Boot2Docker shortcoming). It might be nice to enable something like this:

% docker-machine create --help --driver parallels
...
  --parallels-share-type "native"   "native" or "nfs[:<mount_options>]" where
                                    <mount_options> are optional NFS options,
                                    such as "mapall=999:999,nolock,sync"
...

Then you could do something like:

% docker-machine create --driver parallels ... --parallels-share-type "nfs:mapall=$( id -u ):$( id -g )" ...

License

I don't see a license in this repo. How may I use / reproduce this code?

"Found extra arguments" error

I run:

docker-machine create --driver=parallels prl-dev --parallels-disk-size=64000 --parallels-memory=4096 --parallels-cpu-count=2 --parallels-boot2docker-url="https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso"

Error:

Invalid command line. Found extra arguments [--parallels-disk-size=64000 --parallels-memory=4096 --parallels-cpu-count=2 --parallels-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.11.2/boot2docker.iso]

Al these commands are in the documentation. What did I do wrong?

Running Parallels Desktop 12 for Mac Pro Edition

allow setting of more (any?) option when creating machines

i would like to change the default configuration for a number of options before the vm is started. (eg. --longer-battery-life off, --isolate-vm on, --device-del usb, --device-del sound0, --device-set hdd0 --online-compact off, ..). my end goal is to provision a vm tuned for performance over battery usage and disk space.

it would be easier if this were possible to do during the docker-machine creation phase - after it's created but before it is started. this is because some of the options i want to set require the vm to be stopped, which means the certificates need to be recreated after it's restarted.

perhaps add the ability to pass in a file which is executed immediately before the vm is started in parallels.go::Create() (eg. a json file with params for "prlctl set", or a shell script which is simply executed).

thanks!

Error checking TLS connection: Host is not running

Every time I create a new docker-machine using the parallels driver I find myself unable to use docker.
I get the message Error checking TLS connection: Host is not running and the machine doesn't respond.

I tried to recreate the machine multiple times with no luck.

It used to work well until a few weeks ago

docker-machine version 0.14.0, build 89b8332
Docker version 18.03.0-ce, build 0520e24
docker-machine-parallels v1.3.0
macOs 10.13.4

Support for bridge network

Will there be any support for bridge network? I'm having difficulty using bridged network mode. My workflow relies on configuration of the local network and host machine. For example compose up sets up DNS entries on the host machine used globally to identify individual docker instances (as opposed to using the instance names).

Problem resolving Docker Hub domains

I have trouble seaching/pulling images form Docker Hub. Most of the time (but not always) I get this message:

$ docker search busybox
Error response from daemon: Get https://index.docker.io/v1/search?q=busybox: dial tcp: lookup index.docker.io: no such host
$ docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
039b63dd2cba: Pulling fs layer
c51f86c28340: Pulling fs layer
Pulling repository docker.io/library/busybox
Get https://registry-1.docker.io/v1/repositories/library/busybox/tags/latest: dial tcp: lookup registry-1.docker.io: no such host

Because resolution was succeeding at times, I was able to pull an ubuntu image and install dnsutils. When resolving index.docker.io or registry-1.docker.io most of the time I got results similar to these:

$ dig index.docker.io
;; Got bad packet: extra input data
212 bytes
7f fe 81 80 00 01 00 05 00 00 00 01 05 69 6e 64          .............ind
65 78 06 64 6f 63 6b 65 72 02 69 6f 00 00 01 00          ex.docker.io....
01 c0 0c 00 05 00 01 00 00 01 22 00 1e 06 65 6c          .........."...el
62 2d 69 6f 09 75 73 2d 65 61 73 74 2d 31 03 61          b-io.us-east-1.a
77 73 04 64 63 6b 72 c0 19 c0 2d 00 05 00 01 00          ws.dckr...-.....
00 02 49 00 44 26 75 73 2d 65 61 73 74 2d 31 2d          ..I.D&us-east-1-
65 6c 62 69 6f 2d 72 6d 35 62 6f 6e 31 71 61 65          elbio-rm5bon1qae
6f 34 2d 36 32 33 32 39 36 32 33 37 09 75 73 2d          o4-623296237.us-
65 61 73 74 2d 31 03 65 6c 62 09 61 6d 61 7a 6f          east-1.elb.amazo
6e 61 77 73 03 63 6f 6d 00 c0 55 00 01 00 01 00          naws.com..U.....
00 00 32 00 04 34 01 f2 ec c0 55 00 01 00 01 00          ..2..4....U.....
00 00 32 00 04 36 ad 6f db c0 55 00 01 00 01 00          ..2..6.o..U.....
00 00 32 00 04 34 05 24 19 00 00 29 05 00 00 00          ..2..4.$...)....
00 00 00 00                                              ....
$ dig registry-1.docker.io
;; Got bad packet: extra input data
275 bytes
43 0b 81 80 00 01 00 08 00 00 00 01 0a 72 65 67          C............reg
69 73 74 72 79 2d 31 06 64 6f 63 6b 65 72 02 69          istry-1.docker.i
6f 00 00 01 00 01 c0 0c 00 05 00 01 00 00 01 2a          o..............*
00 24 0c 65 6c 62 2d 72 65 67 69 73 74 72 79 09          .$.elb-registry.
75 73 2d 65 61 73 74 2d 31 03 61 77 73 04 64 63          us-east-1.aws.dc
6b 72 c0 1e c0 32 00 05 00 01 00 00 03 82 00 48          kr...2.........H
2a 75 73 2d 65 61 73 74 2d 31 2d 65 6c 62 72 65          *us-east-1-elbre
67 69 73 2d 31 30 66 75 63 73 76 6a 31 74 63 67          gis-10fucsvj1tcg
79 2d 31 33 33 38 32 31 38 30 30 09 75 73 2d 65          y-133821800.us-e
61 73 74 2d 31 03 65 6c 62 09 61 6d 61 7a 6f 6e          ast-1.elb.amazon
61 77 73 03 63 6f 6d 00 c0 60 00 01 00 01 00 00          aws.com..`......
00 3a 00 04 34 01 63 34 c0 60 00 01 00 01 00 00          .:..4.c4.`......
00 3a 00 04 36 d2 3b b2 c0 60 00 01 00 01 00 00          .:..6.;..`......
00 3a 00 04 36 d2 f3 09 c0 60 00 01 00 01 00 00          .:..6....`......
00 3a 00 04 34 05 56 fe c0 60 00 01 00 01 00 00          .:..4.V..`......
00 3a 00 04 34 16 6d 32 c0 60 00 01 00 01 00 00          .:..4.m2.`......
00 3a 00 04 36 56 7e 38 00 00 29 05 00 00 00 00          .:..6V.8..).....
00 00 00                                                 ...

The same output was produced form a statically compiled dig running directly in the VM (downloaded from here). Strangely nslookup works from the VM (preinstalled) but fails from within the container.

vm$ nslookup index.docker.io
Server:    10.211.55.1
Address 1: 10.211.55.1

Name:      index.docker.io
Address 1: 52.1.242.236 ec2-52-1-242-236.compute-1.amazonaws.com
Address 2: 52.5.36.25 ec2-52-5-36-25.compute-1.amazonaws.com
Address 3: 54.173.111.219 ec2-54-173-111-219.compute-1.amazonaws.com
container$ nslookup index.docker.io
;; Got bad packet: extra input data
201 bytes
52 80 81 80 00 01 00 05 00 00 00 00 05 69 6e 64          R............ind
65 78 06 64 6f 63 6b 65 72 02 69 6f 00 00 01 00          ex.docker.io....
01 c0 0c 00 05 00 01 00 00 01 13 00 1e 06 65 6c          ..............el
62 2d 69 6f 09 75 73 2d 65 61 73 74 2d 31 03 61          b-io.us-east-1.a
77 73 04 64 63 6b 72 c0 19 c0 2d 00 05 00 01 00          ws.dckr...-.....
00 01 94 00 44 26 75 73 2d 65 61 73 74 2d 31 2d          ....D&us-east-1-
65 6c 62 69 6f 2d 72 6d 35 62 6f 6e 31 71 61 65          elbio-rm5bon1qae
6f 34 2d 36 32 33 32 39 36 32 33 37 09 75 73 2d          o4-623296237.us-
65 61 73 74 2d 31 03 65 6c 62 09 61 6d 61 7a 6f          east-1.elb.amazo
6e 61 77 73 03 63 6f 6d 00 c0 55 00 01 00 01 00          naws.com..U.....
00 00 23 00 04 36 ad 6f db c0 55 00 01 00 01 00          ..#..6.o..U.....
00 00 23 00 04 34 05 24 19 c0 55 00 01 00 01 00          ..#..4.$..U.....
00 00 23 00 04 34 01 f2 ec                               ..#..4...

Resolution on my host system or from a newly created VM on VirtualBox works just fine. Also I am able to resolve at least google.com and archive.ubuntu.com without problems. Changing the used DNS server in /etc/resolv.conf to 8.8.8.8 and restarting the Docker Daemon fixes the problem, but this is reseted on the next reboot by the DHCP client udhcpc.

My current setup:

  • OS X: 10.11.2 Beta (15C31f)
  • Parallels Desktop 11 Pro Edition: 11.0.2 (31348)
  • boot2docker: 1.9.0 master : 16e4a2a - Tue Nov 3 19:49:22 UTC 2015

Problem with files

I create docker vm with overlay storage driver.

Very often, when installing programs via pip install inside vm, I get errors with inaccessible files.

Installing collected packages: Django, django-cacheback, django-gravatar2, newrelic, contextlib2, raven
  Found existing installation: Django 1.8.7
    Uninstalling Django-1.8.7:
      Successfully uninstalled Django-1.8.7
  Exception:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 246, in main
      status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 352, in run
      root=options.root_path,
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 704, in install
      requirement.commit_uninstall()
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 743, in commit_uninstall
      self.uninstalled.commit()
    File "/usr/local/lib/python2.7/dist-packages/pip/req/req_uninstall.py", line 153, in commit
      rmtree(self.save_dir)
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
      return Retrying(*dargs, **dkw).call(f, *args, **kw)
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/retrying.py", line 212, in call
      raise attempt.get()
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/retrying.py", line 247, in get
      six.reraise(self.value[0], self.value[1], self.value[2])
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/retrying.py", line 200, in call
      attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 67, in rmtree
      onerror=rmtree_errorhandler)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
      onerror(os.remove, fullname, sys.exc_info())
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 75, in rmtree_errorhandler
      if os.stat(path).st_mode & stat.S_IREAD:
  OSError: [Errno 2] No such file or directory: '/tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py

List of temporary folder:

root@1d1af6bf00a7:/opt/vluki# ls -la /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/vary.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/__init__.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/debug.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/gzip.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/clickjacking.py: No such file or directory
ls: cannot access /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/decorators/http.py: No such file or directory
total 8
d-w------- 2 root root 4096 Dec 15 07:48 .
drwxr-xr-x 4 root root 4096 Dec 15 07:48 ..
c????????? ? ?    ?       ?            ? cache.py
c????????? ? ?    ?       ?            ? clickjacking.py
c????????? ? ?    ?       ?            ? csrf.py
c????????? ? ?    ?       ?            ? debug.py
c????????? ? ?    ?       ?            ? gzip.py
c????????? ? ?    ?       ?            ? http.py
c????????? ? ?    ?       ?            ? __init__.py
c????????? ? ?    ?       ?            ? vary.py

root@1d1af6bf00a7:/opt/vluki# ls -la /tmp/pip-U_M5gO-uninstall/usr/local/lib/python2.7/dist-packages/django/views/
total 96
drwxr-xr-x  4 root root   4096 Dec 15 07:48 .
drwxr-xr-x 17 root root   4096 Dec 15 07:48 ..
-rw-r--r--  1 root staff  5057 Dec  7 08:38 csrf.py
-rw-r--r--  1 root staff 47451 Dec  7 08:38 debug.py
d-w-------  2 root root   4096 Dec 15 07:48 decorators
-rw-r--r--  1 root staff  2752 Dec  7 08:38 defaults.py
drwxr-xr-x  2 root root   4096 Dec 15 07:48 generic
-rw-r--r--  1 root staff 11043 Dec  7 08:38 i18n.py
-rw-r--r--  1 root staff     0 Dec  7 08:38 __init__.py
-rw-r--r--  1 root staff  5142 Dec  7 08:38 static.py

Support "bridged" network mode

Hey

This driver for now uses /Library/Preferences/Parallels/parallels_dhcp_leases that shows ip assigned by parallels' dhcp. I changed network mode of contained to "bridge" so my containers are exposed in local network, but docker-machine ip still shows old ip address from parallels_dhcp_leases.

Could you implement support for bridged mode, please?

Docker machine cannot lookup docker.io

Docker run and pull commands return host lookup error.

Output of docker run ubuntu:

Unable to find image 'ubuntu:latest' locally
Pulling repository docker.io/library/ubuntu
Get https://registry-1.docker.io/v1/repositories/library/ubuntu/tags/latest: dial tcp: lookup registry-1.docker.io: no such host

Output of docker-machine env dockermachine:

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://10.211.55.56:2376"
export DOCKER_CERT_PATH="/Users/hombit/.docker/machine/machines/dockermachine"
export DOCKER_MACHINE_NAME="dockermachine"
# Run this command to configure your shell:
# eval "$(docker-machine env dockermachine)"

OS X 10.11.1, Parallels Pro 11.0.2, Docker 1.9.0, docker-machine-parallels 1.0.1.

Feature: Automate tools install

I'm using docker-machine alongside RancherOS instead of boot2docker and everything works great except I'm missing the guest tools. I would expect this plugin to automate that install.

Can't SSH into recently created machine.

First:

~ brew install docker docker-machine docker-machine-parallels

Then...

~ docker-machine create --driver parallels default
Running pre-create checks...
Creating machine...
(default) Copying /Users/romulo/.docker/machine/cache/boot2docker.iso to /Users/romulo/.docker/machine/machines/default/boot2docker.iso...
(default) Creating SSH key...
(default) Creating Parallels Desktop VM...
(default) Starting Parallels Desktop VM...
(default) Waiting for VM to come online...

..and the VM never comes online.

Opening Parallels I see the VM running but any attempts to SSH into it fail by timeout.

Postgresql problem with mounted volume for data

I believe this is the same problem with #28 and it works on Docker for Mac (Hyperkit) but not via docker-machine-parallels.

I have just purchased Parallels Pro for the reasons it has much better IO performance vs (free) Docker for Mac. prl_fs being unable to fsync looks like a big showstopper. Is fsync for prl_fs going to be worked on?

2017-11-30 04:34:40.135 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2017-11-30 04:34:40.135 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2017-11-30 04:34:40.137 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2017-11-30 04:34:40.170 UTC [21] LOG:  database system was interrupted; last known up at 2017-11-28 11:55:57 UTC
2017-11-30 04:34:40.845 UTC [21] LOG:  could not fsync file "./base/1": Invalid argument
2017-11-30 04:34:40.923 UTC [21] LOG:  could not fsync file "./base/106898": Invalid argument
2017-11-30 04:34:40.998 UTC [21] LOG:  could not fsync file "./base/108500": Invalid argument
2017-11-30 04:34:41.068 UTC [21] LOG:  could not fsync file "./base/110098": Invalid argument
2017-11-30 04:34:41.136 UTC [21] LOG:  could not fsync file "./base/126482": Invalid argument
2017-11-30 04:34:41.205 UTC [21] LOG:  could not fsync file "./base/12993": Invalid argument
2017-11-30 04:34:41.290 UTC [21] LOG:  could not fsync file "./base/12994": Invalid argument
2017-11-30 04:34:41.290 UTC [21] LOG:  could not fsync file "./base": Invalid argument
2017-11-30 04:34:41.308 UTC [21] LOG:  could not fsync file "./global": Invalid argument

docker-machine on macOS 10.12.4 (Mac Pro 3,1 Unsupported)

Hi, I know I am using an unsupported MacPro 3,1 but I am only having issues creating a docker machine using Parallels with this machine, but all other functions of Parallels work. Can somebody check into this?

Christophers-Mac-Pro:~ czenzel$ docker-machine create -d parallels prl-dev
Creating CA: /Users/czenzel/.docker/machine/certs/ca.pem
Creating client certificate: /Users/czenzel/.docker/machine/certs/cert.pem
failed MSpanList_Insert 0xc1a8a0 0x2373e0359f1 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.MSpanList_Insert(0xb36210, 0xc1a8a0)
	/usr/src/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Alloc(0xb33280, 0x1, 0x1000000000a, 0xdfd9)
	/usr/src/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0xb3a6f8, 0xc1a630)
	/usr/src/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0xc14000, 0xa, 0xc1a630)
	/usr/src/go/src/runtime/mcache.c:90 +0xa0

goroutine 1 [running]:
runtime.switchtoM()
	/usr/src/go/src/runtime/asm_amd64.s:198 fp=0xc2080f0380 sp=0xc2080f0378
runtime.mallocgc(0x90, 0x587ea0, 0xc200000001, 0xc2080ebef0)
	/usr/src/go/src/runtime/malloc.go:178 +0x849 fp=0xc2080f0430 sp=0xc2080f0380
runtime.newarray(0x587ea0, 0x11, 0xc2080ebef0)
	/usr/src/go/src/runtime/malloc.go:365 +0xc1 fp=0xc2080f0468 sp=0xc2080f0430
runtime.makeslice(0x7808e0, 0x11, 0x11, 0x0, 0x0, 0x0)
	/usr/src/go/src/runtime/slice.go:32 +0x15c fp=0xc2080f04b0 sp=0xc2080f0468
math/big.nat.divLarge(0xc20800cdc0, 0x10, 0x25, 0xc2080a2d80, 0x20, 0x24, 0xc2080a2c60, 0x20, 0x24, 0xc208042c80, ...)
	/usr/src/go/src/math/big/nat.go:541 +0x2d0 fp=0xc2080f0648 sp=0xc2080f04b0
math/big.nat.div(0xc20800cdc0, 0x10, 0x25, 0xc2080a2d80, 0x20, 0x24, 0xc2080a2c60, 0x20, 0x24, 0xc208042c80, ...)
	/usr/src/go/src/math/big/nat.go:519 +0x35a fp=0xc2080f06f0 sp=0xc2080f0648
math/big.nat.expNNWindowed(0xc2080a2c60, 0x20, 0x24, 0xc2080437c0, 0x10, 0x14, 0xc208042aa0, 0x10, 0x14, 0xc208042c80, ...)
	/usr/src/go/src/math/big/nat.go:1361 +0xdd7 fp=0xc2080f0980 sp=0xc2080f06f0
math/big.nat.expNN(0xc208043900, 0x10, 0x14, 0xc2080437c0, 0x10, 0x14, 0xc208042aa0, 0x10, 0x14, 0xc208042c80, ...)
	/usr/src/go/src/math/big/nat.go:1260 +0x4b0 fp=0xc2080f0b18 sp=0xc2080f0980
math/big.nat.probablyPrime(0xc208042c80, 0x10, 0x14, 0x14, 0x14)
	/usr/src/go/src/math/big/nat.go:1445 +0x887 fp=0xc2080f0c90 sp=0xc2080f0b18
math/big.(*Int).ProbablyPrime(0xc2080e4b20, 0x14, 0xc2080e4b40)
	/usr/src/go/src/math/big/int.go:741 +0x4a fp=0xc2080f0cc0 sp=0xc2080f0c90
crypto/rand.Prime(0xc25d48, 0xc20803c3c0, 0x400, 0xc2080e4b20, 0x0, 0x0)
	/usr/src/go/src/crypto/rand/util.go:99 +0x479 fp=0xc2080f0d70 sp=0xc2080f0cc0
crypto/rsa.GenerateMultiPrimeKey(0xc25d48, 0xc20803c3c0, 0x2, 0x800, 0xc2080e36e0, 0x0, 0x0)
	/usr/src/go/src/crypto/rsa/rsa.go:187 +0x269 fp=0xc2080f0e70 sp=0xc2080f0d70
crypto/rsa.GenerateKey(0xc25d48, 0xc20803c3c0, 0x800, 0x2f, 0x0, 0x0)
	/usr/src/go/src/crypto/rsa/rsa.go:145 +0x57 fp=0xc2080f0eb0 sp=0xc2080f0e70
github.com/docker/machine/utils.GenerateCert(0xc2080f1250, 0x1, 0x1, 0xc2080b0f90, 0x2d, 0xc2080b1050, 0x2c, 0xc2080b0e10, 0x2b, 0xc2080b0ed0, ...)
	/go/src/github.com/docker/machine/utils/certs.go:137 +0x20e fp=0xc2080f1108 sp=0xc2080f0eb0
github.com/docker/machine/commands.setupCertificates(0xc2080b0e10, 0x2b, 0xc2080b0ed0, 0x2f, 0xc2080b0f90, 0x2d, 0xc2080b1050, 0x2c, 0x0, 0x0)
	/go/src/github.com/docker/machine/commands/commands.go:153 +0x96a fp=0xc2080f12c8 sp=0xc2080f1108
github.com/docker/machine/commands.cmdCreate(0xc2080880c0)
	/go/src/github.com/docker/machine/commands/create.go:49 +0x438 fp=0xc2080f16f8 sp=0xc2080f12c8
github.com/codegangsta/cli.Command.Run(0x799870, 0x6, 0x0, 0x0, 0x7e4bd0, 0x10, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/docker/machine/Godeps/_workspace/src/github.com/codegangsta/cli/command.go:113 +0x1038 fp=0xc2080f1ab8 sp=0xc2080f16f8
github.com/codegangsta/cli.(*App).Run(0xc20803e9c0, 0xc20800a000, 0x5, 0x5, 0x0, 0x0)
	/go/src/github.com/docker/machine/Godeps/_workspace/src/github.com/codegangsta/cli/app.go:156 +0xcf7 fp=0xc2080f1d30 sp=0xc2080f1ab8
main.main()
	/go/src/github.com/docker/machine/main.go:114 +0x9bc fp=0xc2080f1f98 sp=0xc2080f1d30
runtime.main()
	/usr/src/go/src/runtime/proc.go:63 +0xf3 fp=0xc2080f1fe0 sp=0xc2080f1f98
runtime.goexit()
	/usr/src/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc2080f1fe8 sp=0xc2080f1fe0

goroutine 5 [syscall]:
os/signal.loop()
	/usr/src/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
	/usr/src/go/src/os/signal/signal_unix.go:27 +0x35

Exposing ports from docker container?

I'm trying to run a docker container (in a boot2docker Parallels vm) that runs an app that listens on http://localhost:5000, but I can't connect to it from my mac. I'm exposing the port in the Dockerfile with EXPOSE 5000/tcp, and then running docker run -p 5000:5000 -t whatever. But when I hit localhost:5000 on my mac, it fails to connect.

I suspect I'm missing something obvious - any ideas what's going wrong? Do I need to manually set up port forwarding from my mac's localhost:5000 to the docker host? And if so, how do I do that?

Mount /Users afrer creation with --parallels-no-share

Hi!

I created VM using docker-machine create ... --parallels-no-share. I thought I won't use /Users inside. But then I realized what I need this.

And it seems to be impossible to enable it back via Desktop Control Center: Options/Sharing/Custom Folders /Users has no effect.

volumes doesn't work

I created a docker machine using the parallels driver here and though it allows me to connect to the docker host on the VM from my Mac machine, it doesn't mount the directories I specify on the docker run command as volumes from the Mac to the VM correctly (they are just empty within my running container)...

e.g.

docker run -it --rm -v ~/MyVol:/data mycontainer bash

ls -al /data
would return an empty folder...

prl_fs doesn't support wine: NtMapViewOfSection map_file_into_view

I spent two weeks trying to run wine inside docker. But in any case I get error: err:virtual:NtMapViewOfSection map_file_into_view 0x430000 4b52000 000000000 on wine rcedit.exe <my options>

Finally I realized that something is broken in the prl_fs — my out folder is mounted to host OS X folder (hint: noexec must be not specified — it is not specified, but it is why I realized that it is prl_fs issue).

I am Parallels user for years, but for now I have to use trial version of VMware Fusion — it works perfectly.

If error is not clear for you, I will publish soon my docker images and you can use it to reproduce.

mount another folder?

Let me know if it's possible to mount not only /Users directory (outside of it). I was trying to change Share settings through Options in Parallels Desktop Control Center and no result at all.

Can't create a machine

So I just dropped $50 to upgrade to Pro so that I could use this driver.

Now I get this:

-> % docker-machine create --driver=parallels default
Running pre-create checks...
(default) Image cache directory does not exist, creating it at /Users/greg/.docker/machine/cache...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
(default) Latest release for github.com/boot2docker/boot2docker is v17.05.0-ce
(default) Downloading /Users/greg/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v17.05.0-ce/boot2docker.iso...
(default) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
Creating machine...
(default) Copying /Users/greg/.docker/machine/cache/boot2docker.iso to /Users/greg/.docker/machine/machines/default/boot2docker.iso...
(default) Creating SSH key...
(default) Creating Parallels Desktop VM...
Error creating machine: Error in driver during machine creation: exit status 255

Any help very much appreciated... otherwise I would like my $ back please.

Using docker-machine installed via Homebrew, and version:

-> % docker-machine --version
docker-machine version 0.11.0, build 5b27455

Issues with mongo with mounted volume for data

I've created container with MongoDB.
Dockerfile:

FROM centos:centos6.7
MAINTAINER Aleksandr Kunin <[email protected]>

RUN yum -y update \
    && yum -y install epel-release \
    && yum clean all

RUN yum -y install mongodb-server

RUN mkdir -p /data/db

EXPOSE 27017
ENTRYPOINT ["/usr/bin/mongod", "--smallfiles"]

docker-compose.yml

db:
  image: qstnnr/mongodb
  volumes:
    - /data/db:/data/db

I have two problems with it:

1. If I put in docker-compose.yml OS X folder

    - ./db:/data/db

Container do not start with error:
Assertion: 13651:Couldn't fsync directory '/data/db': errno:22 Invalid argument

What I found on this topic is http://stackoverflow.com/questions/29570989/docker-mongodb-share-volume-with-mac-os-x:

It seems to be specific to the mongo software and the use of virtualbox , see the README

WARNING: because MongoDB uses memory mapped files it is not possible to use it through vboxsf to your host vbox bug.
It doesn't behave like that if you keep the datadir out of the mounted volume.

2. If I put in docker-compose.yml folder from my docker-machine VM

 - /data/db:/data/db

Container starts but do not finishes. In result I have to reboot docker-machine VM because nothing can kill mongod process.

Driver is incompatible with Docker Machine v0.5.1

In the scope of Docker Machine v0.5.1 release, there were some backward & forward incompatible stuff merged. So, "parallels" driver v1.0.1 could not be used with Docker Machine 0.5.1+

$ docker-machine ls
WARNING >>> Error attempting heartbeat call to plugin server: rpc: can't find service RPCServerDriver.Heartbeat
Error attempting to invoke binary for plugin 'parallels': rpc: can't find service RPCServerDriver.GetVersion

Docker Machine issue: docker/machine#2325

Current status for Parallels driver v1.0.*

  • It works fine with: Docker Machine v0.5.0 / Docker Toolbox v1.9.0
  • It doesn't work with Docker Machine v0.5.1+ / Docker Toolbox v1.9.1+

Please, be aware while updating Docker Machine / Docker Toolbox

support for time-sync

it doesn't look like docker-machines are created with time-sync enabled. Unfortunately without this the clock skew interferes with normal operations (especially HTTP/S calls). Any chance this can be fixed soon. FWIW enabling it manually fixes the problem.

docker create fails with "--time-sync off failed"

Trying to spin up a new vm with docker-machine is failing with this (debug) output:

› docker-machine -D create --driver=parallels kubetest
Docker Machine Version: 0.5.0 (04cfa58)
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:55347
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(flag-lookup) Calling RpcServerDriver.GetCreateFlags
Making call to close connection to plugin binary
Making call to close driver server
(flag-lookup) Calling RpcServerDriver.Close
Successfully made call to close driver server
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:55351
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(kubetest) Calling RpcServerDriver.GetMachineName
(kubetest) Calling RpcServerDriver.DriverName
(kubetest) Calling RpcServerDriver.GetCreateFlags
(kubetest) Calling RpcServerDriver.SetConfigFromFlags
Running pre-create checks...
(kubetest) Calling RpcServerDriver.PreCreateCheck
(kubetest) DBG | executing: prlctl --version
(kubetest) OUT | Driver "parallels" integration with Parallels Desktop 10 is maintained by open source community.
(kubetest) Calling RpcServerDriver.GetConfigRaw
(kubetest) DBG | Found Parallels Desktop version: 10
(kubetest) OUT | For Parallels supported configuration you should use it with Parallels Desktop 11 or later (Pro or Business edition).
(kubetest) Calling RpcServerDriver.GetConfigRaw
Creating machine...
(kubetest) Calling RpcServerDriver.Create
(kubetest) DBG | SSH key: /Users/boucher/.docker/machine/machines/kubetest/id_rsa
(kubetest) OUT | Creating SSH key...
(kubetest) DBG | executing: prlctl --version
(kubetest) OUT | Creating Parallels Desktop VM...
(kubetest) DBG | executing: prlctl create kubetest --distribution linux-2.6 --dst /Users/boucher/.docker/machine/machines/kubetest --no-hdd
(kubetest) DBG | executing: prlctl set kubetest --select-boot-device off --cpus 1 --memsize 1024 --cpu-hotplug off --on-window-close keep-running --longer-battery-life on --3d-accelerate off --device-bootorder cdrom0
(kubetest) DBG | executing: prlctl set kubetest --device-set cdrom0 --iface sata --position 0 --image /Users/boucher/.docker/machine/machines/kubetest/boot2docker.iso
(kubetest) DBG | executing: prlctl set kubetest --device-add hdd --iface sata --position 1 --image /Users/boucher/.docker/machine/machines/kubetest/disk.hdd --type plain --size 32
(kubetest) DBG | HDS image path: /Users/boucher/.docker/machine/machines/kubetest/disk.hdd/disk.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds
(kubetest) DBG | executing: prl_disk_tool convert --expanding --hdd /Users/boucher/.docker/machine/machines/kubetest/disk.hdd
(kubetest) DBG | executing: prl_disk_tool resize --hdd /Users/boucher/.docker/machine/machines/kubetest/disk.hdd --size 20000
(kubetest) DBG | executing: prlctl set kubetest --time-sync off
Error creating machine: Error in driver during machine creation: prlctl set kubetest --time-sync off failed: exit status 1

docker-machine is unable to interact with VM's created on an exFAT volume

I am running out of space on my primary drive, so I thought I would grab a Transcend micro expansion and place my VM's on the external drive to free up quite a bit of space. This works well with vagrant and the default parallels desktop, however this doesn't play nicely at all with docker-machine. I am unable to discern if this is due to the parallels driver or the docker-machine bin itself.

Relevant stats:

OSX 10.11.2
docker-machine version 0.5.5, build
docker-machine-parallels installed via brew at:

$ brew info docker-machine-parallels
docker-machine-parallels: stable 1.1.1 (bottled), HEAD
Docker Machine Parallels Driver
https://github.com/Parallels/docker-machine-parallels
/usr/local/Cellar/docker-machine-parallels/1.1.0 (4 files, 10.6M)
  Poured from bottle
/usr/local/Cellar/docker-machine-parallels/1.1.1 (4 files, 10.4M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/docker-machine-parallels.rb
==> Dependencies
Build: go ✘, godep ✘
Required: docker-machine ✔

I'm completely unable to create a new VM due to connectivity issues, and the same is valid if i were to create without the symlink in place, migrate the directory (.pvm and all) to the new location, symlink and then attempt to ssh into the associated pvm.

The following stack appears to be useful if the nil's are unexpected.

lazy at Kojiki in ~/.docker
$ docker-machine --debug ssh dev
Docker Machine Version:  0.5.5, build
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:51138
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(dev) Calling .GetState
(dev) DBG | executing: prlctl list dev --output status --no-header
(dev) Calling .GetSSHHostname
(dev) DBG | executing: prlctl list dev --output status --no-header
(dev) DBG | executing: prlctl list -i dev
(dev) DBG | Found lease: 10.211.55.15 for MAC: 001C42C2D8E9, expiring at 1452290932, leased for 1800 s.
(dev) DBG |
(dev) DBG | Found IP lease: 10.211.55.15 for MAC address 001C42C2D8E9
(dev) DBG |
(dev) Calling .GetSSHPort
(dev) Calling .GetSSHKeyPath
(dev) Calling .GetSSHKeyPath
(dev) Calling .GetSSHUsername
Using SSH client type: external
{[-o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i /Users/lazy/.docker/machine/machines/dev/id_rsa -p 22] /usr/bin/ssh}
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i /Users/lazy/.docker/machine/machines/dev/id_rsa -p 22] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
exit status 255

debug output from attempting to create the VM

$ docker-machine --debug create -d parallels pltest
Docker Machine Version:  0.5.5, build
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:51456
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-parallels
Launching plugin server for driver parallels
Plugin server listening at address 127.0.0.1:51460
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(pltest) Calling .GetMachineName
(pltest) Calling .DriverName
(pltest) Calling .GetCreateFlags
(pltest) Calling .SetConfigFromFlags
Running pre-create checks...
(pltest) Calling .PreCreateCheck
(pltest) DBG | executing: prlctl --version
(pltest) DBG | executing: prlsrvctl info --license
(pltest) DBG | Found Parallels Desktop version: 11, edition: pro
(pltest) Calling .GetConfigRaw
Creating machine...
(pltest) Calling .Create
(pltest) DBG | local Boot2Docker ISO version:  v1.9.1
(pltest) Copying /Users/lazy/.docker/machine/cache/boot2docker.iso to /Users/lazy/.docker/machine/machines/pltest/boot2docker.iso...
(pltest) DBG | SSH key: /Users/lazy/.docker/machine/machines/pltest/id_rsa
(pltest) Creating SSH key...
(pltest) Creating Parallels Desktop VM...
(pltest) DBG | executing: prlctl --version
(pltest) DBG | executing: prlctl create pltest --distribution boot2docker --dst /Users/lazy/.docker/machine/machines/pltest --no-hdd
(pltest) DBG | executing: prlctl set pltest --select-boot-device off --cpus 1 --memsize 1024 --cpu-hotplug off --on-window-close keep-running --longer-battery-life on --3d-accelerate off --device-bootorder cdrom0
(pltest) DBG | executing: prlctl set pltest --device-set cdrom0 --iface sata --position 0 --image /Users/lazy/.docker/machine/machines/pltest/boot2docker.iso
(pltest) DBG | executing: prlctl set pltest --device-add hdd --iface sata --position 1 --image /Users/lazy/.docker/machine/machines/pltest/disk.hdd --type plain --size 32
(pltest) DBG | Writing magic tar header
(pltest) DBG | Writing SSH key tar header
(pltest) DBG | HDS image path: /Users/lazy/.docker/machine/machines/pltest/disk.hdd/disk.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hds
(pltest) DBG | executing: prl_disk_tool convert --expanding --hdd /Users/lazy/.docker/machine/machines/pltest/disk.hdd
(pltest) DBG | executing: prl_disk_tool resize --hdd /Users/lazy/.docker/machine/machines/pltest/disk.hdd --size 20000
(pltest) DBG | executing: prlctl set pltest --time-sync off
(pltest) DBG | executing: prlctl set pltest --startup-view headless
(pltest) DBG | executing: prlctl set pltest --shf-host on --shared-cloud off --shared-profile off --smart-mount off
(pltest) DBG | executing: prlctl set pltest --shf-host-defined off
(pltest) DBG | executing: prlctl set pltest --shf-host-add Users --path /Users
(pltest) Starting Parallels Desktop VM...
(pltest) DBG | executing: prlctl start pltest
(pltest) Waiting for VM to come online...
(pltest) DBG | executing: prlctl list -i pltest
(pltest) DBG | Not there yet 1/60, error: IP lease not found for MAC address 001C42BD3CC4 in: /Library/Preferences/Parallels/parallels_dhcp_leases
(pltest) DBG |
(pltest) DBG | executing: prlctl list -i pltest
(pltest) DBG | Not there yet 2/60, error: IP lease not found for MAC address 001C42BD3CC4 in: /Library/Preferences/Parallels/parallels_dhcp_leases
(pltest) DBG |
(pltest) DBG | executing: prlctl list -i pltest
(pltest) DBG | Found lease: 10.211.55.16 for MAC: 001C42BD3CC4, expiring at 1452291355, leased for 1800 s.
(pltest) DBG |
(pltest) DBG | Found IP lease: 10.211.55.16 for MAC address 001C42BD3CC4
(pltest) DBG |
(pltest) DBG | Got an ip: 10.211.55.16
(pltest) DBG | executing: prlctl list pltest --output status --no-header
(pltest) DBG | Getting to WaitForSSH function...
(pltest) DBG | executing: prlctl list pltest --output status --no-header
(pltest) DBG | executing: prlctl list -i pltest
(pltest) DBG | Found lease: 10.211.55.16 for MAC: 001C42BD3CC4, expiring at 1452291355, leased for 1800 s.
(pltest) DBG |
(pltest) DBG | Found IP lease: 10.211.55.16 for MAC address 001C42BD3CC4
(pltest) DBG |
(pltest) DBG | Using SSH client type: external
(pltest) DBG | {[-o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i /Users/lazy/.docker/machine/machines/pltest/id_rsa -p 22] /usr/bin/ssh}
(pltest) DBG | About to run SSH command:
(pltest) DBG | exit 0
(pltest) DBG | SSH cmd err, output: exit status 255:
(pltest) DBG | Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
(pltest) DBG | command : exit 0
(pltest) DBG | err     : exit status 255
(pltest) DBG | output  :
(pltest) DBG |
(pltest) DBG | Getting to WaitForSSH function...
(pltest) DBG | executing: prlctl list pltest --output status --no-header
(pltest) DBG | executing: prlctl list -i pltest
(pltest) DBG | Found lease: 10.211.55.16 for MAC: 001C42BD3CC4, expiring at 1452291355, leased for 1800 s.
(pltest) DBG |
(pltest) DBG | Found IP lease: 10.211.55.16 for MAC address 001C42BD3CC4
(pltest) DBG |
(pltest) DBG | Using SSH client type: external
(pltest) DBG | {[-o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none [email protected] -o IdentitiesOnly=yes -i /Users/lazy/.docker/machine/machines/pltest/id_rsa -p 22] /usr/bin/ssh}
(pltest) DBG | About to run SSH command:
(pltest) DBG | exit 0
(pltest) DBG | SSH cmd err, output: exit status 255:
(pltest) DBG | Error getting ssh command 'exit 0' : Something went wrong running an SSH command!
(pltest) DBG | command : exit 0
(pltest) DBG | err     : exit status 255
(pltest) DBG | output  :

...

finally spitting this out

open : no such file or directory
notifying bugsnag: [Error in driver during machine creation: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded]
Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

auth.docker.io: no such host.

I see that issue like this has been filed several times, and is closed as fixed in Parallels 11.1.0. Unfortunately, I recently install docker-toolbox and parallel driver to Parallel 11.1.3, and I am still seeing the problem.

OSX: 10.11.3
Parallels version: 11.1.3 (32521)
docker-machine version 0.6.0, build e27fb87
Docker version 1.10.3, build 20f81dd
docker-compose version 1.6.2, build 4d72027

when do command: docker run -it centos /bin/bash

the result is:
Unable to find image 'centos:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/centos/manifests/latest: Get https://auth.docker.io/token?account=giulianolatini&scope=repository%3Alibrary%2Fcentos%3Apull&service=registry.docker.io: dial tcp: lookup auth.docker.io on 10.211.55.1:53: no such host.
See 'docker run --help'.

Only when I add to /etc/resolv.conf: nameserver 8.8.8.8 docker and docker-compose do work.

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.