[virt-tools-list] [virt-install] Support for capturing guest serial console to a log file?

Kashyap Chamarthy kchamart at redhat.com
Fri Jul 15 14:58:25 UTC 2016


Currently, one could do a `virsh edit vm1`, to redirect guest serial
console output to a log file:

    <serial type='pty'>
      <log file='/var/log/libvirt/qemu/vm1-serial.log' append='off'/>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <log file='/var/log/libvirt/qemu/vm1-serial.log' append='off'/>
      <target type='serial' port='0'/>
    </console>

But that requires cumbersome manaul editing of the guest XML.  Is it
possible yet via virt-install?

Perhaps something like:

    virt-install \
    --serial pty, log,file=/tmp/f24-serial.log \
    --console pty, log,file=/tmp/f24-serial.log \
    [...]

The said feature was introduced in libvirt via these commits (by Dan
Berrange):

    - http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=06cb0cf -- qemu:
      add support for logging chardev output to a file
    - http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=00ce10c --
      conf: allow use of a logfile with chardev backends

-- 
/kashyap




More information about the virt-tools-list mailing list