builder/vmware: Ability to set the guest OS type
This commit is contained in:
parent
09db84eb5e
commit
a0664c7ec8
|
@ -23,6 +23,7 @@ type Builder struct {
|
|||
|
||||
type config struct {
|
||||
DiskName string `mapstructure:"vmdk_name"`
|
||||
GuestOSType string `mapstructure:"guest_os_type"`
|
||||
ISOUrl string `mapstructure:"iso_url"`
|
||||
VMName string `mapstructure:"vm_name"`
|
||||
OutputDir string `mapstructure:"output_directory"`
|
||||
|
@ -55,6 +56,10 @@ func (b *Builder) Prepare(raw interface{}) (err error) {
|
|||
b.config.DiskName = "disk"
|
||||
}
|
||||
|
||||
if b.config.GuestOSType == "" {
|
||||
b.config.GuestOSType = "other"
|
||||
}
|
||||
|
||||
if b.config.VMName == "" {
|
||||
b.config.VMName = "packer"
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ func (stepCreateVMX) Run(state map[string]interface{}) multistep.StepAction {
|
|||
|
||||
tplData := &vmxTemplateData{
|
||||
config.VMName,
|
||||
"ubuntu-64",
|
||||
config.GuestOSType,
|
||||
config.DiskName,
|
||||
config.ISOUrl,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue