Azure: Search for a specific VM series availability in region

Use Azure CLI to retrieve available VM SKUs (sizes) in a specified region, filter them by a VM type, and formats the output.

In this specific case, I am checking whether the E20as_v6 and E20s_v6 sizes are available in the eastus2 region and determining the zones in which they are offered:

mari@Azure:~$ az vm list-skus --location eastus2 --all true --resource-type virtualMachines --output table | grep -E "E20as_v6|E20s_v6"

virtualMachines eastus2 Standard_E20as_v6 1,2 None
virtualMachines eastus2 Standard_E20s_v6 1,2 None

Explanation of command/options:

Command/OptionDescription
az vm list-skusLists available VM SKUs (sizes)
--location eastus2Specifies the Azure region (eastus2) where the VM SKUs should be retrieved.
--all trueShow all information including vm sizes not available under the current subscription.
--resource-type virtualMachinesFilters the SKU list specifically for virtual machines.
--output tableFormats the output into a readable table format instead of JSON.
| grep -E "E20as_v6|E20s_v6"Pipes (|) the output into grep, filtering only the lines containing E20as_v6 or E20s_v6.

Explanation of the result:

ValueDescription
NoneThis column usually shows restrictions, such as NotAvailableForSubscription. Here, “None” means no restrictions apply, and the VM SKU can be deployed without limitations.
1, 2VMs are available in 1 and 2 availability zones

E-Series VMs are optimized for memory-intensive workloads such as in-memory databases, and big data applications.

Boot in single user mode and rescue your RHEL7

Problem:

One of our customer incorrectly changed fstab file and rebooted the OS. As a result, VM was not able to start. Fortunately, cloud where this VM was located supported serial console.

Solution:

We booted in single user mode through serial console and reverted the changes back. To boot in single user mode and update necessary file, do as follows:

Connect to the serial console and while OS is booting in a grub menu press e to edit the selected kernel:

Find line that starts with linux16 ( if you don’t see it press arrow down ), go to the end of this line and type rd.break.

Press ctrl+x.

Wait for a while and system will enter into single user mode:

During this time /sysroot is mounted in read only mode, you need to remount it in read write:

switch_root:/# mount -o remount,rw /sysroot
switch_root:/# chroot /sysroot

You can revert any changes back by updating any file, in our case we updated fstab:

sh-4.2# vim /etc/fstab

You are a real hero, because you rescued your system!