Merge pull request #6909 from hashicorp/fix_6908
builder/hyperv/vmcx: allow to set generation from buildfile
This commit is contained in:
commit
d0ab078013
|
@ -85,7 +85,7 @@ type Config struct {
|
|||
MacAddress string `mapstructure:"mac_address"`
|
||||
VlanId string `mapstructure:"vlan_id"`
|
||||
Cpu uint `mapstructure:"cpu"`
|
||||
Generation uint
|
||||
Generation uint `mapstructure:"generation"`
|
||||
EnableMacSpoofing bool `mapstructure:"enable_mac_spoofing"`
|
||||
EnableDynamicMemory bool `mapstructure:"enable_dynamic_memory"`
|
||||
EnableSecureBoot bool `mapstructure:"enable_secure_boot"`
|
||||
|
@ -155,8 +155,6 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|||
b.config.Cpu = 1
|
||||
}
|
||||
|
||||
b.config.Generation = 1
|
||||
|
||||
if b.config.CloneFromVMName == "" {
|
||||
if b.config.CloneFromVMCXPath == "" {
|
||||
errs = packer.MultiErrorAppend(errs, fmt.Errorf("The clone_from_vm_name must be specified if "+
|
||||
|
|
Loading…
Reference in New Issue