diff --git a/builder/vmware/common/hw_config.go b/builder/vmware/common/hw_config.go index fa092402b..d740025c2 100644 --- a/builder/vmware/common/hw_config.go +++ b/builder/vmware/common/hw_config.go @@ -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 */ diff --git a/website/source/docs/builders/vmware-iso.html.md.erb b/website/source/docs/builders/vmware-iso.html.md.erb index d0f8f5f13..12d0d77cc 100644 --- a/website/source/docs/builders/vmware-iso.html.md.erb +++ b/website/source/docs/builders/vmware-iso.html.md.erb @@ -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