Commit b05129e5 authored by Michael Kuzmin's avatar Michael Kuzmin

post-processor/vsphere: logging for upload parameters

parent 1d896748
...@@ -3,6 +3,7 @@ package vsphere ...@@ -3,6 +3,7 @@ package vsphere
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"log"
"github.com/mitchellh/packer/common" "github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/packer" "github.com/mitchellh/packer/packer"
"os/exec" "os/exec"
...@@ -137,6 +138,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac ...@@ -137,6 +138,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
ui.Message(fmt.Sprintf("Uploading %s to vSphere", vmx)) ui.Message(fmt.Sprintf("Uploading %s to vSphere", vmx))
var out bytes.Buffer var out bytes.Buffer
log.Printf("Starting ovftool with parameters: %s", strings.Join(args, " "))
cmd := exec.Command("ovftool", args...) cmd := exec.Command("ovftool", args...)
cmd.Stdout = &out cmd.Stdout = &out
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
......
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