Reputation: 305
I run my docker containers in hyper-v. To get access to the windows share, I built a custom boot2docker.iso. Now i want to create docker hosts using this custom iso image.
I tried to let docker-machine use my local boot2docker.iso file by specifying --hyperv-boot2docker-url with the following but got error on the console:
docker-machine create --driver hyperv --hyperv-virtual-switch "External Virtual Switch" --hyperv-boot2docker-url file:///D:/docker/boot2docker.iso b2d
Running pre-create checks...
Creating machine...
(b2d) Downloading C:\Users\ivisne\.docker\machine\cache\boot2docker.iso from file:///D:/docker/boot2docker.iso...
Error creating machine: Error in driver during machine creation: open /D:/docker/boot2docker.iso: The filename, directory name, or volume label syntax is incorrect.
What is the correct syntax or is this supposed to work?
Upvotes: 4
Views: 3921
Reputation: 31
There are three back slashes, but two is enough:
docker-machine create --driver hyperv --hyperv-virtual-switch "External Virtual Switch" --hyperv-boot2docker-url file://D:/docker/boot2docker.iso b2d
Upvotes: 3
Reputation: 11
Just use two backslash before D after file Like this docker-machine create --driver hyperv --hyperv-virtual-switch "External Virtual Switch" --hyperv-boot2docker-url file://D:/docker/boot2docker.iso b2d
Upvotes: -1
Reputation: 138
docker-machine create --driver hyperv --hyperv-virtual-switch "Ext Switch" --hyperv-boot2docker-url file://C:/Users/User_name/.docker/machine/machines/dev/boot2docker.iso machine_name
This worked for me
Upvotes: 1
Reputation: 5714
You can do a "dirty trick". You can remove the argument of specifying a url for the iso --hyperv-boot2docker-url file:///D:/docker/boot2docker.iso
doing this:
Overwrite the boot2docker.iso file. Is under your %userprofile%\.docker\machine\cache
folder. Then cut your internet access by unplugging network cable or however. Then launch your command.
Usually if you don't specify anything for the iso, it checks the checksum of the file. It's different from the original so it will try to download a new one and after failing because you don't have internet access it will copy your custom boot2docker.iso file from your %userprofile%\.docker\machine\cache
folder to %userprofile%\.docker\machine\machines\default
and it will be used to create the machine.
Hope it helps.
Upvotes: 0