Skip to content

Commit 3208b47

Browse files
authored
Merge pull request #121831 from mries/patch-9
Update redhat-create-upload-vhd.md
2 parents 8658fab + 9daba48 commit 3208b47

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

articles/virtual-machines/linux/redhat-create-upload-vhd.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,48 +222,52 @@ EOF
222222
223223
224224
```config-grub
225-
GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 earlyprintk=ttyS0 net.ifnames=0"
225+
GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0 net.ifnames=0"
226226
GRUB_TERMINAL_OUTPUT="serial console"
227227
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
228+
ENABLE_BLSCFG=true
228229
```
229230
230-
This will also ensure that all console messages are sent to the first serial port and enable interaction with the serial console, which can assist Azure support with debugging issues. This configuration also turns off the new RHEL 7 naming conventions for NICs.
231+
> [!NOTE]
232+
> If [**ENABLE_BLSCFG=false**](https://access.redhat.com/solutions/6929571) is present in `/etc/default/grub` instead of 'ENABLE_BLSCFG=true` tools such as ___grubedit___ or ___gubby___, which rely on the Boot Loader Specification (BLS) for managing boot entries and configurations, may not function correctly in RHEL 8 and 9. Be advised, if ENABLE_BLSCFG is not present, the default behavior is "false".
231233
232-
```config
233-
rhgb quiet crashkernel=auto
234-
```
234+
This will also ensure that all console messages are sent to the first serial port and enable interaction with the serial console, which can assist Azure support with debugging issues. This configuration also turns off the new RHEL 7 naming conventions for NICs.
235235
236-
Graphical and quiet boots aren't useful in a cloud environment where we want all the logs to be sent to the serial port. You can leave the `crashkernel` option configured if desired. Note that this parameter reduces the amount of available memory in the virtual machine by 128 MB or more, which might be problematic on smaller virtual machine sizes.
236+
```config
237+
rhgb quiet crashkernel=auto
238+
```
239+
240+
Graphical and quiet boots aren't useful in a cloud environment where we want all the logs to be sent to the serial port. You can leave the `crashkernel` option configured if desired. Note that this parameter reduces the amount of available memory in the virtual machine by 128 MB or more, which might be problematic on smaller virtual machine sizes.
237241
238-
8. After you're done editing `/etc/default/grub`, run the following command to rebuild the grub configuration:
242+
7. After you're done editing `/etc/default/grub`, run the following command to rebuild the grub configuration:
239243
240244
```bash
241245
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
242246
```
243247
> [!NOTE]
244248
> If uploading an UEFI enabled VM, the command to update grub is `grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg`.
245249
246-
9. Ensure that the SSH server is installed and configured to start at boot time, which is usually the default. Modify `/etc/ssh/sshd_config` to include the following line:
250+
8. Ensure that the SSH server is installed and configured to start at boot time, which is usually the default. Modify `/etc/ssh/sshd_config` to include the following line:
247251
248252
```config
249253
ClientAliveInterval 180
250254
```
251255
252-
10. The WALinuxAgent package, `WALinuxAgent-<version>`, has been pushed to the Red Hat extras repository. Enable the extras repository by running the following command:
256+
9. The WALinuxAgent package, `WALinuxAgent-<version>`, has been pushed to the Red Hat extras repository. Enable the extras repository by running the following command:
253257
254258
```bash
255259
sudo subscription-manager repos --enable=rhel-7-server-extras-rpms
256260
```
257261
258-
11. Install the Azure Linux Agent, cloud-init and other necessary utilities by running the following command:
262+
10. Install the Azure Linux Agent, cloud-init and other necessary utilities by running the following command:
259263
260264
```bash
261265
sudo yum install -y WALinuxAgent cloud-init cloud-utils-growpart gdisk hyperv-daemons
262266
sudo systemctl enable waagent.service
263267
sudo systemctl enable cloud-init.service
264268
```
265269
266-
12. Configure cloud-init to handle the provisioning:
270+
11. Configure cloud-init to handle the provisioning:
267271
268272
1. Configure waagent for cloud-init:
269273
@@ -319,7 +323,7 @@ EOF
319323
320324
```
321325
322-
13. Swap configuration.
326+
12. Swap configuration.
323327
Don't create swap space on the operating system disk.
324328
325329
Previously, the Azure Linux Agent was used to automatically configure swap space by using the local resource disk that is attached to the virtual machine after the virtual machine is provisioned on Azure. However, this is now handled by cloud-init, you **must not** use the Linux Agent to format the resource disk create the swap file, modify the following parameters in `/etc/waagent.conf` appropriately:
@@ -353,13 +357,13 @@ EOF
353357
- ["ephemeral0.2", "none", "swap", "sw,nofail,x-systemd.requires=cloud-init.service,x-systemd.device-timeout=2", "0", "0"]
354358
EOF
355359
```
356-
14. If you want to unregister the subscription, run the following command:
360+
13. If you want to unregister the subscription, run the following command:
357361
358362
```bash
359363
sudo subscription-manager unregister
360364
```
361365
362-
15. Deprovision
366+
14. Deprovision
363367
364368
Run the following commands to deprovision the virtual machine and prepare it for provisioning on Azure:
365369
@@ -375,9 +379,9 @@ EOF
375379
```
376380
377381
378-
16. Click **Action** > **Shut Down** in Hyper-V Manager. Your Linux VHD is now ready to be [**uploaded to Azure**](./upload-vhd.md#option-1-upload-a-vhd).
382+
15. Click **Action** > **Shut Down** in Hyper-V Manager. Your Linux VHD is now ready to be [**uploaded to Azure**](./upload-vhd.md#option-1-upload-a-vhd).
379383
380-
### RHEL 8 using Hyper-V Manager
384+
### RHEL 8+ using Hyper-V Manager
381385
382386
1. In Hyper-V Manager, select the virtual machine.
383387

0 commit comments

Comments
 (0)