Closed Globegitter closed 6 years ago
thats just over 2 minutes. I hope you're not running on a massive Mac PRO with heaps of memory and ssd's... (no, I can't think of anything that should make it take much longer to boot than ubuntu).
oh - is this the first startup only? that does take longer as its formatting the disk and making the ssh keys.
It is a Macbook Pro Early 2013 with SSD and 8GB memory.
What exactly do you mean by first startup only? If I run boot2docker halt
and start the boot2docker app again, it does take the same amount of time.
Also when I just tested to ssh into it, it does take quite a long time, 30+ seconds (again, compared to my previous vagrant setup and vagrant with CoreOS).
Not that I would say these are major issues and maybe it is the expected behaviour. It was quite unexpected to me since the FAQ mentions that one of boot2docker's aims is to be the fastest way to boot to Docker. But for me CoreOS with Vagrant is performing quite noticeably faster to boot and ssh into it.
Also right now I am running the boot2docker version from https://medium.com/boot2docker-lightweight-linux-for-docker/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c if that makes any difference.
I mean the first startup after a new boot2docker init
.
No, this is not expected behavior - and of course - it works for me :(
I'm guessing that @tianon will want to debug this a little to figure out if there's something we can do.
@SvenDowideit @tianon I am more than happy to help with any kind of debugging. Just let me know what I can do.
Interesting. Is the VM slow after it comes up? (ie, somehow we're not getting hardware virtualization?)
@tianon I would say not that noticable but I will do some more testing over the next few days to give a proper answer.
@Globegitter - If you are talking about the video posted here at https://docs.docker.com/installation/mac/. The 'boot2docker up' command is actually taking almost a minute, with the start time being 20:45:10 and the end time being 20:46:04. The video however is sped up, giving the impression it's happening much faster.
oh duh! @bcauldwell you're right, I'm so very used to the time it takes, and leave my b2d running for days :/
i don't think mine takes 60 seconds, but its not as fast as the video.
Just upgraded to docker 1.3 and performance immediately seems much better (on booting, ssh and ip command). I will do a bit more testing, see how it performs and close this issue if everything carries on being like this.
I have boot2docker running on Windows 7 on a corporate box. I have a HOME_DRIVE env variable set to u: so it looks like the boot2docker install put the boot2docker.iso in the U drive. So if I loose connectivity to the network then boot to docker just hangs forever on startup without message. Starting the vm directly is where I found the message that the iso was not reachable. Restarting so that drives are mapped fixed the problem. On another note, I had to change the BIOS on this machine to enable hardware virtualization. The docs mentioned that my machine must have hardware virtualization enabled but some people may not be aware how to enable that.
can confirm, boot2docker 1.3.2 installed.
on a brand new macbook pro:
there's almost nothing else on this machine, i just got it < 24 hrs ago.
first $ boot2docker up
has taken 40 minutes so far, and i'm still waiting. the "......" part was fast, the "..ooooo" part is what is taking the longest.
here are the verbose messages:
boot2docker start -v
Boot2Docker-cli version: v1.3.2
Git commit: e41a9ae
2014/12/06 19:59:13 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/12/06 19:59:13 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/12/06 19:59:13 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
Waiting for VM and Docker daemon to start...
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0)
...# forever
I was able to get boot2docker working (and loading fast) by opening up the VirtualBox gui app, completely removing the boot2docker vm, then running $ boot2docker init
again.
@theRemix excellent that you have a fix for you - Sometimes the setup can go awry :/
I just had this same exact issue, but theRemix's solution worked. I have a macbook air running yosemite.
The problem first started to appear after I rebooted my computer.
I also have the problem with really slow startup. I installed boot2docker on OS X 10.8.5 on a 2012 Macbook Pro Retina and am seemingly waiting forever on first boot.
Waiting for VM and Docker daemon to start...
..........................................................................ooooo
I tried with both version 1.3.2 and 1.4.1 of boot2docker but have been giving up after 20 minutes or so of waiting.
@VolkerH I would suggest using the vurtual box GUI to stop the vm, and then start it using the GUI - so that you can see the bootup output. This may tell you more.
@theRemix Completely removing the whole VM worked for me as well.
I am having the same issue. Took 15-30 seconds to launch for the first time (on 2014 Mac with loads of hardware). Subsequent launches are crawling. I initially got boot2docker from brew cask. I tried doing the image removal and reinitializing as suggested, but continued to see the same thing. I removed boot2docker from brew and then downloaded the package and tried the installer. Just ran the boot2docker from my Applications and it is still taking a long time (running on ~25 minutes now).
Here was the final time. Going to try -v up this time.
Waiting for VM and Docker daemon to start... ..........................................................................oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Started. Trying to get Docker socket one more time Error requesting socket: exit status 255 Auto detection of the VM's Docker socket failed. Please run boot2docker -v up to diagnose.
real 1020m13.457s user 0m0.290s sys 0m0.324s
boot2docker -v init Boot2Docker-cli version: v1.6.2 Git commit: cb2c3bc 2015/05/21 09:34:02 executing: VBoxManage showvminfo boot2docker-vm --machinereadable 2015/05/21 09:34:02 executing: VBoxManage showvminfo boot2docker-vm --machinereadable 2015/05/21 09:34:02 executing: VBoxManage list vms 2015/05/21 09:34:02 executing: VBoxManage createvm --name boot2docker-vm --register Virtual machine 'boot2docker-vm' is created and registered. UUID: 56ca0c0f-e700-4331-bfec-b91abc4b0933 Settings file: '/Users/matthewcrowson/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox' 2015/05/21 09:34:02 executing: VBoxManage showvminfo boot2docker-vm --machinereadable 2015/05/21 09:34:02 executing: VBoxManage setextradata boot2docker-vm VBoxInternal/CPUM/EnableHVP 1 2015/05/21 09:34:02 executing: VBoxManage modifyvm boot2docker-vm --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --natdnshostresolver1 off --natdnsproxy1 off --ostype Linux26_64 --cpus 4 --memory 2048 --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/matthewcrowson/.boot2docker/boot2docker-vm.sock --boot1 dvd 2015/05/21 09:34:02 executing: VBoxManage showvminfo boot2docker-vm --machinereadable 2015/05/21 09:34:02 executing: VBoxManage modifyvm boot2docker-vm --nic1 nat --nictype1 virtio --cableconnected1 on 2015/05/21 09:34:02 executing: VBoxManage controlvm boot2docker-vm natpf1 ssh,tcp,127.0.0.1,2022,,22 2015/05/21 09:34:02 executing: VBoxManage list hostonlyifs 2015/05/21 09:34:02 executing: VBoxManage list dhcpservers 2015/05/21 09:34:02 executing: VBoxManage modifyvm boot2docker-vm --nic2 hostonly --nictype2 virtio --cableconnected2 on --hostonlyadapter2 vboxnet0 2015/05/21 09:34:02 executing: VBoxManage storagectl boot2docker-vm --name SATA --add sata --portcount 4 --hostiocache on --bootable on 2015/05/21 09:34:02 executing: VBoxManage storageattach boot2docker-vm --storagectl SATA --port 0 --device 0 --type dvddrive --medium /Users/matthewcrowson/.boot2docker/boot2docker.iso VBoxManage: error: The medium '/Users/matthewcrowson/.boot2docker/boot2docker.iso' can't be used as the requested device type VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Medium, interface IMedium, callee nsISupports VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp VBoxManage: error: Invalid UUID or filename "/Users/matthewcrowson/.boot2docker/boot2docker.iso" error in run: Failed to initialize machine "boot2docker-vm": exit status 1
I ended up removing the iso and letting the init redownload it. sudo rm -r ~/.boot2docker boot2docker init
I wonder if the 'brew remove boot2docker' command didn't remove the ~/.boot2docker folder. It is working now.
No one really says what the desired startup time should be. I know this might vary depending on hardware but it would still be nice to get and idea if a 30s startup is considered fast or slow. I personally think it's quite slow for a Linux box. My Windows 10 VM boots faster than that.
I have also noticed that startup times are very similar on my 2010 Macbook Pro (SSD) compared to a quad core with raid-0 SSDs.
Sorry, this repository is long-since deprecated in favor of Docker Toolbox (whose usage is now also discouraged in favor of Docker for Windows and Docker for Mac).
In the Video that shows the Mac OSX installation boot2docker up just taks a few seconds, for me it takes quite a long time and is slower than booting an Ubuntu VM:![screen shot 2014-09-20 at 23 31 57](https://cloud.githubusercontent.com/assets/2580254/4346827/c2beddfc-4118-11e4-90bd-a823e9f88170.png)
I tried installing it via homebrew as well as via this installer and both seem to have equal times. Any reasons why this could be so slow?