Merge pull request #2744 from dgageot/vtx-hyperv

Tell the user that Hyperv could cause VBox to fail
This commit is contained in:
Nathan LeClaire 2016-01-05 19:20:10 -08:00
commit 222791fec4
1 changed files with 7 additions and 6 deletions

View File

@ -211,10 +211,11 @@ func (d *Driver) PreCreateCheck() error {
return err return err
} }
if !d.NoVTXCheck && d.IsVTXDisabled() {
if isHyperVInstalled() { if isHyperVInstalled() {
return ErrNotCompatibleWithHyperV return ErrNotCompatibleWithHyperV
} }
if !d.NoVTXCheck {
return ErrMustEnableVTX return ErrMustEnableVTX
} }
@ -489,12 +490,12 @@ func (d *Driver) Start() error {
} }
// Verify that VT-X is not disabled in the started VM // Verify that VT-X is not disabled in the started VM
disabled, err := d.IsVTXDisabledInTheVM() vtxIsDisabled, err := d.IsVTXDisabledInTheVM()
if err != nil { if err != nil {
return fmt.Errorf("Checking if hardware virtualization is enabled failed: %s", err) return fmt.Errorf("Checking if hardware virtualization is enabled failed: %s", err)
} }
if disabled { if vtxIsDisabled {
return ErrMustEnableVTX return ErrMustEnableVTX
} }