mirror of https://github.com/docker/docs.git
Add option --longmode on to support Windows 32bit hosts
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
This commit is contained in:
parent
0c9adcb01e
commit
c40f9f7a21
|
|
@ -342,7 +342,8 @@ func (d *Driver) CreateVM() error {
|
|||
dnsProxy = "on"
|
||||
}
|
||||
|
||||
if err := d.vbm("modifyvm", d.MachineName,
|
||||
var modifyFlags = []string{
|
||||
"modifyvm", d.MachineName,
|
||||
"--firmware", "bios",
|
||||
"--bioslogofadein", "off",
|
||||
"--bioslogofadeout", "off",
|
||||
|
|
@ -364,7 +365,13 @@ func (d *Driver) CreateVM() error {
|
|||
"--largepages", "on",
|
||||
"--vtxvpid", "on",
|
||||
"--accelerate3d", "off",
|
||||
"--boot1", "dvd"); err != nil {
|
||||
"--boot1", "dvd"}
|
||||
|
||||
if runtime.GOOS == "windows" && runtime.GOARCH == "386" {
|
||||
modifyFlags = append(modifyFlags, "--longmode", "on")
|
||||
}
|
||||
|
||||
if err := d.vbm(modifyFlags...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package virtualbox
|
|||
import (
|
||||
"errors"
|
||||
"net"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
|
@ -320,13 +321,18 @@ func mockCalls(t *testing.T, driver *Driver, expectedCalls []Call) {
|
|||
func TestCreateVM(t *testing.T) {
|
||||
shareName, shareDir := getShareDriveAndName()
|
||||
|
||||
modifyVMcommand := "vbm modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 on --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd"
|
||||
if runtime.GOOS == "windows" && runtime.GOARCH == "386" {
|
||||
modifyVMcommand += " --longmode on"
|
||||
}
|
||||
|
||||
driver := NewDriver("default", "path")
|
||||
mockCalls(t, driver, []Call{
|
||||
{"CopyIsoToMachineDir path default http://b2d.org", "", nil},
|
||||
{"Generate path/machines/default/id_rsa", "", nil},
|
||||
{"Create 20000 path/machines/default/id_rsa.pub path/machines/default/disk.vmdk", "", nil},
|
||||
{"vbm createvm --basefolder path/machines/default --name default --register", "", nil},
|
||||
{"vbm modifyvm default --firmware bios --bioslogofadein off --bioslogofadeout off --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 1 --memory 1024 --acpi on --ioapic on --rtcuseutc on --natdnshostresolver1 off --natdnsproxy1 on --cpuhotplug off --pae on --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd", "", nil},
|
||||
{modifyVMcommand, "", nil},
|
||||
{"vbm modifyvm default --nic1 nat --nictype1 82540EM --cableconnected1 on", "", nil},
|
||||
{"vbm storagectl default --name SATA --add sata --hostiocache on", "", nil},
|
||||
{"vbm storageattach default --storagectl SATA --port 0 --device 0 --type dvddrive --medium path/machines/default/boot2docker.iso", "", nil},
|
||||
|
|
|
|||
Loading…
Reference in New Issue