Skip to content

Commit d9e7e26

Browse files
author
naman-msft
committed
Merge branch 'main' of github.com:MicrosoftDocs/executable-docs
2 parents 0ebfd07 + 682114f commit d9e7e26

File tree

56 files changed

+10580
-854
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+10580
-854
lines changed

LICENSE-CODE

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,22 @@ Check if all prerequisites below are met before writing the Exec Doc. ***If any
357357

358358
**Example:**
359359

360-
**Title:** _Making your Azure Doc executable!_
360+
**Title:** Making your Azure Doc executable!
361361

362-
_**Details:** Hello [author_name], \
363-
\
364-
I am submitting this PR to make the doc you have authored executable! Essentially, without any major content changes, this will make your doc accesssible, accurate, and actionable! And what is "this": Exec Docs (short for Executable Documentation) \
365-
\
366-
Exec Docs are documents that automate the deployment/maintenace of Azure resources using Azure CLI commands. This is a new initiative undertaken by the Azure Core Linux, Skilling, and Portal teams to simplify the evaluation and adoption of services for Linux on Azure customers. [Learn More Here!](https://github.com/MicrosoftDocs/executable-docs/blob/main/README.md)\
367-
\
368-
Once you get acquainted with Exec Docs, I would love to get your review on this doc. If you have any questions feel free to contact me or [Naman Parikh](mailto:[email protected])._
362+
**Details:**
363+
364+
Hello [author_name],
365+
366+
This PR will increase the value of the doc to customers, it turns the doc into an Executable Document! An Executable Document improves the customer experience by making the content actionable in portal as well as ensuring that it works, as documented, using automated testing.
367+
368+
Exec Docs are:
369+
- Fully integrated into Portal where the user can leverage them in hands on learning experiences OR low effort "click to deploy" scenarios
370+
- Increased reusability through adoption of consistent best practices and exportable scripts
371+
- Higher quality as a result of automated testing
372+
373+
We have conducted many experiments and have consistent results that show higher CSAT from customers working with Exec Docs. This in turn results in a higher conversion rate from experimentation to paid customer. [Learn More Here!](https://microsoft-my.sharepoint.com/:p:/p/namanparikh/EdxlQiyhGDhFmGcAUE9fejYB3r6ZzgLqWO3jZPK7fcnKgQ?e=CDWOet)
374+
375+
Once you get acquainted with Exec Docs, I would love to get your review on this doc. If you have any questions feel free to contact me or [Naman Parikh](mailto:[email protected]).
369376

370377
- Assign the original Exec Doc author (if it is not you) as a reviewer to the PR. In most cases, this assignment should happen automatically and should include a reviewer from the Skilling team.
371378
- Add the comment ***#sign-off*** in the PR comments section once the Exec Doc is successfully reviewed. This will trigger the automated pipeline to merge the PR into the public repo.
@@ -514,11 +521,10 @@ For the first PR, if either the original doc author or someone from skilling is
514521
## Contact Information for Exec Docs
515522
516523
- PM for Exec Docs E2E Experience: [Naman Parikh](mailto:[email protected])
517-
- PM for Exec Docs Portal Experience: [Varun Desai](mailto:[email protected])
518-
- PM for Innovation Engine: [Mitchell Bifeld](mailto:[email protected])
519-
- Skilling & Content Developer for Exec Docs: [Carol Smith](mailto:[email protected])
520-
- Devs for Exec Docs: [PJ Singh](mailto:[email protected]), [Aria Amini](mailto:[email protected]), [Abhishek Bhombore](mailto:[email protected])
521-
- Devs for Innovation Engine: [Vincenzo Marcella](mailto:[email protected]), [Rahul Gupta](mailto:[email protected])
524+
- PM for Exec Docs Portal Experience: [Matt DePietro]([email protected])
525+
- PM for Innovation Engine: [Ross Gardler](mailto:[email protected])
526+
- MS Learn Point Person: [Carol Smith](mailto:[email protected]), [Rayo Flores](mailto:[email protected]), [Chase Dovey](mailto:[email protected]),
527+
- Devs for Exec Docs: [PJ Singh](mailto:[email protected]), [Aria Amini](mailto:[email protected])
522528
523529
## Trademarks
524530
This project may contain trademarks or logos for projects, products, or
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Troubleshoot Linux VM boot issues due to fstab errors | Microsoft Learn
3+
description: Explains why Linux VM cannot start and how to solve the problem.
4+
services: virtual-machines
5+
documentationcenter: ''
6+
author: divargas-msft
7+
ms.author: divargas
8+
manager: dcscontentpm
9+
tags: ''
10+
ms.custom: sap:My VM is not booting, linux-related-content, devx-track-azurecli, mode-api, innovation-engine
11+
ms.service: azure-virtual-machines
12+
ms.collection: linux
13+
ms.topic: troubleshooting
14+
ms.workload: infrastructure-services
15+
ms.tgt_pltfrm: vm-linux
16+
ms.devlang: azurecli
17+
ms.date: 02/25/2025
18+
---
19+
20+
21+
# Troubleshoot Linux VM boot issues due to fstab errors
22+
23+
**Applies to:** :heavy_check_mark: Linux VMs
24+
25+
<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region
26+
27+
The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.
28+
29+
```azurecli-interactive
30+
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
31+
export MY_VM_NAME="myVM89f292"
32+
```
33+
-->
34+
35+
The Linux filesystem table, fstab is a configuration table which is designed to configure rules where specific file systems are detected and mounted in an orderly manner during the system boot process.
36+
This article discusses multiple conditions where a wrong fstab configuration can lead to boot issue and provides troubleshooting guidance.
37+
38+
Few common reasons that can lead to Virtual Machine Boot issues due to fstab misconfiguration are listed below:
39+
40+
* Traditional filesystem name is used instead of the Universally Unique Identifier (UUID) of the filesystem.
41+
* An incorrect UUID is used.
42+
* An entry exists for an unattached device without `nofail` option within fstab configuration.
43+
* Incorrect entry within fstab configuration.
44+
45+
## Identify fstab issues
46+
47+
Check the current boot state of the VM in the serial log within the [Boot diagnostics] (/azure/virtual-machines/boot-diagnostics#boot-diagnostics-view) blade in the Azure portal. The VM will be in an Emergency Mode. You see log entries that resemble the following example leading to the Emergency Mode state:
48+
49+
```output
50+
[K[[1;31m TIME [0m] Timed out waiting for device dev-incorrect.device.
51+
[[1;33mDEPEND[0m] Dependency failed for /data.
52+
[[1;33mDEPEND[0m] Dependency failed for Local File Systems.
53+
...
54+
Welcome to emergency mode! After logging in, type "journalctl -xb" to viewsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.
55+
Give root password for maintenance
56+
(or type Control-D to continue)
57+
```
58+
59+
>[!Note]
60+
> "/data" is an example of mount point used. Dependency failure for filesystem mount point will differ based on the names used.
61+
62+
## Resolution
63+
64+
There are 2 ways to resolve the issue:
65+
66+
* Repair the VM online
67+
* [Use the Serial Console](#use-the-serial-console)
68+
* Repair the vm offline
69+
* [Use Azure Linux Auto Repair (ALAR)](#use-azure-linux-auto-repair-alar)
70+
* [Use Manual Method](#use-manual-method)
71+
72+
#### Use Azure Linux Auto Repair (ALAR)
73+
74+
Azure Linux Auto Repair (ALAR) scripts is a part of VM repair extension described in [Repair a Linux VM by using the Azure Virtual Machine repair commands](./repair-linux-vm-using-azure-virtual-machine-repair-commands.md). ALAR covers automation of multiple repair scenarios including `/etc/fstab` issues.
75+
76+
The ALAR scripts use the repair extension `run` command and its `--run-id` option. The script-id for the automated recovery is: **linux-alar2**. Implement the following steps to automate fstab errors via offline ALAR approach:
77+
78+
```azurecli-interactive
79+
output=$(az extension add -n vm-repair; az extension update -n vm-repair; az vm repair repair-button --button-command 'fstab' --verbose --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME)
80+
value=$(echo "$output" | jq -r '.message')
81+
extracted=$(echo $value)
82+
echo "$extracted"
83+
```
84+
85+
> [!NOTE]
86+
> The fstab repair script will take a backup of the original file and strip off any lines in the /etc/fstab file which are not needed to boot a system. After successful start of the OS, edit the fstab again and correct any errors which didn't allow a reboot of the system before.
87+
88+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Recover Azure Linux VM from kernel panic due to missing initramfs
3+
description: Provides solutions to an issue in which a Linux virtual machine (VM) can't boot after applying kernel changes.
4+
author: divargas-msft
5+
ms.author: divargas
6+
ms.date: 02/25/2025
7+
ms.reviewer: jofrance
8+
ms.service: azure-virtual-machines
9+
ms.custom: sap:Cannot start or stop my VM, devx-track-azurecli, mode-api, innovation-engine, linux-related-content
10+
ms.workload: infrastructure-services
11+
ms.tgt_pltfrm: vm-linux
12+
ms.collection: linux
13+
ms.topic: troubleshooting
14+
---
15+
16+
# Azure Linux virtual machine fails to boot after applying kernel changes
17+
18+
**Applies to:** :heavy_check_mark: Linux VMs
19+
20+
<!-- Commenting out these entries as this information should be selected by the user along with the corresponding subscription and region
21+
22+
The First step in this tutorial is to define environment variables, and install the corresponding package, if necessary.
23+
24+
```azurecli-interactive
25+
export MY_RESOURCE_GROUP_NAME="myVMResourceGroup89f292"
26+
export MY_VM_NAME="myVM89f292"
27+
```
28+
-->
29+
30+
31+
## Prerequisites
32+
33+
Make sure the [serial console](serial-console-linux.md) is enabled and functional in the Linux VM.
34+
35+
## Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
36+
37+
This error occurs because of a recent system update (kernel). It's most commonly seen in RHEL-based distributions.
38+
You can [identify this issue from the Azure serial console](#identify-kernel-boot-issue). You'll see any of the following error messages:
39+
40+
1. "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
41+
42+
```output
43+
[ 301.026129] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
44+
[ 301.027122] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G ------------ T 3.10.0-1160.36.2.el7.x86_64 #1
45+
[ 301.027122] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090008 12/07/2018
46+
[ 301.027122] Call Trace:
47+
[ 301.027122] [<ffffffff82383559>] dump_stack+0x19/0x1b
48+
[ 301.027122] [<ffffffff8237d261>] panic+0xe8/0x21f
49+
[ 301.027122] [<ffffffff8298b794>] mount_block_root+0x291/0x2a0
50+
[ 301.027122] [<ffffffff8298b7f6>] mount_root+0x53/0x56
51+
[ 301.027122] [<ffffffff8298b935>] prepare_namespace+0x13c/0x174
52+
[ 301.027122] [<ffffffff8298b412>] kernel_init_freeable+0x222/0x249
53+
[ 301.027122] [<ffffffff8298ab28>] ? initcall_blcklist+0xb0/0xb0
54+
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
55+
[ 301.027122] [<ffffffff8237235e>] kernel_init+0xe/0x100
56+
[ 301.027122] [<ffffffff82395df7>] ret_from_fork_nospec_begin+0x21/0x21
57+
[ 301.027122] [<ffffffff82372350>] ? rest_init+0x80/0x80
58+
[ 301.027122] Kernel Offset: 0xc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
59+
```
60+
61+
2. "error: file '/initramfs-*.img' not found"
62+
63+
> error: file '/initramfs-3.10.0-1160.36.2.el7.x86_64.img' not found.
64+
65+
This kind of error indicates that the initramfs file isn't generated, the GRUB configuration file has the initrd entry missing after a patching process, or a GRUB manual misconfiguration.
66+
67+
### Regenerate missing initramfs by using Azure Repair VM ALAR scripts
68+
69+
1. Create a repair VM by running the following Bash command line with [Azure Cloud Shell](/azure/cloud-shell/overview). For more information, see [Use Azure Linux Auto Repair (ALAR) to fix a Linux VM - initrd option](repair-linux-vm-using-ALAR.md#initrd). This command will regenerate the initrd/initramfs image, regenerate the GRUB configuration file if it has the initrd entry missing, and swap the OS disk
70+
71+
```azurecli-interactive
72+
output=$(az extension add -n vm-repair; az extension update -n vm-repair; az vm repair repair-button --button-command 'initrd' --verbose --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME)
73+
value=$(echo "$output" | jq -r '.message')
74+
extracted=$(echo $value)
75+
echo "$extracted"
76+
```
77+
78+
2. Once the repair VM command has been executed, restart the original VM and validate that it's able to boot up.
79+
80+
## Next steps
81+
82+
If the specific boot error isn't a kernel related boot issue, see [Troubleshoot Azure Linux Virtual Machines boot errors](./boot-error-troubleshoot-linux.md) for further troubleshooting options.
83+
84+
[!INCLUDE [Azure Help Support](../../../includes/azure-help-support.md)]

scenarios/ObtainPerformanceMetricsLinuxSustem/obtain-performance-metrics-linux-system.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export MY_VM_NAME="myVM89f292"
5050
The full command for installation of the `sysstat` package on some popular Distros is:
5151

5252
```bash
53-
az vm run-command invoke --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --command-id RunShellScript --scripts "/bin/bash -c 'OS=\$(cat /etc/os-release|grep NAME|head -1|cut -d= -f2 | sed \"s/\\\"//g\"); if [[ \$OS =~ \"Ubuntu\" ]] || [[ \$OS =~ \"Debian\" ]]; then sudo apt install sysstat -y; elif [[ \$OS =~ \"Red Hat\" ]]; then sudo dnf install sysstat -y; elif [[ \$OS =~ \"SUSE\" ]]; then sudo zypper install sysstat --non-interactive; else echo \"Unknown distribution\"; fi'"
53+
output=$(az vm run-command invoke --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --command-id RunShellScript --scripts "/bin/bash -c 'OS=\$(cat /etc/os-release|grep NAME|head -1|cut -d= -f2 | sed \"s/\\\"//g\"); if [[ \$OS =~ \"Ubuntu\" ]] || [[ \$OS =~ \"Debian\" ]]; then sudo apt install sysstat -y; elif [[ \$OS =~ \"Red Hat\" ]]; then sudo dnf install sysstat -y; elif [[ \$OS =~ \"SUSE\" ]]; then sudo zypper install sysstat --non-interactive; else echo \"Unknown distribution\"; fi'")
54+
value=$(echo "$output" | jq -r '.value[0].message')
55+
extracted=$(echo "$value" | awk '/\[stdout\]/,/\[stderr\]/' | sed '/\[stdout\]/d' | sed '/\[stderr\]/d')
56+
echo "$extracted"
5457
```
5558

5659
## CPU

0 commit comments

Comments
 (0)