Commit 15f40a3d authored by Alexander Golovko's avatar Alexander Golovko Committed by Mitchell Hashimoto

fix disabling vmware tools for ESX

parent 500d83b6
...@@ -23,6 +23,10 @@ type StepUploadTools struct { ...@@ -23,6 +23,10 @@ type StepUploadTools struct {
func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction { func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction {
driver := state.Get("driver").(Driver) driver := state.Get("driver").(Driver)
if c.ToolsUploadFlavor == "" {
return multistep.ActionContinue
}
if c.RemoteType == "esx5" { if c.RemoteType == "esx5" {
if err := driver.ToolsInstall(); err != nil { if err := driver.ToolsInstall(); err != nil {
state.Put("error", fmt.Errorf("Couldn't mount VMware tools ISO. Please check the 'guest_os_type' in your template.json.")) state.Put("error", fmt.Errorf("Couldn't mount VMware tools ISO. Please check the 'guest_os_type' in your template.json."))
...@@ -30,10 +34,6 @@ func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction { ...@@ -30,10 +34,6 @@ func (c *StepUploadTools) Run(state multistep.StateBag) multistep.StepAction {
return multistep.ActionContinue return multistep.ActionContinue
} }
if c.ToolsUploadFlavor == "" {
return multistep.ActionContinue
}
comm := state.Get("communicator").(packer.Communicator) comm := state.Get("communicator").(packer.Communicator)
tools_source := state.Get("tools_upload_source").(string) tools_source := state.Get("tools_upload_source").(string)
ui := state.Get("ui").(packer.Ui) ui := state.Get("ui").(packer.Ui)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment