Add VMName to the vmx mods.
This commit is contained in:
parent
7b5943160b
commit
2d00dc6756
|
@ -23,6 +23,7 @@ import (
|
|||
type StepConfigureVMX struct {
|
||||
CustomData map[string]string
|
||||
SkipFloppy bool
|
||||
VMName string
|
||||
}
|
||||
|
||||
func (s *StepConfigureVMX) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
||||
|
@ -47,6 +48,7 @@ func (s *StepConfigureVMX) Run(_ context.Context, state multistep.StateBag) mult
|
|||
// Create a new UUID for this VM, since it is a new VM
|
||||
vmxData["uuid.action"] = "create"
|
||||
|
||||
vmxData["displayname"] = s.VMName
|
||||
// Delete any generated addresses since we want to regenerate
|
||||
// them. Conflicting MAC addresses is a bad time.
|
||||
addrRegex := regexp.MustCompile(`(?i)^ethernet\d+\.generatedAddress`)
|
||||
|
|
|
@ -316,6 +316,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
&stepCreateVMX{},
|
||||
&vmwcommon.StepConfigureVMX{
|
||||
CustomData: b.config.VMXData,
|
||||
VMName: b.config.VMName,
|
||||
},
|
||||
&vmwcommon.StepSuppressMessages{},
|
||||
&common.StepHTTPServer{
|
||||
|
|
|
@ -73,6 +73,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
},
|
||||
&vmwcommon.StepConfigureVMX{
|
||||
CustomData: b.config.VMXData,
|
||||
VMName: b.config.VMName,
|
||||
},
|
||||
&vmwcommon.StepSuppressMessages{},
|
||||
&common.StepHTTPServer{
|
||||
|
|
Loading…
Reference in New Issue