mirror of https://github.com/docker/docs.git
virtualbox: support linux host
Fixes #2110 Signed-off-by: Emmanuel Bretelle <chantr4@gmail.com>
This commit is contained in:
parent
52de03f64b
commit
42f1dbb964
|
@ -376,7 +376,9 @@ func (d *Driver) Create() error {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
shareName = "Users"
|
shareName = "Users"
|
||||||
shareDir = "/Users"
|
shareDir = "/Users"
|
||||||
// TODO "linux"
|
case "linux":
|
||||||
|
shareName = "hosthome"
|
||||||
|
shareDir = "/home"
|
||||||
}
|
}
|
||||||
|
|
||||||
if shareDir != "" && !d.NoShare {
|
if shareDir != "" && !d.NoShare {
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
package virtualbox
|
package virtualbox
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/docker/machine/libmachine/log"
|
||||||
|
)
|
||||||
|
|
||||||
// IsVTXDisabled checks if VT-X is disabled in the BIOS. If it is, the vm will fail to start.
|
// IsVTXDisabled checks if VT-X is disabled in the BIOS. If it is, the vm will fail to start.
|
||||||
// If we can't be sure it is disabled, we carry on and will check the vm logs after it's started.
|
// If we can't be sure it is disabled, we carry on and will check the vm logs after it's started.
|
||||||
func (d *Driver) IsVTXDisabled() bool {
|
func (d *Driver) IsVTXDisabled() bool {
|
||||||
|
errmsg := "Couldn't check that VT-X/AMD-v is enabled. Will check that the vm is properly created: %v"
|
||||||
|
output, err := cmdOutput("grep", "vmx", "/proc/cpuinfo")
|
||||||
|
if err != nil {
|
||||||
|
log.Debugf(errmsg, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disabled := !strings.Contains(output, "vmx")
|
||||||
|
return disabled
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue