Thank you so much! That was very helpful. Have a nice day!
Lucas On Tue, Sep 27, 2022 at 4:01 PM Erik Skultety <eskul...@redhat.com> wrote: > On Wed, Sep 21, 2022 at 01:53:20PM +0800, Lucas Liu wrote: > > Gratings: > > > > Recently, I got an error while installing a guest, the error message is > > this,: > > [image: image.png] > > > > Is there a method to get the full log? I have tried to use virt-install > > --console, or attach <log > > file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/> to get > > the full log, but they didn't work. > > They didn't work because the serial console isn't enabled on the kernel > cmdline > by default, so you'll need to pass "--extra-args 'console=ttyS0,112500'" > when > installing a guest with virt-install. Note that once installed, you'll > need to > tweak /etc/default/grub to enable serial console permanently for that VM, > otherwise you'll have a character device but no serial output would be > relayed > there. > > I also recommend to use "--autoconsole text" instead of "--console xyz" for > your purpose as "--console" is a generic character device which you need > to (at > least somehow) configure, while "--autoconsole" is syntactic sugar that > does > the magic for you. > > PS: in case you'd like to install guests from pre-built templates with > virt-builder from the guestfs-tools package then these have been built so > that > /etc/default/grub was already tweaked to enable serial output, hence > "--extra-args" could be completely omitted in that case and you'd only use > "--autoconsole text" --> you can give it a try to observe the difference :) > > Regards, > Erik > >