Updated things related to the general hw config in the virtualbox builders to correspond to @azr's suggestions.
This commit is contained in:
parent
eca26f43f2
commit
0f019407d6
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue