views:

848

answers:

2

Is there a way I can log the output of xm console in to some file?

Can I set something in the domain configuration file which automatically does this for me when I issue xm create?

I tried:

xm console | tee domU-console.log

... , but that does not fit in my case. I want to log the output asynchronously in background.

+1  A: 

If that works then you ought to be able to :

nohup xm console | tee domU-console.log &

I don't know if xm console uses stderr at all but if you want to be sure to snag tht output, too, do this:

nohup xm console 2>&1 tee domU-console.log &

Drop the tee if you intend on logging out.

Otto
+2  A: 

Your can try xenconsoled like

xenconsoled --log=guest --log-dir=/var/log/xen/guest/

And Redhat also save guest console output to /var/log/xen/console, if you set /etc/sysconfig/xend with XENCONSOLED_LOG_GUESTS=yes.

ZelluX