Skip to content

Commit bf12d19

Browse files
committed
Merge pull request docker-archive-public#3018 from hypriot/improve-no-vtx-check
Improve --virtualbox-no-vtx-check option to allow starting the VM
2 parents 9564477 + 78efd68 commit bf12d19

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

drivers/virtualbox/virtualbox.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,16 @@ func (d *Driver) Start() error {
489489
log.Infof("VM not in restartable state")
490490
}
491491

492-
// Verify that VT-X is not disabled in the started VM
493-
vtxIsDisabled, err := d.IsVTXDisabledInTheVM()
494-
if err != nil {
495-
return fmt.Errorf("Checking if hardware virtualization is enabled failed: %s", err)
496-
}
492+
if !d.NoVTXCheck {
493+
// Verify that VT-X is not disabled in the started VM
494+
vtxIsDisabled, err := d.IsVTXDisabledInTheVM()
495+
if err != nil {
496+
return fmt.Errorf("Checking if hardware virtualization is enabled failed: %s", err)
497+
}
497498

498-
if vtxIsDisabled {
499-
return ErrMustEnableVTX
499+
if vtxIsDisabled {
500+
return ErrMustEnableVTX
501+
}
500502
}
501503

502504
log.Infof("Waiting for an IP...")

0 commit comments

Comments
 (0)