чт, 29 нояб. 2018 г. в 18:23, Daniel P. Berrangé <berrange@redhat.com>:> > On Thu, Nov 29, 2018 at 06:19:43PM +0300, Vasiliy Tolstov wrote: > > Hi! I want to have ability to connect to guest console via libvirt api > > (and expose this data to xtermjs via websocket) with getty tty. And > > also i want to have log of tty1 (do log grub, kernel booting and > > errors). > > What i need to do in libvirt xml for such case? > > XML is described here > > https://libvirt.org/formatdomain.html#elementsConsole > > In particular regardless of what backend type you use for the > seral port, you can add logging using > > <log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/> > > >Thanks! Does it possible to read this log via libvirt api? -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru
Daniel P. Berrangé
2018-Nov-30 09:43 UTC
Re: [libvirt-users] console type tcp with logging
On Thu, Nov 29, 2018 at 08:57:54PM +0300, Vasiliy Tolstov wrote:> чт, 29 нояб. 2018 г. в 18:23, Daniel P. Berrangé <berrange@redhat.com>: > > > > On Thu, Nov 29, 2018 at 06:19:43PM +0300, Vasiliy Tolstov wrote: > > > Hi! I want to have ability to connect to guest console via libvirt api > > > (and expose this data to xtermjs via websocket) with getty tty. And > > > also i want to have log of tty1 (do log grub, kernel booting and > > > errors). > > > What i need to do in libvirt xml for such case? > > > > XML is described here > > > > https://libvirt.org/formatdomain.html#elementsConsole > > > > In particular regardless of what backend type you use for the > > seral port, you can add logging using > > > > <log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/> > > > > > > > > Thanks! Does it possible to read this log via libvirt api?No, not at this time. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
пт, 30 нояб. 2018 г. в 12:43, Daniel P. Berrangé <berrange@redhat.com>:> > On Thu, Nov 29, 2018 at 08:57:54PM +0300, Vasiliy Tolstov wrote: > > чт, 29 нояб. 2018 г. в 18:23, Daniel P. Berrangé <berrange@redhat.com>: > > > > > > On Thu, Nov 29, 2018 at 06:19:43PM +0300, Vasiliy Tolstov wrote: > > > > Hi! I want to have ability to connect to guest console via libvirt api > > > > (and expose this data to xtermjs via websocket) with getty tty. And > > > > also i want to have log of tty1 (do log grub, kernel booting and > > > > errors). > > > > What i need to do in libvirt xml for such case? > > > > > > XML is described here > > > > > > https://libvirt.org/formatdomain.html#elementsConsole > > > > > > In particular regardless of what backend type you use for the > > > seral port, you can add logging using > > > > > > <log file="/var/log/libvirt/qemu/guestname-serial0.log" append="off"/> > > > > > > > > > > > > > Thanks! Does it possible to read this log via libvirt api? > > No, not at this time. >Thanks! Do you have some plans to add this ability or patches welcome? =) -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru