Make disk_size mandatory parameter for iso builder
This commit is contained in:
parent
9c4d5c6c59
commit
1851223ad2
|
@ -31,7 +31,9 @@ func defaultConfig() map[string]interface{} {
|
|||
"ssh_username": "root",
|
||||
"ssh_password": "jetbrains",
|
||||
|
||||
"vm_name": commonT.NewVMName(),
|
||||
"vm_name": commonT.NewVMName(),
|
||||
"disk_size": 2,
|
||||
|
||||
"communicator": "none", // do not start the VM without any bootable devices
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/hashicorp/packer/packer"
|
||||
"github.com/hashicorp/packer/template/interpolate"
|
||||
"github.com/jetbrains-infra/packer-builder-vsphere/common"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
@ -35,6 +36,9 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
|
|||
errs = packer.MultiErrorAppend(errs, c.RunConfig.Prepare()...)
|
||||
errs = packer.MultiErrorAppend(errs, c.ConnectConfig.Prepare()...)
|
||||
errs = packer.MultiErrorAppend(errs, c.HardwareConfig.Prepare()...)
|
||||
if c.DiskSize <= 0 {
|
||||
errs = packer.MultiErrorAppend(errs, fmt.Errorf("'disk_size' must be provided"))
|
||||
}
|
||||
errs = packer.MultiErrorAppend(errs, c.ShutdownConfig.Prepare()...)
|
||||
errs = packer.MultiErrorAppend(errs, c.CreateConfig.Prepare()...)
|
||||
|
||||
|
|
Loading…
Reference in New Issue