Updated things related to the general hw config in the virtualbox builders to correspond to @azr's suggestions.

This commit is contained in:
Ali Rizvi-Santiago 2018-11-22 20:48:00 -06:00
parent eca26f43f2
commit 0f019407d6
1 changed files with 1 additions and 3 deletions

View File

@ -23,7 +23,6 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error {
// Hardware and cpu options
if c.CpuCount < 0 {
errs = append(errs, fmt.Errorf("An invalid number of cpus was specified (cpus < 0): %d", c.CpuCount))
c.CpuCount = 0
}
if c.CpuCount == 0 {
c.CpuCount = 1
@ -31,7 +30,6 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error {
if c.MemorySize < 0 {
errs = append(errs, fmt.Errorf("An invalid memory size was specified (memory < 0): %d", c.MemorySize))
c.MemorySize = 0
}
if c.MemorySize == 0 {
c.MemorySize = 512
@ -42,5 +40,5 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error {
c.Sound = "none"
}
return nil
return errs
}