You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 27, 2018. It is now read-only.
boot2docker-vm setup fails due to DYLD_LIBRARY_PATH settings #148
I downloaded the OS X installer. I'm running OS X 10.8.5 and VirtualBox 4.3.12.
My boot2docker-vm is not starting due to DYLD stuff in my environment. Seems to be an old problem for VBoxManage.
Here's what I see for boot2docker init -v:
montag:~ $ boot2docker init -v
2014/06/09 17:11:10 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/06/09 17:11:10 Creating VM boot2docker-vm...
2014/06/09 17:11:10 executing: VBoxManage list vms
2014/06/09 17:11:10 executing: VBoxManage createvm --name boot2docker-vm --register
Virtual machine 'boot2docker-vm' is created and registered.
UUID: 4e832fce-2c78-46ac-a551-79de869e0351
Settings file: '/Users/montag/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox'
2014/06/09 17:11:10 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/06/09 17:11:10 Apply interim patch to VM boot2docker-vm (https://www.virtualbox.org/ticket/12748)
2014/06/09 17:11:10 executing: VBoxManage setextradata boot2docker-vm VBoxInternal/CPUM/EnableHVP 1
2014/06/09 17:11:10 executing: VBoxManage modifyvm boot2docker-vm --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 8 --memory 1024 --vram 8 --acpi on --ioapic on --rtcuseutc on --cpuhotplug off --pae on --longmode on --synthcpu off --hpet on --hwvirtex on --triplefaultreset off --nestedpaging on --largepages on --vtxvpid on --vtxux off --accelerate3d off --uart1 0x3F8 4 --uartmode1 server /Users/montag/.boot2docker/boot2docker-vm.sock --boot1 dvd
2014/06/09 17:11:11 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/06/09 17:11:11 Setting NIC #1 to use NAT network...
2014/06/09 17:11:11 executing: VBoxManage modifyvm boot2docker-vm --nic1 nat --nictype1 virtio --cableconnected1 on
2014/06/09 17:11:11 executing: VBoxManage controlvm boot2docker-vm natpf1 ssh,tcp,127.0.0.1,2022,,22
2014/06/09 17:11:11 Port forwarding [ssh] tcp://127.0.0.1:2022 --> :22
2014/06/09 17:11:11 executing: VBoxManage controlvm boot2docker-vm natpf1 docker,tcp,127.0.0.1,2375,,2375
2014/06/09 17:11:11 Port forwarding [docker] tcp://127.0.0.1:2375 --> :2375
2014/06/09 17:11:11 executing: VBoxManage list hostonlyifs
2014/06/09 17:11:11 executing: VBoxManage list dhcpservers
2014/06/09 17:11:11 Creating a new host-only network interface...
2014/06/09 17:11:11 executing: VBoxManage hostonlyif create
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
2014/06/09 17:11:11 executing: VBoxManage hostonlyif ipconfig dyld: DYLD_ environment variables being ignored because main executable (/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdp --ip 192.168.59.3 --netmask 255.255.255.0
VBoxManage: error: The host network interface with the given name could not be found
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component Host, interface IHost, callee nsISupports
VBoxManage: error: Context: "FindHostNetworkInterfaceByName(name.raw(), hif.asOutParam())" at line 218 of file VBoxManageHostonly.cpp
VBoxManage: error: Could not find interface 'dyld: DYLD_ environment variables being ignored because main executable (/Applications/VirtualBox.app/Contents/MacOS/VBoxNetAdp'
2014/06/09 17:11:11 Failed to create host-only network interface: exit status 2
I worked around the issue by doing
unset DYLD_LIBRARY_PATH
unset LD_LIBRARY_PATH
before boot2docker init.
Seems others calling VBoxManage have had to work around this issue as well - hashicorp/vagrant#1258.
I'll try but I don't promise anything... I don't know Go.
But in the meantime... is there any way to manually fix the VM that was being created? What was trying to do boot2docker-cli? Was it the last thing that it was trying to do?
The idea was to find a quick way to check the env passed to VBoxManage. First, what I see is that DYLD_LIBRARY_PATH and LD_LIBRARY_PATH are empty, so they are correctly managed. But I found a problem with my script because my VirtualBox workspace is in a directory with a space in the path: /Users/fritz/VirtualBox VMs: because of that I experienced an earlier failure when creating the disks. So I worked with my script and "$@" seems to be the correct way to manage it. At this point... everything seems to work :-) I mean: there's still something I don't understand, as I don't see in the log the offending command dealing with the network management; but what I see is that boot2manage -v init completed correctly and I could execute boot2manage up and boot2manage ssh (before doing that, I commented out the echo and printenv, just in case the stdout of VBoxManage is processed).
Thus I'd rather say that the problem might be with the space in the VirtualBox workspace path. Does this suggest something to you?
Same issue here. osx 10.8.5, VB 4.3.18.r96516 and VB 4.3.20 boot2docker 1.3.2. What's weird is that I have it working on one mac, but it fails on another with the same setup. Definitely seems to be a vbox issue as I get an error when creating a host only network manually.
Unsetting DYLD_LIBRARY_PATH had no effect. I am still investigating.
EDIT:
I got it working, by closing Vbox, unsetting DYLD_LIBRARY_PATH, restarted VBox, confirmed that I could create a host only interface by hand. then the boot2docker init worked.
I too hit this bug; the only way I could figure out to get past it was to first go into the VirtualBox GUI and create a new VM with a host-only network interface. After that, boot2docker init happily created my new boot2docker VM.
To note for specifics: this is a machine that never had VirtualBox on it, it was installed by the boot2docker installer. Fresh from that installation, running boot2docker -v init caused the same error as above (namely VBoxManage: error: The host network interface with the given name could not be found). By first using the GUI to manually create a new VM that had a host-only interface, I then was able to proceed with boot2docker.
(And note that I just created the simplest VM I could, choosing "Other" and "DOS", 4 Mb RAM, no hard disk, and a host-only network interface. All of which I then deleted back out.)
I created a foo VM with the same settings as given above: Other / DOS / 4… . Network was set to "host-only" interface. Now boot2socker init and start worked fine.
Now that #324 has merged, can we get someone who can duplicate the issue to test and verify that actually unsetting the offending variables instead of just emptying them out actually does fix it? 😄
I can confirm, using the latest versions of boot2docker (1.5.0) and virtualbox (4.3.22.r98236) that this issue persists. I did everything I found on the Internets as suggestions (reinstall, install with brew, blow away existing VMs, use VB GUI to add/delete interfaces) before stumbling upon this issue here (which ironically was just closed within the day).
Unsetting the DYLD_LIBRARY_PATH and LD_LIBRARY_PATH variables didn't immediately work for me. I opened the VirtualBox GUI, and removed all of the VMs there (some where "trash", i.e. I had removed them manually already). Then (with the GUI still open, but not sure if that matters), I ran boot2docker init and it worked.
Had installed boot2docker 1.5.0 via brew and virtualbox 4.3.26-98988 via brew cask. Running OS X 10.8.5.
Since I didn't really have a "clean slate" before doing this (had tried reinstalling, manually removing VMs etc.) before doing this, I'm not sure what effect the VirtualBox GUI had, but thought I'd post it here in case someone had this issue again.
Activity
[-]boot2docker-vm setup fails[/-][+]boot2docker-vm setup fails due to DYLD_LIBRARY_PATH settings[/+]SvenDowideit commentedon Jul 5, 2014
I'm putting this unset in the OSX installer - perhaps we should also work it into the b2d-cli utils.cmd() :(
SvenDowideit commentedon Jul 10, 2014
see boot2docker/osx-installer#38
use HZ_100 as suggested by @tatsushid
fabriziogiudici commentedon Nov 25, 2014
Is this supposed to be part of 1.3.2? Because I'm seeing it failing...
SvenDowideit commentedon Nov 26, 2014
@fabriziogiudici ah, excellent - I was unable to test my change, as I don't know how to get my OSX to have this problem.
If you can work out how to make it happen for one of us devs, then we can try to work out how to fix it
or more ideally, perhaps you can check out the code and have a go yourself. :)
fabriziogiudici commentedon Nov 26, 2014
I'll try but I don't promise anything... I don't know Go.
But in the meantime... is there any way to manually fix the VM that was being created? What was trying to do boot2docker-cli? Was it the last thing that it was trying to do?
fabriziogiudici commentedon Nov 26, 2014
Ok, it seems my problem is different and I've casually found a workaround :-)
That's what I did: rename VBoxManage to VBoxManage.orig and create a bash script named VBoxManage:
The idea was to find a quick way to check the env passed to VBoxManage. First, what I see is that DYLD_LIBRARY_PATH and LD_LIBRARY_PATH are empty, so they are correctly managed. But I found a problem with my script because my VirtualBox workspace is in a directory with a space in the path: /Users/fritz/VirtualBox VMs: because of that I experienced an earlier failure when creating the disks. So I worked with my script and "$@" seems to be the correct way to manage it. At this point... everything seems to work :-) I mean: there's still something I don't understand, as I don't see in the log the offending command dealing with the network management; but what I see is that boot2manage -v init completed correctly and I could execute boot2manage up and boot2manage ssh (before doing that, I commented out the echo and printenv, just in case the stdout of VBoxManage is processed).
Thus I'd rather say that the problem might be with the space in the VirtualBox workspace path. Does this suggest something to you?
bossjones commentedon Dec 3, 2014
I was able to reproduce as well:
OS X 10.8.5.
VirtualBox workspace path =
/Users/malcolmjones/VirtualBox VMsPerhaps it has to do with the space in the path like @fabriziogiudici mentioned? ( good work debugging btw ! )
SvenDowideit commentedon Dec 4, 2014
ping @tianon I presume fixing some space in paths escaping issue is possible...
sebgoa commentedon Dec 10, 2014
Same issue here. osx 10.8.5, VB 4.3.18.r96516 and VB 4.3.20 boot2docker 1.3.2. What's weird is that I have it working on one mac, but it fails on another with the same setup. Definitely seems to be a vbox issue as I get an error when creating a host only network manually.
Indeed Vagrant faced this way back: hashicorp/vagrant@e367a8c
Unsetting DYLD_LIBRARY_PATH had no effect. I am still investigating.
EDIT:
I got it working, by closing Vbox, unsetting DYLD_LIBRARY_PATH, restarted VBox, confirmed that I could create a host only interface by hand. then the boot2docker init worked.
delfuego commentedon Dec 22, 2014
I too hit this bug; the only way I could figure out to get past it was to first go into the VirtualBox GUI and create a new VM with a host-only network interface. After that, boot2docker init happily created my new boot2docker VM.
To note for specifics: this is a machine that never had VirtualBox on it, it was installed by the boot2docker installer. Fresh from that installation, running boot2docker -v init caused the same error as above (namely
VBoxManage: error: The host network interface with the given name could not be found). By first using the GUI to manually create a new VM that had a host-only interface, I then was able to proceed with boot2docker.(And note that I just created the simplest VM I could, choosing "Other" and "DOS", 4 Mb RAM, no hard disk, and a host-only network interface. All of which I then deleted back out.)
fjenett commentedon Dec 27, 2014
I created a foo VM with the same settings as given above: Other / DOS / 4… . Network was set to "host-only" interface. Now
boot2socker initandstartworked fine.jsolis commentedon Jan 7, 2015
Thanks @Runseb 😄 nothing except for closing VBox, unset DYLD_LIBRARY_PATH, restart, boot2docker init worked for me.
lc3t35 commentedon Jan 28, 2015
+1 OSX 10.8.5 VBox 4.3.20.
I succeed within VBox GUI to desactivate card 1, reactivate and choose local network, save.
Then no more error with boot2docker init -v
tianon commentedon Feb 24, 2015
Now that #324 has merged, can we get someone who can duplicate the issue to test and verify that actually unsetting the offending variables instead of just emptying them out actually does fix it? 😄
gmlewis commentedon Feb 24, 2015
I have not been able to duplicate the issue... sorry.
kordless commentedon Feb 25, 2015
I can confirm, using the latest versions of boot2docker (1.5.0) and virtualbox (4.3.22.r98236) that this issue persists. I did everything I found on the Internets as suggestions (reinstall, install with brew, blow away existing VMs, use VB GUI to add/delete interfaces) before stumbling upon this issue here (which ironically was just closed within the day).
Again, the solution is to do the following:
nicolashery commentedon Apr 7, 2015
Unsetting the
DYLD_LIBRARY_PATHandLD_LIBRARY_PATHvariables didn't immediately work for me. I opened the VirtualBox GUI, and removed all of the VMs there (some where "trash", i.e. I had removed them manually already). Then (with the GUI still open, but not sure if that matters), I ranboot2docker initand it worked.Had installed
boot2docker 1.5.0viabrewandvirtualbox 4.3.26-98988viabrew cask. RunningOS X 10.8.5.Since I didn't really have a "clean slate" before doing this (had tried reinstalling, manually removing VMs etc.) before doing this, I'm not sure what effect the VirtualBox GUI had, but thought I'd post it here in case someone had this issue again.
perryn commentedon Apr 24, 2015
I ran into this issue with
boot2docker 1.5.0
VirtualBox 4.3.4
I did not have and DYLD_ or LD_ set.
I opened the VirtualBox GUI and then 'boot2docker init' worked.
I then closed the VirtualBox GUI and then 'boot2docker init' still worked.