diff --git a/builder/vmware/artifact.go b/builder/vmware/artifact.go index 379b969b2..7e6fddb92 100644 --- a/builder/vmware/artifact.go +++ b/builder/vmware/artifact.go @@ -8,12 +8,13 @@ import ( // Artifact is the result of running the VMware builder, namely a set // of files associated with the resulting machine. type Artifact struct { - dir string - f []string + builderId string + dir string + f []string } -func (*Artifact) BuilderId() string { - return BuilderId +func (a *Artifact) BuilderId() string { + return a.builderId } func (a *Artifact) Files() []string { diff --git a/builder/vmware/builder.go b/builder/vmware/builder.go index 4d76a2b57..a9fe6c6b9 100644 --- a/builder/vmware/builder.go +++ b/builder/vmware/builder.go @@ -16,6 +16,7 @@ import ( ) const BuilderId = "mitchellh.vmware" +const BuilderIdESX = "mitchellh.vmware-esx" type Builder struct { config config @@ -463,7 +464,17 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe return nil, err } - return &Artifact{b.config.OutputDir, files}, nil + // Set the proper builder ID + builderId := BuilderId + if b.config.RemoteType != "" { + builderId = BuilderIdESX + } + + return &Artifact{ + builderId: builderId, + dir: b.config.OutputDir, + f: files, + }, nil } func (b *Builder) Cancel() {