[CentOS-virt] What is the purpose setting console=hvc0 in the dom0 grub config?

George Dunlap

dunlapg at umich.edu
Wed May 17 15:44:27 UTC 2017


On Wed, May 17, 2017 at 4:20 PM, Jerry <jerryubi at gmail.com> wrote:
> On Wed, May 17, 2017 at 2:39 AM, George Dunlap <dunlapg at umich.edu> wrote:
>>
>> On Wed, May 17, 2017 at 4:26 AM, Jerry <jerryubi at gmail.com> wrote:
>> > I always disable "rhgb quiet" on a fresh install because I don't like
>> > boot
>> > messages being hidden from me, and now this other thing does it.  I like
>> > details, I need the details, don't hide them from me.
>>
>> I feel the same way about 'rhgb quiet'.  :-)
>>
>> The 'console=hvc0' setting doesn't hide them from you, it just sends
>> them somewhere you're not looking.
>
>
> I'm looking at the system's console during installation. Sending it
> somewhere else is hiding it from me.
>
>>
>> On bare metal, the console output can typically go two places:
>> 1. The screen
>> 2. A serial port
>>
>> For server applications serial has several advantages over the screen:
>> * You can capture the output to more easily report bugs
>> * If you're capturing it you can keep things that would have scrolled
>> off-screen, or been erased due to a reboot
>> * In a datacenter it's faster, more convenient, and cheaper than an
>> IP-based KVM switch
>
>
> I get what these things are, but not what hvc0 is doing.

See below -- it sends the output to Xen; Xen will then forward it to
the serial, the screen, or both.

> This system has built-in IPMI, the installation was done remotely using it.
>
>>
>> Xen has the same two options above; but when Linux is running as a
>> dom0 under Xen, there are three places to put it:
>> 1. The screen
>> 2. A serial line
>> 3. Send it to Xen to put wherever Xen is putting it
>>
>> #1 is easy, but #2 is tricky because Xen is likely to be already using
>> the serial port you want to use.
>>
>> "console=hvc0" is #3.
>>
>> What's your Xen command-line look like?  The default should be
>> "console=com1,tty", so Xen's output should show up both places (and so
>> should Linux's if it's set to console=hvc0).
>
>
> This is what's defined in /etc/default/grub following the install of the
> Xen:
>
> GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M cpuinfo com1=115200,8n1
> console=com1,tty loglvl=all guest_loglvl=all"
> GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="console=hvc0 earlyprintk=xen
> nomodeset"
>
> I didn't set these myself, this is what the xen package (or one of its
> dependencies) is doing.

It's the CentOS Xen package setting this.  But the Xen option
"console=com1,tty" should make it such that Xen sends its output
*both* to the serial line, *and* the monitor.

I take it you're not seeing any Xen output at all on your IPMI console?

 -George



More information about the CentOS-virt mailing list