[libvirt-users] Slow boot when no serial pty connected

David Caro dcaro at redhat.com
Wed Dec 16 11:03:23 UTC 2015


On 12/16 11:55, Martin Kletzander wrote:
> On Tue, Dec 15, 2015 at 09:47:41PM +0100, David Caro wrote:
> >
> >Hi everyone!
> >
> >It's the first time I send a message to this list, I hope it's not the last :)
> >
> >So my issue is that when booting a disk image generated with virt-builder [1]
> >it takes more than 5 minutes, waiting in the boot screen that says:
> >
> >"
> >Booting from disk...
> >press any key to continue.
> >"
> >
> >The press any key message shows up to 5 times. The issue is that it stays in
> >that screen for more than 5 min.
> >
> >If I attach a serial pty device, then it takes ~5 seconds to go through that
> >screen (same messages, just show faster).
> >
> 
> This sounds like a bug.  If that is the case, then it could be QEMU's
> problem, for that I would suggest asking on qemu-discuss:
> 
>  https://lists.nongnu.org/mailman/listinfo/qemu-discuss
> 
> If, however, that is expected, for some reason, then virt-builder could
> add the pty itself.  For that I would ask on libguestfs ML:
> 
>  https://www.redhat.com/mailman/listinfo/libguestfs
> 
> I would add those lists to Cc, but cross-posting through 3 lists does
> not sound like a great idea.  But the chance that someone from qemu and
> libguestfs will have a look at this is quite low here I guess.
> 
virt-builder does not create domain xmls, it just creates the disk image so I
suppose that I should handle that after
> 
> >I don't want to have to create a pty device each time I want to spin up a vm
> >(if there's a way to tell libvirt to do that for me that would be ok too).
> >
> 
> You could use virt-xml from the virt-tools (installed as part of
> virt-manager, I believe) to do that:
> 
>  virt-xml fedora23 --add-device --serial pty

This will prove very helpful not just in this case :)


> 
> >Is there any workaround I can do to avoid having to create a pty and still get
> >fast boot?
> >
> >
> >The xml of the slow vm:
> >
> ><domain type='kvm'>
> >   <name>fedora23</name>
> >   <memory unit='MiB'>2048</memory>
> >   <vcpu>1</vcpu>
> >   <cpu mode='host-passthrough'>
> >     <topology sockets='1' cores='1' threads='1'/>
> >   </cpu>
> >   <os>
> >     <type arch='x86_64' machine='pc'>hvm</type>
> >     <boot dev='hd'/>
> >     <bootmenu enable='yes' timeout='3000'/>
> 
> This should mean that qemu will wait in the boot menu for 3 seconds and
> then it continue booting from hard drive first.  Can you try removing
> this form the XML (using virsh edit for example) or just set enable to
> "no"?  Just to see whether it's misbehaving as well.

I started without it, then added it with different values but got the same
outcome in any case.

> 
> If contacting the qemu mailing list, I suggest attaching the command
> line htat's used for qemu to run.

Will do thanks for the help!

> 
> >   </os>
> >   <features>
> >     <acpi/>
> >     <apic/>
> >     <pae/>
> >   </features>
> >   <devices>
> >     <emulator>/usr/libexec/qemu-kvm</emulator>
> >     <disk type='file' device='disk'>
> >       <driver name='qemu' type='qcow2'/>
> >       <source file='/tmp/fedora-23.qcow2'/>
> >       <target dev='sda' bus='virtio'/>
> >     </disk>
> >     <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>
> >     <channel type='unix'>
> >       <source mode='bind'/>
> >       <target type='virtio' name='org.qemu.guest_agent.0'/>
> >     </channel>
> >   </devices>
> ></domain>
> >
> >
> >The same with this device boots fast:
> >
> >   <serial type='pty'>
> >     <source path='/dev/pts/12'/>
> >     <target port='0'/>
> >     <alias name='serial0'/>
> >   </serial>
> >
> >
> >The libvirt/qemu/kvm versions I'm using:
> >
> >ipxe-roms-qemu-20150407-3.gitdc795b9f.fc23.noarch
> >libvirt-1.2.18.1-2.fc23.x86_64
> >libvirt-client-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-config-network-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-config-nwfilter-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-interface-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-libxl-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-lxc-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-network-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-nodedev-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-nwfilter-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-qemu-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-secret-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-storage-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-uml-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-vbox-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-driver-xen-1.2.18.1-2.fc23.x86_64
> >libvirt-daemon-kvm-1.2.18.1-2.fc23.x86_64
> >libvirt-gconfig-0.2.2-1.fc23.x86_64
> >libvirt-glib-0.2.2-1.fc23.x86_64
> >libvirt-gobject-0.2.2-1.fc23.x86_64
> >libvirt-python-1.2.18-1.fc23.x86_64
> >qemu-common-2.4.1-1.fc23.x86_64
> >qemu-guest-agent-2.4.1-1.fc23.x86_64
> >qemu-img-2.4.1-1.fc23.x86_64
> >qemu-kvm-2.4.1-1.fc23.x86_64
> >qemu-system-x86-2.4.1-1.fc23.x86_64
> >
> >
> >Thanks!!
> >
> >
> >[1] The image was created with the command:
> > $ virt-builder --format=qcow2 fedora-23
> >
> >
> >--
> >David Caro
> >
> >Red Hat S.L.
> >Continuous Integration Engineer - EMEA ENG Virtualization R&D
> >
> >Tel.: +420 532 294 605
> >Email: dcaro at redhat.com
> >IRC: dcaro|dcaroest@{freenode|oftc|redhat}
> >Web: www.redhat.com
> >RHT Global #: 82-62605
> 
> 
> 
> >_______________________________________________
> >libvirt-users mailing list
> >libvirt-users at redhat.com
> >https://www.redhat.com/mailman/listinfo/libvirt-users



-- 
David Caro

Red Hat S.L.
Continuous Integration Engineer - EMEA ENG Virtualization R&D

Tel.: +420 532 294 605
Email: dcaro at redhat.com
IRC: dcaro|dcaroest@{freenode|oftc|redhat}
Web: www.redhat.com
RHT Global #: 82-62605
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20151216/83fa85d8/attachment.sig>


More information about the libvirt-users mailing list