Commit b1bd71c1 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: Create WaitForIP step

parent bfbc3e37
......@@ -22,6 +22,8 @@ type config struct {
HTTPDir string `mapstructure:"http_directory"`
BootCommand []string `mapstructure:"boot_command"`
BootWait uint `mapstructure:"boot_wait"`
SSHUser string `mapstructure:"ssh_user"`
SSHPassword string `mapstructure:"ssh_password"`
}
func (b *Builder) Prepare(raw interface{}) (err error) {
......@@ -53,6 +55,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook) packer.Artifact {
&stepHTTPServer{},
&stepRun{},
&stepTypeBootCommand{},
&stepWaitForIP{},
}
// Setup the state bag
......
package vmware
import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
)
// This step creates the virtual disks for the VM.
//
// Uses:
// config *config
// ui packer.Ui
//
// Produces:
// <nothing>
type stepWaitForIP struct{}
func (stepWaitForIP) Run(state map[string]interface{}) multistep.StepAction {
ui := state["ui"].(packer.Ui)
ui.Say("Waiting for SSH to become available...")
select{}
return multistep.ActionContinue
}
func (stepWaitForIP) Cleanup(map[string]interface{}) {}
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