|
|
|
|
@ -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
|
|
|
|
|
@ -46,5 +44,5 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error {
|
|
|
|
|
c.USB = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
return errs
|
|
|
|
|
}
|
|
|
|
|
|