-
Notifications
You must be signed in to change notification settings - Fork 95
Add VirtualBox 5 support #373
Add VirtualBox 5 support #373
Conversation
…xists in VirtualBox 5.
…because the former is only valid against a running VM. I'm not sure how/whether this ever worked, maybe controlvm was valid on stopped VMs in VirtualBox 4.x or something else happened to start the VM in between (which I doubt, because then "boot2docker init" vs. "boot2docker up" doesn't make sense anymore).
…ed to have created exactly this host-only network with the VBox GUI before running init.
Note that the VM this currently creates has 8 CPUs and 2048 MiB base memory, both of which are probably a bit excessive. It also only allocates 8 MiB of video memory, while VirtualBox complains that it needs at least 12. For now, I'm just taking care of these issues manually with the VBox GUI. |
@@ -658,7 +658,7 @@ func (m *Machine) Modify() error { | |||
"--cpuhotplug", m.Flag.Get(F_cpuhotplug), | |||
"--pae", m.Flag.Get(F_pae), | |||
"--longmode", m.Flag.Get(F_longmode), | |||
"--synthcpu", m.Flag.Get(F_synthcpu), | |||
//"--synthcpu", m.Flag.Get(F_synthcpu), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, probably a good idea.
This fixed VBox 5 issues for me. Thanks for this PR!
I've added some notes. |
Did it also create a VM with the maximum available CPUs and huge memory requirements for you? |
Something's not right yet. I regularly have VMs which error out during boot (so I have to recreate them with boot2docker-cli) and right now, I can't manage to have the docker client connect into a fresh VM anymore.
|
It stopped mounting the user directory as a shared folder (even though there's no error and it's not aborting when running boot2docker-cli). I suspect that's part of the problem. I'm getting lots of errors during boot now, for example:
and
and
|
The cause of my connection problems was local routes and is now fixed. The above errors (including the segfault) do still occur in the boot2docker VM. Not sure if that's VBox5-specific or if they are normal to occur in 1.7.0 (but segfaulting always feels wrong). |
I'll give it another go to try - sorry for the delay! |
Now I'm having my shared folders syncing incompletely (symptom: a simple text file opens fine with |
Some improvements to make boot2docker more compatible with VirtualBox 5.
There's still some issues, e.g. that you have to create the exact expected host-only network yourself to make boot2docker-cli pick it up without issues.
But at least this allowed me to bootstrap a boot2docker VM on Windows 10 with VirtualBox 5 (VBox4 doesn't work very well on Windows 10, specifically no host-only networks).
I don't think this a PR ready for merging right away. I've never wrote any go before and didn't set up a proper dev environment either. I just did the minimum steps to get a boot2docker VM up and running. But I figured I might still submit this, maybe there's something useful for you in here.
PS: I know you consider boot2docker-cli deprecated, but docker-machine has the same issues with VirtualBox 5 and its dev environment requires to have docker already running, which was a hen and egg problem for me.