forked from adamlaska/machine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirtualbox_darwin.go
More file actions
35 lines (28 loc) · 857 Bytes
/
virtualbox_darwin.go
File metadata and controls
35 lines (28 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package virtualbox
import (
"strings"
"syscall"
"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.
// 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 {
features, err := syscall.Sysctl("machdep.cpu.features")
if err != nil {
log.Debugf("Couldn't check that VT-X/AMD-v is enabled. Will check that the vm is properly created: %v", err)
return false
}
return isVTXDisabled(features)
}
func isVTXDisabled(features string) bool {
return !strings.Contains(features, "VMX")
}
func detectVBoxManageCmd() string {
return detectVBoxManageCmdInPath()
}
func getShareDriveAndName() (string, string) {
return "Users", "/Users"
}
func isHyperVInstalled() bool {
return false
}