|
|
|
|
@ -32,23 +32,23 @@ type config struct {
|
|
|
|
|
vmwcommon.ToolsConfig `mapstructure:",squash"`
|
|
|
|
|
vmwcommon.VMXConfig `mapstructure:",squash"`
|
|
|
|
|
|
|
|
|
|
DiskName string `mapstructure:"vmdk_name"`
|
|
|
|
|
DiskSize uint `mapstructure:"disk_size"`
|
|
|
|
|
DiskTypeId string `mapstructure:"disk_type_id"`
|
|
|
|
|
FloppyFiles []string `mapstructure:"floppy_files"`
|
|
|
|
|
GuestOSType string `mapstructure:"guest_os_type"`
|
|
|
|
|
ISOChecksum string `mapstructure:"iso_checksum"`
|
|
|
|
|
ISOChecksumType string `mapstructure:"iso_checksum_type"`
|
|
|
|
|
ISOUrls []string `mapstructure:"iso_urls"`
|
|
|
|
|
VMName string `mapstructure:"vm_name"`
|
|
|
|
|
HTTPDir string `mapstructure:"http_directory"`
|
|
|
|
|
HTTPPortMin uint `mapstructure:"http_port_min"`
|
|
|
|
|
HTTPPortMax uint `mapstructure:"http_port_max"`
|
|
|
|
|
BootCommand []string `mapstructure:"boot_command"`
|
|
|
|
|
SkipCompaction bool `mapstructure:"skip_compaction"`
|
|
|
|
|
VMXTemplatePath string `mapstructure:"vmx_template_path"`
|
|
|
|
|
VNCPortMin uint `mapstructure:"vnc_port_min"`
|
|
|
|
|
VNCPortMax uint `mapstructure:"vnc_port_max"`
|
|
|
|
|
DiskName string `mapstructure:"vmdk_name"`
|
|
|
|
|
DiskSize uint `mapstructure:"disk_size"`
|
|
|
|
|
DiskTypeId string `mapstructure:"disk_type_id"`
|
|
|
|
|
FloppyFiles []string `mapstructure:"floppy_files"`
|
|
|
|
|
GuestOSType string `mapstructure:"guest_os_type"`
|
|
|
|
|
ISOChecksum string `mapstructure:"iso_checksum"`
|
|
|
|
|
ISOChecksumType string `mapstructure:"iso_checksum_type"`
|
|
|
|
|
ISOUrls []string `mapstructure:"iso_urls"`
|
|
|
|
|
VMName string `mapstructure:"vm_name"`
|
|
|
|
|
HTTPDir string `mapstructure:"http_directory"`
|
|
|
|
|
HTTPPortMin uint `mapstructure:"http_port_min"`
|
|
|
|
|
HTTPPortMax uint `mapstructure:"http_port_max"`
|
|
|
|
|
BootCommand []string `mapstructure:"boot_command"`
|
|
|
|
|
SkipCompaction bool `mapstructure:"skip_compaction"`
|
|
|
|
|
VMXTemplatePath string `mapstructure:"vmx_template_path"`
|
|
|
|
|
VNCPortMin uint `mapstructure:"vnc_port_min"`
|
|
|
|
|
VNCPortMax uint `mapstructure:"vnc_port_max"`
|
|
|
|
|
|
|
|
|
|
RemoteType string `mapstructure:"remote_type"`
|
|
|
|
|
RemoteDatastore string `mapstructure:"remote_datastore"`
|
|
|
|
|
@ -145,19 +145,19 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, error) {
|
|
|
|
|
|
|
|
|
|
// Errors
|
|
|
|
|
templates := map[string]*string{
|
|
|
|
|
"disk_name": &b.config.DiskName,
|
|
|
|
|
"guest_os_type": &b.config.GuestOSType,
|
|
|
|
|
"http_directory": &b.config.HTTPDir,
|
|
|
|
|
"iso_checksum": &b.config.ISOChecksum,
|
|
|
|
|
"iso_checksum_type": &b.config.ISOChecksumType,
|
|
|
|
|
"iso_url": &b.config.RawSingleISOUrl,
|
|
|
|
|
"vm_name": &b.config.VMName,
|
|
|
|
|
"vmx_template_path": &b.config.VMXTemplatePath,
|
|
|
|
|
"remote_type": &b.config.RemoteType,
|
|
|
|
|
"remote_host": &b.config.RemoteHost,
|
|
|
|
|
"remote_datastore": &b.config.RemoteDatastore,
|
|
|
|
|
"remote_user": &b.config.RemoteUser,
|
|
|
|
|
"remote_password": &b.config.RemotePassword,
|
|
|
|
|
"disk_name": &b.config.DiskName,
|
|
|
|
|
"guest_os_type": &b.config.GuestOSType,
|
|
|
|
|
"http_directory": &b.config.HTTPDir,
|
|
|
|
|
"iso_checksum": &b.config.ISOChecksum,
|
|
|
|
|
"iso_checksum_type": &b.config.ISOChecksumType,
|
|
|
|
|
"iso_url": &b.config.RawSingleISOUrl,
|
|
|
|
|
"vm_name": &b.config.VMName,
|
|
|
|
|
"vmx_template_path": &b.config.VMXTemplatePath,
|
|
|
|
|
"remote_type": &b.config.RemoteType,
|
|
|
|
|
"remote_host": &b.config.RemoteHost,
|
|
|
|
|
"remote_datastore": &b.config.RemoteDatastore,
|
|
|
|
|
"remote_user": &b.config.RemoteUser,
|
|
|
|
|
"remote_password": &b.config.RemotePassword,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for n, ptr := range templates {
|
|
|
|
|
@ -310,9 +310,9 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|
|
|
|
|
|
|
|
|
steps := []multistep.Step{
|
|
|
|
|
&vmwcommon.StepPrepareTools{
|
|
|
|
|
RemoteType: b.config.RemoteType,
|
|
|
|
|
RemoteType: b.config.RemoteType,
|
|
|
|
|
ToolsUploadFlavor: b.config.ToolsUploadFlavor,
|
|
|
|
|
ToolsUploadPath: b.config.ToolsUploadPath,
|
|
|
|
|
ToolsUploadPath: b.config.ToolsUploadPath,
|
|
|
|
|
},
|
|
|
|
|
&common.StepDownload{
|
|
|
|
|
Checksum: b.config.ISOChecksum,
|
|
|
|
|
@ -357,10 +357,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|
|
|
|
NoPty: b.config.SSHSkipRequestPty,
|
|
|
|
|
},
|
|
|
|
|
&vmwcommon.StepUploadTools{
|
|
|
|
|
RemoteType: b.config.RemoteType,
|
|
|
|
|
RemoteType: b.config.RemoteType,
|
|
|
|
|
ToolsUploadFlavor: b.config.ToolsUploadFlavor,
|
|
|
|
|
ToolsUploadPath: b.config.ToolsUploadPath,
|
|
|
|
|
Tpl: b.config.tpl,
|
|
|
|
|
ToolsUploadPath: b.config.ToolsUploadPath,
|
|
|
|
|
Tpl: b.config.tpl,
|
|
|
|
|
},
|
|
|
|
|
&common.StepProvision{},
|
|
|
|
|
&vmwcommon.StepShutdown{
|
|
|
|
|
|