Reverse default port count virtualbox argument

As we know the exact versions that used the old `sataportcount` option, it's safe to assume we want to use the newer `portcount` option for everything else.

Reversed the option check and use the `portcount` option by default. Prevents needing to update this for future major versions of VirtualBox.
This commit is contained in:
Ed Maxwell-Lyte 2019-01-08 14:14:21 +00:00
parent 65b3e67951
commit e40c90423f
1 changed files with 3 additions and 3 deletions

View File

@ -24,9 +24,9 @@ func (d *VBox42Driver) CreateSATAController(vmName string, name string, portcoun
return err
}
portCountArg := "--sataportcount"
if strings.HasPrefix(version, "4.3") || strings.HasPrefix(version, "5.") || strings.HasPrefix(version, "6.") {
portCountArg = "--portcount"
if strings.HasPrefix(version, "1.") || strings.HasPrefix(version, "2.") || strings.HasPrefix(version, "3.") || strings.HasPrefix(version, "4.0") || strings.HasPrefix(version, "4.1") || strings.HasPrefix(version, "4.2") {
portCountArg := "--sataportcount"
}
command := []string{