func (a AzureClient) StopVirtualMachine(resourceGroup, name string) error {
	log.Info("Stopping virtual machine.", logutil.Fields{"vm": name})
	if _, err := a.virtualMachinesClient().PowerOff(resourceGroup, name, nil); err != nil {
		return err
	}
	return a.waitVMPowerState(resourceGroup, name, Stopped, waitPowerOffTimeout)
}
func (a AzureClient) StopVirtualMachine(resourceGroup, name string) error {
	log.Info("Stopping virtual machine.", logutil.Fields{"vm": name})
	if _, err := a.virtualMachinesClient().PowerOff(resourceGroup, name, nil); err != nil {
		return err
	}
	return a.waitVMPowerState(resourceGroup, name, Stopped, waitPowerOffTimeout)
}
func ( a AzureClient ) StopVirtualMachine ( resourceGroup , name string ) error { log . Info ( " " , logutil . Fields { " " : name } ) if _ , err := a . virtualMachinesClient ( ) . PowerOff ( resourceGroup , name , nil ) ; err != nil { return err } return a . waitVMPowerState ( resourceGroup , name , Stopped , waitPowerOffTimeout ) }
// StopVirtualMachine power offs the virtual machine and waits until it reaches
// the goal state (stopped) or times out.
StopVirtualMachine power offs the virtual machine and waits until it reaches the goal state ( stopped ) or times out .