Hide Forgot
Description of problem: "waagent --serialconsole" fails to locate the grub configuration file on rhel7. rhel6 uses grub, however rhel 7 uses grub2. So this command fails to append the serial console options. Version-Release number of selected component (if applicable): WALinuxAgent-2.0.16-1.el7 How reproducible: Always Steps to Reproduce: 1. waagent --serialconsole 2. Check the line "GRUB_CMDLINE_LINUX" in /etc/default/grub and the kernel options in /boot/grub2/grub.cfg. Nothing like "console=ttyS0 earlyprintk=ttyS0" is added to these files. Actual results: Expected results: In /etc/default/grub, the options should be appended to the line "GRUB_CMDLINE_LINUX". And run grub2-mkconfig. Or in /boot/grub2/grub.cfg the options should be appended to the kernel line. Additional info: For rhel7, grubKernelBootOptionsFile = '/etc/default/grub' grubKernelBootOptionsLine = 'GRUB_CMDLINE_LINUX='
Hu I believe the setting to add "console=ttyS0 earlyprintk=ttyS0" is NOT something to do by WALA, but it's the manual step during preparing RHEL Azure image. See step 10 from this doc: https://acom-sandbox.azurewebsites.net/en-us/documentation/articles/virtual-machines-linux-create-upload-vhd-redhat/?rnd=1#prepare-an-image-from-hyper-v-manager so this bug is more like working as design. Scott
Liz Feel free to comment if I'm wrong or anything missed Scott
Yes, when we prepare the Azure image, we add "console=ttyS0 earlyprintk=ttyS0" to the grub files manually. By running command "waagent --serialconsole", it is supposed to do the same thing. It's documented in WALinuxAgent Github: -serialconsole: Configures GRUB to mark ttyS0 (the first serial port) as the boot console. This ensures that kernel bootup logs are sent to the serial port and made available for debugging. It's more like a nice to have feature, as it doesn't block any function. But I think we could make it fixed in the agent.
(In reply to lizzha from comment #3) > Yes, when we prepare the Azure image, we add "console=ttyS0 > earlyprintk=ttyS0" to the grub files manually. > > By running command "waagent --serialconsole", it is supposed to do the same > thing. It's documented in WALinuxAgent Github: > -serialconsole: Configures GRUB to mark ttyS0 (the first serial port) as > the boot console. This ensures that kernel bootup logs are sent to the > serial port and made available for debugging. > > It's more like a nice to have feature, as it doesn't block any function. But > I think we could make it fixed in the agent. Agree, this issue not affect on-demand vm image. Nice to fix it on WALA latest version to make WALA more robust.
Liz Make sense, thank you for comment. Wei Thank you for pointing it out. We will fix this in next version. Given it's not a blocking bug for your test, can you please move on your test?
(In reply to mingzhan from comment #5) > Liz > Make sense, thank you for comment. > Wei > Thank you for pointing it out. We will fix this in next version. > Given it's not a blocking bug for your test, can you please move on your > test? Sure, it is not a blocker.
This feature doesn't exist in WALinuxAgent-2.1.5. Close it. *** This bug has been marked as a duplicate of bug 1360492 ***