Azure Virtual Machines

Empty Scale Sets

Ensures that there are no empty scale sets present.

Risk Level: Medium

Description

This plugin ensures that the Azure Virtual Machine (VM) scale sets have virtual machines attached. The Azure VM scale sets let you create and maintain load-balanced virtual machines. They also enable the creation of large-scale services in areas like computation, big data, and container workloads.

About the Service

Azure Virtual Machines:

Azure Virtual Machines (VM) are one of several forms of scalable, on-demand computing resources offered by Azure. VMs are typically used when you require more control over the computing environment than the other options provide.  To know more, read here.

Impact

If there are no VMs attached to a scale set then the scale set needs to be deleted. This will ensure that there are no unwanted billing charges. 

Steps to Reproduce

Using Azure Console-

  1. Log In to your Azure Console.
  2. Navigate to the Home portal of the Azure Console and click on All services.
  3. Select Virtual machine scale sets under Compute to access all the virtual machine scale sets present in the directory. You can use this link here to navigate directly if you’re already logged in.


  4. In the list of Virtual Machine (VM) scale sets displayed, select a scale set you wish to investigate.
  5. From the navigation panel on the left side of the console, click on Overview.


  6. Under the Availability + scaling section, check the value of the Instance count. If it is 0 then there are no instances in the selected scale set and hence must be deleted.


  7. Next, click on Networking under Settings in the navigation panel on the right.


  8. Go to the Load balancing tab on the Networking page and check if there are any load balancers attached to the selected scale set. If there are no load balancers attached to the scale set then the selected VM scale set can be safely removed from your directory.
  9. Repeat steps 4 to 8 for all the scale sets you wish to investigate in the selected directory.
  10. If you have multiple directories, repeat steps 2 to 9 for each directory in your Azure Console. 

Steps for Remediation

Follow the steps given below to make the necessary changes in order to remove all the empty scale sets from your Azure account.


Using GCP Console-

  1. Log In to your Azure Console.
  2. Navigate to the Home portal of the Azure Console and click on All services.
  3. Select Virtual machine scale sets under Compute to access all the virtual machine scale sets present in the directory. You can use this link here to navigate directly if you’re already logged in.


  4. From the list of scale sets, choose the VM scale set you want to reconfigure. (In case you aren’t sure which one needs to be configured, follow the steps to reproduce listed above to determine which scale set to choose.)
  5. From the navigation panel on the left side of the console, click on Overview.


  6. Click on the Delete button on the top navigation bar to delete the selected VM scale set. Click yes in the confirmation box to confirm the deletion.


  7. Repeat steps 3 to 7 for all the VM scale sets you want to reconfigure in the selected directory.
  8. If you have multiple directories, repeat steps 2 to 8 for each directory in your Azure Console.