Updated things related to the vmware-iso builder to include @azr's suggestions.

This commit is contained in:
Ali Rizvi-Santiago 2018-11-22 21:03:06 -06:00
parent 61ee3a44f5
commit f8c23c1808
2 changed files with 2 additions and 5 deletions

View File

@ -34,12 +34,10 @@ 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.MemorySize < 0 {
errs = append(errs, fmt.Errorf("An invalid amount of memory was specified (memory < 0): %d", c.MemorySize))
c.MemorySize = 0
}
// Peripherals
@ -59,7 +57,7 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error {
c.Serial = "none"
}
return nil
return errs
}
/* parallel port */

View File

@ -99,7 +99,6 @@ builder.
specified, the default is `10s` or 10 seconds.
- `cpus` (number) - The number of cpus to use when building the VM.
Defaults to building with just one.
- `cdrom_adapter_type` (string) - The adapter type (or bus) that will be used
by the cdrom device. This is chosen by default based on the disk adapter
@ -225,7 +224,7 @@ builder.
and `iso_url` is used. Only one of `iso_url` or `iso_urls` can be specified.
- `memory` (number) - The amount of memory to use when building the VM
in megabytes. Defaults to `512` megabytes.
in megabytes.
- `network` (string) - This is the network type that the virtual machine will
be created with. This can be one of the generic values that map to a device