diff --git a/cmd/scale.go b/cmd/scale.go index 05eca1cea2..04dda58095 100644 --- a/cmd/scale.go +++ b/cmd/scale.go @@ -188,6 +188,8 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error { vms, err := sc.client.ListVirtualMachines(sc.resourceGroupName) if err != nil { log.Fatalln("failed to get vms in the resource group. Error: %s", err.Error()) + } else if len(*vms.Value) < 1 { + log.Fatalln("The provided resource group does not contain any vms.") } for _, vm := range *vms.Value {