From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Question: Redirect guest kernel's message via serial port to a file on dom0 Date: Mon, 24 Aug 2015 09:10:12 +0100 Message-ID: <55DAD164.7020302@citrix.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8070592380359236654==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Meng Xu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============8070592380359236654== Content-Type: multipart/alternative; boundary="------------060409060209080008030006" This is a multi-part message in MIME format. --------------060409060209080008030006 Content-Type: text/plain; charset=UTF-8 Content-Length: 1697 Content-Transfer-Encoding: quoted-printable On 24/08/2015 04:01, Meng Xu wrote: > Hi, > > I'm trying to use a PV guest VM on Xen to help debug Linux. > I was using VirtualBox to help debug Linux kernel by redirecting the > output of the serial port of the VM to a file in the host. I can do it > in VirtualBox. > > [Why do I want to achieve this=3F] > It is much faster to reboot a VM than rebooting the physical machine. > I don't need another machine to physically connect to the serial port > of the development machine. > I want to use Xen for as many things as possible. ;-) > > I tried to google a tutorial or manual about how to configure it, but > didn't find any. :-( > > In my understanding, I need to do the following things: > 1) I need to add a line (something like "serial=3D") in the guest's > configuration file to specify the serial port device to the VM; > 2) I need some configuration to redirect the output of the serial > device to a file in domU; > 3) After that, I can configure the kernel command line in the VM to > dump the kernel message via the serial port of the VM. (I know how to > do this step.) > > =E2=80=8BDid anyone have tried this before and have some configuration I can > refer to=3F or=E2=80=8B > =E2=80=8BCould anyone give me some references that describes how to configure > the above three steps=3F =E2=80=8B > > I really appreciate any help or suggestion or comment. Configure xenconsoled to log guest consoles to file "--log=3Dguest" at which point anything sent to hvc0 will be logged to files in /var/log/xen/guest/console (configurable with "--log-dir=3D") There is usually XENCONSOLED_ARGS=3D in a configuration file somewhere in /etc. ~Andrew --------------060409060209080008030006 Content-Type: text/html; charset=UTF-8 Content-Length: 4028 Content-Transfer-Encoding: quoted-printable
On 24/08/2015 04:01, Meng Xu wrote:
Hi,

I'm trying to use a PV guest VM on Xen to help debug Linux.=C2=A0
I was using VirtualBox to help debug Linux kernel by redirecting the output of the serial port of the VM to a file in the host. I can do it in VirtualBox.

[Why do I want to achieve this=3F]
It is much faster to reboot a VM than rebooting the physical machine.
I don't need another machine to physically connect to the serial port of the development machine.
I want to use Xen for as many things as possible. ;-)

I tried to google a tutorial or manual about how to configure it, but didn't find any. :-(

In my understanding, I need to do the following things:
1) I need to add a line (something like "serial=3D") in the guest's configuration file to specify the serial port device to the VM;=C2=A0
2) I need some configuration to redirect the output of the serial device to a file in domU;
3) After that, I can configure the kernel command line in the VM to dump the kernel message via the serial port of the VM. (I know how to do this step.)

=E2=80=8BDid anyone have tried this before and have some configuration I can refer to=3F or=E2=80=8B
=E2=80=8BCould anyone give me some references that describes how to configure the above three steps=3F =E2=80=8B

I really appreciate any help or suggestion or comment.

Configure xenconsoled to log guest consoles to file "--log=3Dguest" at which point anything sent to hvc0 will be logged to files in /var/log/xen/guest/console (configurable with "--log-dir=3D")

There is usually XENCONSOLED_ARGS=3D in a configuration file somewhere in /etc.

~Andrew
--------------060409060209080008030006-- --===============8070592380359236654== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8070592380359236654==--