diff --git a/builder/virtualbox/common/hw_config.go b/builder/virtualbox/common/hw_config.go index 48ce852aa..6da48bf7d 100644 --- a/builder/virtualbox/common/hw_config.go +++ b/builder/virtualbox/common/hw_config.go @@ -9,8 +9,8 @@ import ( type HWConfig struct { // cpu information - CpuCount int `mapstructure:"cpu_count"` - MemorySize int `mapstructure:"memory_size"` + CpuCount int `mapstructure:"cpus"` + MemorySize int `mapstructure:"memory"` // device presence Sound string `mapstructure:"sound"` @@ -22,7 +22,7 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error { // Hardware and cpu options if c.CpuCount < 0 { - errs = append(errs, fmt.Errorf("An invalid cpu_count was specified (cpu_count < 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 { @@ -30,7 +30,7 @@ func (c *HWConfig) Prepare(ctx *interpolate.Context) []error { } if c.MemorySize < 0 { - errs = append(errs, fmt.Errorf("An invalid memory_size was specified (memory_size < 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 { diff --git a/website/source/docs/builders/virtualbox-iso.html.md.erb b/website/source/docs/builders/virtualbox-iso.html.md.erb index 50ec05ec6..0ebfa3679 100644 --- a/website/source/docs/builders/virtualbox-iso.html.md.erb +++ b/website/source/docs/builders/virtualbox-iso.html.md.erb @@ -94,7 +94,7 @@ builder. five seconds and one minute 30 seconds, respectively. If this isn't specified, the default is `10s` or 10 seconds. -- `cpu_count` (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. - `disk_size` (number) - The size, in megabytes, of the hard disk to create @@ -252,7 +252,7 @@ builder. - `keep_registered` (boolean) - Set this to `true` if you would like to keep the VM registered with virtualbox. Defaults to `false`. -- `memory_size` (number) - The amount of memory to use for building the VM +- `memory` (number) - The amount of memory to use for building the VM in megabytes. Defaults to `512` megabytes. - `output_directory` (string) - This is the path to the directory where the