diff --git a/builder/azure/arm/step_power_off_compute.go b/builder/azure/arm/step_power_off_compute.go index da0ede214..4f03adefd 100644 --- a/builder/azure/arm/step_power_off_compute.go +++ b/builder/azure/arm/step_power_off_compute.go @@ -28,7 +28,7 @@ func NewStepPowerOffCompute(client *AzureClient, ui packer.Ui) *StepPowerOffComp } func (s *StepPowerOffCompute) powerOffCompute(ctx context.Context, resourceGroupName string, computeName string) error { - f, err := s.client.VirtualMachinesClient.PowerOff(ctx, resourceGroupName, computeName) + f, err := s.client.VirtualMachinesClient.Deallocate(ctx, resourceGroupName, computeName) if err == nil { err = f.WaitForCompletion(ctx, s.client.VirtualMachinesClient.Client) }