Update step_type_boot_command.go
This commit is contained in:
parent
02d6278161
commit
f566af1fae
@ -68,14 +68,13 @@ func (self *StepTypeBootCommand) Run(ctx context.Context, state multistep.StateB
|
|||||||
}
|
}
|
||||||
|
|
||||||
location, err := c.client.Console.GetLocation(c.session, consoles[0])
|
location, err := c.client.Console.GetLocation(c.session, consoles[0])
|
||||||
ui.Say(fmt.Sprintf("LOCATION: %s", location))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ui.Error(err.Error())
|
ui.Error(err.Error())
|
||||||
return multistep.ActionHalt
|
return multistep.ActionHalt
|
||||||
}
|
}
|
||||||
locationPieces := strings.SplitAfter(location, "/")
|
locationPieces := strings.SplitAfter(location, "/")
|
||||||
consoleHost := strings.TrimSuffix(locationPieces[2], "/")
|
consoleHost := strings.TrimSuffix(locationPieces[2], "/")
|
||||||
ui.Say("Connecting to the VM console VNC over xapi")
|
ui.Say(fmt.Sprintf("Connecting to the VM console VNC over xapi via %s", consoleHost))
|
||||||
conn, err := net.Dial("tcp", fmt.Sprintf("%s:443", consoleHost))
|
conn, err := net.Dial("tcp", fmt.Sprintf("%s:443", consoleHost))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user