boot2docker / osx-installer

Docker installer for Mac OS X
Apache License 2.0
1.25k stars 258 forks source link

boot2docker init fails with VBoxManage longmode #82

Closed mstorus closed 6 years ago

mstorus commented 9 years ago

When I try to run boot2docker -v init it fails with VBoxManage: error: Unknown option: --longmode

Versions:

echo `docker --version` && echo `boot2docker version` && echo `vboxmanage -v` && echo `sw_vers -productVersion`
Docker version 1.1.0, build 79812e3
Client version: v1.1.0 Git commit: 7e20d36
4.2.16r86992
10.9.5

Unfortunately I can't run newer versions of VirtualBox because they cause my Mac to kernel panic.

Full output of boot2docker -v init

2014/10/23 14:56:16 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/10/23 14:56:16 Creating VM boot2docker-vm...
2014/10/23 14:56:16 executing: VBoxManage list vms
2014/10/23 14:56:16 executing: VBoxManage createvm --name boot2docker-vm --register
Virtual machine 'boot2docker-vm' is created and registered.
UUID: <...>
Settings file: '/Users/me/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox'
2014/10/23 14:56:16 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2014/10/23 14:56:16 Apply interim patch to VM boot2docker-vm (https://www.virtualbox.org/ticket/12748)
2014/10/23 14:56:16 executing: VBoxManage setextradata boot2docker-vm VBoxInternal/CPUM/EnableHVP 1
2014/10/23 14:56:16 executing: VBoxManage modifyvm boot2docker-vm --firmware bios --bioslogofadein off --bioslogofadeout off --natdnshostresolver1 on --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 8 --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/me/.boot2docker/boot2docker-vm.sock --boot1 dvd
Oracle VM VirtualBox Command Line Management Interface Version 4.2.16
(C) 2005-2013 Oracle Corporation
All rights reserved.

Usage:

VBoxManage modifyvm         <uuid|name>
                            [--name <name>]
                            [--groups <group>, ...]
                            [--ostype <ostype>]
                            [--memory <memorysize in MB>]
                            [--pagefusion on|off]
                            [--vram <vramsize in MB>]
                            [--acpi on|off]
                            [--pciattach 03:04.0]
                            [--pciattach 03:04.0@02:01.0]
                            [--pcidetach 03:04.0]
                            [--ioapic on|off]
                            [--pae on|off]
                            [--hpet on|off]
                            [--hwvirtex on|off]
                            [--hwvirtexexcl on|off]
                            [--nestedpaging on|off]
                            [--largepages on|off]
                            [--vtxvpid on|off]
                            [--synthcpu on|off]
                            [--cpuidset <leaf> <eax> <ebx> <ecx> <edx>]
                            [--cpuidremove <leaf>]
                            [--cpuidremoveall]
                            [--hardwareuuid <uuid>]
                            [--cpus <number>]
                            [--cpuhotplug on|off]
                            [--plugcpu <id>]
                            [--unplugcpu <id>]
                            [--cpuexecutioncap <1-100>]
                            [--rtcuseutc on|off]
                            [--monitorcount <number>]
                            [--accelerate3d on|off]
                            [--accelerate2dvideo on|off]
                            [--firmware bios|efi|efi32|efi64]
                            [--chipset ich9|piix3]
                            [--bioslogofadein on|off]
                            [--bioslogofadeout on|off]
                            [--bioslogodisplaytime <msec>]
                            [--bioslogoimagepath <imagepath>]
                            [--biosbootmenu disabled|menuonly|messageandmenu]
                            [--biossystemtimeoffset <msec>]
                            [--biospxedebug on|off]
                            [--boot<1-4> none|floppy|dvd|disk|net>]
                            [--nic<1-N> none|null|nat|bridged|intnet|hostonly|
                                        generic]
                            [--nictype<1-N> Am79C970A|Am79C973|
                                            82540EM|82543GC|82545EM|
                                            virtio]
                            [--cableconnected<1-N> on|off]
                            [--nictrace<1-N> on|off]
                            [--nictracefile<1-N> <filename>]
                            [--nicproperty<1-N> name=[value]]
                            [--nicspeed<1-N> <kbps>]
                            [--nicbootprio<1-N> <priority>]
                            [--nicpromisc<1-N> deny|allow-vms|allow-all]
                            [--nicbandwidthgroup<1-N> none|<name>]
                            [--bridgeadapter<1-N> none|<devicename>]
                            [--hostonlyadapter<1-N> none|<devicename>]
                            [--intnet<1-N> <network name>]
                            [--natnet<1-N> <network>|default]
                            [--nicgenericdrv<1-N> <driver>
                            [--natsettings<1-N> [<mtu>],[<socksnd>],
                                                [<sockrcv>],[<tcpsnd>],
                                                [<tcprcv>]]
                            [--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
                                          <hostport>,[<guestip>],<guestport>]
                            [--natpf<1-N> delete <rulename>]
                            [--nattftpprefix<1-N> <prefix>]
                            [--nattftpfile<1-N> <file>]
                            [--nattftpserver<1-N> <ip>]
                            [--natbindip<1-N> <ip>
                            [--natdnspassdomain<1-N> on|off]
                            [--natdnsproxy<1-N> on|off]
                            [--natdnshostresolver<1-N> on|off]
                            [--nataliasmode<1-N> default|[log],[proxyonly],
                                                         [sameports]]
                            [--macaddress<1-N> auto|<mac>]
                            [--mouse ps2|usb|usbtablet
                            [--keyboard ps2|usb
                            [--uart<1-N> off|<I/O base> <IRQ>]
                            [--uartmode<1-N> disconnected|
                                             server <pipe>|
                                             client <pipe>|
                                             file <file>|
                                             <devicename>]
                            [--guestmemoryballoon <balloonsize in MB>]
                            [--audio none|null|coreaudio]
                            [--audiocontroller ac97|hda|sb16]
                            [--clipboard disabled|hosttoguest|guesttohost|
                                         bidirectional]
                            [--draganddrop disabled|hosttoguest
                            [--vrde on|off]
                            [--vrdeextpack default|<name>
                            [--vrdeproperty <name=[value]>]
                            [--vrdeport <hostport>]
                            [--vrdeaddress <hostip>]
                            [--vrdeauthtype null|external|guest]
                            [--vrdeauthlibrary default|<name>
                            [--vrdemulticon on|off]
                            [--vrdereusecon on|off]
                            [--vrdevideochannel on|off]
                            [--vrdevideochannelquality <percent>]
                            [--usb on|off]
                            [--usbehci on|off]
                            [--snapshotfolder default|<path>]
                            [--teleporter on|off]
                            [--teleporterport <port>]
                            [--teleporteraddress <address|empty>
                            [--teleporterpassword <password>]
                            [--teleporterpasswordfile  <file>|stdin]
                            [--tracing-enabled on|off]
                            [--tracing-config <config-string>]
                            [--tracing-allow-vm-access on|off]
                            [--usbwebcam on|off]
                            [--usbcardreader on|off]
                            [--autostart-enabled on|off]
                            [--autostart-delay <seconds>]

VBoxManage: error: Unknown option: --longmode
2014/10/23 14:56:16 Failed to modify VM "boot2docker-vm": exit status 1
tianon commented 9 years ago

Ah, I wonder if @SvenDowideit can comment about why we're so specific with all the flags we turn on. I'm guessing it'd probably work to trim some of the ones we try to use (like --longmode), since I run without several of them on my own machine without a problem (since I also run an older VirtualBox).

The ones I specifically successfully have patched out on my local box (in virtualbox/machine.go) are --longmode, --triplefaultreset, --vtxux, and the newly added --portcount (which was added for the speed increase it provides, so I'm sure there's something that could be done to intelligently detect whether it worked and silently ignore it if it didn't).

I'd hate to just start adding if vboxVersion > blahblahblah checks all over the boot2docker-cli codebase, so I'm very interested in figuring out what our "minimal set" is (specifically for latest VirtualBox, but would also benefit older versions, obviously).

SvenDowideit commented 9 years ago

nope, those ones i have nothing for.

rather than doing vboxVersion, call vboxmanage --help, then parse and only use the options that are available. if you're missing some, just output a warning with vbox version and some distance from what we've tested metric.

easy :snigger:

tianon commented 6 years ago

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).