Always fetch a new VM instance from UUID for consistency
This commit is contained in:
parent
5e87812ecf
commit
dfa9d63097
@ -207,7 +207,6 @@ func (self *stepCreateInstance) Run(state multistep.StateBag) multistep.StepActi
|
||||
}
|
||||
|
||||
state.Put("instance_uuid", instanceId)
|
||||
state.Put("instance", instance)
|
||||
ui.Say(fmt.Sprintf("Created instance '%s'", instanceId))
|
||||
|
||||
return multistep.ActionContinue
|
||||
|
@ -27,7 +27,12 @@ func (self *stepStartOnHIMN) Run(state multistep.StateBag) multistep.StepAction
|
||||
|
||||
ui.Say("Step: Start VM on the Host Internal Mangement Network")
|
||||
|
||||
instance := state.Get("instance").(*VM)
|
||||
uuid := state.Get("instance_uuid").(string)
|
||||
instance, err := client.GetVMByUuid(uuid)
|
||||
if err != nil {
|
||||
ui.Error(fmt.Sprintf("Unable to get VM from UUID '%s': %s", uuid, err.Error()))
|
||||
return multistep.ActionHalt
|
||||
}
|
||||
|
||||
// Find the HIMN Ref
|
||||
networks, err := client.GetNetworkByNameLabel("Host internal management network")
|
||||
|
Loading…
Reference in New Issue
Block a user