Updated things related to the parallels-iso builder to correspond to @azr's suggestions.

This commit is contained in:
Ali Rizvi-Santiago 2018-11-22 20:19:00 -06:00
parent 24140131c7
commit 784535a4e3
2 changed files with 2 additions and 4 deletions

View File

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

View File

@ -103,7 +103,7 @@ builder.
specified, the default is 10 seconds. specified, the default is 10 seconds.
- `cpus` (number) - The number of cpus to use for building the VM. - `cpus` (number) - The number of cpus to use for building the VM.
Defaults to building with just one. Defaults to `1`.
- `disk_size` (number) - The size, in megabytes, of the hard disk to create - `disk_size` (number) - The size, in megabytes, of the hard disk to create
for the VM. By default, this is 40000 (about 40 GB). for the VM. By default, this is 40000 (about 40 GB).