Encrypting boot partition Libvirt not showing the OS booting up

Peter Krempa pkrempa at redhat.com
Tue Oct 13 08:58:27 UTC 2020


On Tue, Oct 13, 2020 at 10:40:11 +0200, john doe wrote:
> On 10/13/2020 8:50 AM, john doe wrote:

[...]

> > Thank you, I have now isolated the command generated by libvirt.
> > Starting this command from a script, a vnc server is started.
> > 
> > Is libvirt internally using vnc connection?
> > 
> 
> It looks like the issue is that the libvirt command pass to qemu is
> using '-display none' where it should be '-nographic'.

That is deliberate:

commit 7a97676b968bcdf60fb987afe6308bc0b4ab9cd3
Author: Paolo Bonzini <pbonzini at redhat.com>
Date:   Tue Jul 5 14:35:28 2016 +0200

    qemu: generate -display none

    This is preferrable to -nographic which (in addition to disabling
    graphics output) redirects the serial port to stdio and on OpenBIOS
    enables the firmware's serial console.


We don't want to use stdio serial port at all, but rather explicitly
defined ones exposed internally such as:

    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>


I've verified that once I add the suggested useserial attribute:

  <os>
    <type arch='x86_64' machine='pc-i440fx-2.9'>hvm</type>
    <bootmenu enable='yes'/>
    <bios useserial='yes'/>
  </os>

to one of my VMs I can see the console when started via virsh start
--console:

$ virsh start --console upstream
Domain upstream started
Connected to domain upstream
Escape character is ^] (Ctrl + ])


iPXE (http://ipxe.org) 00:03.0 C100 PCI2.10 PnP PMM+3E7835A0+3E6E35A0 C100





iPXE (http://ipxe.org) 00:08.0 C200 PCI2.10 PnP PMM+3E6D25A0 3E6E35A0 C200




Press ESC for boot menu.





More information about the libvirt-users mailing list