Merge pull request #6909 from hashicorp/fix_6908

builder/hyperv/vmcx: allow to set generation from buildfile
This commit is contained in:
Adrien Delorme 2018-10-24 16:02:35 +02:00 committed by GitHub
commit d0ab078013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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 "+