Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion builder/xenserver/common/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ type CommonConfig struct {
HTTPPortMin uint `mapstructure:"http_port_min"`
HTTPPortMax uint `mapstructure:"http_port_max"`

Communicator string `mapstructure:"communicator"`

// SSHHostPortMin uint `mapstructure:"ssh_host_port_min"`
// SSHHostPortMax uint `mapstructure:"ssh_host_port_max"`
SSHKeyPath string `mapstructure:"ssh_key_path"`
Expand Down Expand Up @@ -174,7 +176,7 @@ func (c *CommonConfig) Prepare(ctx *interpolate.Context, pc *common.PackerConfig
}
*/

if c.SSHUser == "" {
if c.SSHUser == "" && c.Communicator != "winrm" {
errs = append(errs, errors.New("An ssh_username must be specified."))
}

Expand Down
1 change: 1 addition & 0 deletions builder/xenserver/xva/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (self *Builder) Prepare(raws ...interface{}) (params []string, retErr error

errs = packer.MultiErrorAppend(
errs, self.config.CommonConfig.Prepare(&self.config.ctx, &self.config.PackerConfig)...)
errs = packer.MultiErrorAppend(errs, self.config.SSHConfig.Prepare(&self.config.ctx)...)

// Set default values

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.