aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmware/vmware.go
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vmware/vmware.go')
-rw-r--r--vm/vmware/vmware.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/vmware/vmware.go b/vm/vmware/vmware.go
index 104c3d6a9..e4379717b 100644
--- a/vm/vmware/vmware.go
+++ b/vm/vmware/vmware.go
@@ -4,6 +4,7 @@
package vmware
import (
+ "context"
"fmt"
"io"
"net"
@@ -173,7 +174,7 @@ func (inst *instance) Copy(hostSrc string) (string, error) {
return vmDst, nil
}
-func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command string) (
+func (inst *instance) Run(ctx context.Context, command string) (
<-chan []byte, <-chan error, error) {
vmxDir := filepath.Dir(inst.vmx)
serial := filepath.Join(vmxDir, "serial")
@@ -217,9 +218,8 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin
merger.Add("dmesg", dmesg)
merger.Add("ssh", rpipe)
- return vmimpl.Multiplex(cmd, merger, timeout, vmimpl.MultiplexConfig{
+ return vmimpl.Multiplex(ctx, cmd, merger, vmimpl.MultiplexConfig{
Console: dmesg,
- Stop: stop,
Close: inst.closed,
Debug: inst.debug,
Scale: inst.timeouts.Scale,