diff --git a/builder/vmware/iso/config.go b/builder/vmware/iso/config.go index ec7d5822b..54ed11c28 100644 --- a/builder/vmware/iso/config.go +++ b/builder/vmware/iso/config.go @@ -167,7 +167,12 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { } } - if c.Format == "" { + if c.Format != "" { + if c.RemoteType != "esx5" { + errs = packer.MultiErrorAppend(errs, + fmt.Errorf("format is only valid when RemoteType=esx5")) + } + } else { c.Format = "ovf" }