@@ -49,7 +49,7 @@ Assign a name to your new disk, select the same Resource Group as the snapshot,
49
49
The ** Source type** is ** Snapshot** .
50
50
The ** Source snapshot** is the name of the ** snapshot** previously created.
51
51
52
- ![ createdisk2 ] ( ./media/chroot-logical-volume-manager/create-disk-from-snap-2.png )
52
+ ![ create disk 2 ] ( ./media/chroot-logical-volume-manager/create-disk-from-snap-2.png )
53
53
54
54
Create a mount point for the attached disk.
55
55
@@ -61,15 +61,15 @@ Run the **fdisk -l** command to verify the snapshot disk has been attached and l
61
61
62
62
Most scenarios, the attached snapshot disk will be seen as ** /dev/sdc** displaying two partitions ** /dev/sdc1** and ** /dev/sdc2**
63
63
64
- ![ fdisk ] ( ./media/chroot-logical-volume-manager/fdisk-output-sdc.png )
64
+ ![ Fdisk ] ( ./media/chroot-logical-volume-manager/fdisk-output-sdc.png )
65
65
66
66
The ** \* ** indicates a boot partition, both partitions are to be mounted.
67
67
68
68
Run the command ** lsblk** to see the LVMs of the affected VM
69
69
70
70
` lsblk `
71
71
72
- ![ run lsblk] ( ./media/chroot-logical-volume-manager/lsblk-output-mounted.png )
72
+ ![ Run lsblk] ( ./media/chroot-logical-volume-manager/lsblk-output-mounted.png )
73
73
74
74
75
75
Verify if LVMs from the affected VM are displayed.
@@ -92,7 +92,7 @@ The output of the next command will show the path to mount for the **root** LV
92
92
93
93
` pvdisplay -m | grep -i rootlv `
94
94
95
- ![ rootlv ] ( ./media/chroot-logical-volume-manager/locate-rootlv.png )
95
+ ![ Rootlv ] ( ./media/chroot-logical-volume-manager/locate-rootlv.png )
96
96
97
97
Proceed to mount this device on the directory /rescue
98
98
@@ -107,11 +107,11 @@ mount /dev/sdc1 /rescue/boot
107
107
Verify the file systems of the attached disk are now correctly mounted using the ** lsblk** command
108
108
109
109
110
- ![ run lsblk] ( ./media/chroot-logical-volume-manager/lsblk-output.png )
110
+ ![ Run lsblk] ( ./media/chroot-logical-volume-manager/lsblk-output.png )
111
111
112
112
or the ** df -Th** command
113
113
114
- ![ df ] ( ./media/chroot-logical-volume-manager/df-output.png )
114
+ ![ Df ] ( ./media/chroot-logical-volume-manager/df-output.png )
115
115
116
116
## Gaining chroot access
117
117
@@ -143,7 +143,7 @@ Commands can be used to install, remove and update software. Troubleshoot VMs in
143
143
144
144
145
145
Execute the lsblk command and the /rescue is now / and /rescue/boot is /boot
146
- ![ chrooted ] ( ./media/chroot-logical-volume-manager/chrooted.png )
146
+ ![ Chrooted ] ( ./media/chroot-logical-volume-manager/chrooted.png )
147
147
148
148
## Perform Fixes
149
149
@@ -169,19 +169,19 @@ grub2-mkconfig -o /boot/grub2/grub.cfg
169
169
* walkthrough*
170
170
171
171
The ** grep** command lists the kernels that ** grub.cfg** is aware of.
172
- ![ kernels ] ( ./media/chroot-logical-volume-manager/kernels.png )
172
+ ![ Kernels ] ( ./media/chroot-logical-volume-manager/kernels.png )
173
173
174
174
** grub2-editenv list** displays which kernel will be loaded at next boot
175
- ![ kernel_default ] ( ./media/chroot-logical-volume-manager/kernel-default.png )
175
+ ![ Kernel default ] ( ./media/chroot-logical-volume-manager/kernel-default.png )
176
176
177
177
** grub2-set-default** is used to change to another kernel
178
- ![ grub2_set ] ( ./media/chroot-logical-volume-manager/grub2_set_default .png )
178
+ ![ Grub2 set ] ( ./media/chroot-logical-volume-manager/grub2-set-default .png )
179
179
180
180
** grub2-editenv** list displays which kernel will be loaded at next boot
181
- ![ new_kernel ] ( ./media/chroot-logical-volume-manager/kernel-new.png )
181
+ ![ New kernel ] ( ./media/chroot-logical-volume-manager/kernel-new.png )
182
182
183
183
** grub2-mkconfig** rebuilds grub.cfg using the versions required
184
- ![ grub2_mkconfig ] ( ./media/chroot-logical-volume-manager/grub2-mkconfig.png )
184
+ ![ Grub2 mkconfig ] ( ./media/chroot-logical-volume-manager/grub2-mkconfig.png )
185
185
186
186
187
187
@@ -194,22 +194,22 @@ Run the **lvs** command to verify which **LVs** are available for mounting, ever
194
194
195
195
Exit the ** chroot** environment mount the required ** LV**
196
196
197
- ![ advanced ] ( ./media/chroot-logical-volume-manager/advanced.png )
197
+ ![ Advanced ] ( ./media/chroot-logical-volume-manager/advanced.png )
198
198
199
199
Now access the ** chroot** environment again by running
200
200
201
201
` chroot /rescue `
202
202
203
203
All LVs should be visible as mounted partitions
204
204
205
- ![ advanced ] ( ./media/chroot-logical-volume-manager/chroot-all-mounts.png )
205
+ ![ Advanced ] ( ./media/chroot-logical-volume-manager/chroot-all-mounts.png )
206
206
207
207
Query the installed ** kernel**
208
208
209
- ![ advanced ] ( ./media/chroot-logical-volume-manager/rpm-kernel.png )
209
+ ![ Advanced ] ( ./media/chroot-logical-volume-manager/rpm-kernel.png )
210
210
211
211
If needed upgrade the ** kernel**
212
- ![ advanced ] ( ./media/chroot-logical-volume-manager/rpm-remove-kernel.png )
212
+ ![ Advanced ] ( ./media/chroot-logical-volume-manager/rpm-remove-kernel.png )
213
213
214
214
215
215
### Example 3 - enable Serial Console
@@ -234,19 +234,19 @@ umount /rescue
234
234
Detach the disk from the rescue VM and perform a Disk Swap.
235
235
236
236
Select the VM from the portal ** Disks** and select ** detach**
237
- ![ detachdisk ] ( ./media/chroot-logical-volume-manager/detach-disk.png )
237
+ ![ Detach disk ] ( ./media/chroot-logical-volume-manager/detach-disk.png )
238
238
239
239
Save the changes
240
- ![ savedetach ] ( ./media/chroot-logical-volume-manager/save-detach.png )
240
+ ![ Save detach ] ( ./media/chroot-logical-volume-manager/save-detach.png )
241
241
242
242
The disk will now become available allowing it to be swapped with the original OS disk of the affected VM.
243
243
244
244
Navigate in the Azure portal to the failing VM and select ** Disks** -> ** Swap OS Disk**
245
- ![ swapdisk ] ( ./media/chroot-logical-volume-manager/swap-disk.png )
245
+ ![ Swap disk ] ( ./media/chroot-logical-volume-manager/swap-disk.png )
246
246
247
247
Complete the fields the ** Choose disk** is the snapshot disk just detached in the previous step. The VM name of the affected VM is also required then select ** OK**
248
248
249
- ![ newosdisk ] ( ./media/chroot-logical-volume-manager/new-osdisk.png )
249
+ ![ New os disk ] ( ./media/chroot-logical-volume-manager/new-osdisk.png )
250
250
251
251
If the VM is running the Disk Swap will shut it down, reboot the VM once the disk swap operation has completed.
252
252
0 commit comments