On Thu, Oct 9, 2014 at 10:39 PM, Robert Mustacchi <[email protected]> wrote:

> On 10/08/2014 05:13 PM, Peter Teoh via smartos-discuss wrote:
> > I have FreeBSD9 installed as KVM VM inside smartos, and "vmadm console"
> > allowed me to attach the screen to the serial of the VM.   As FreeBSD
> does
> > support kgdb, the right way is to use gdb to attach to the serial
> interface
> > of the VM, but how do I do that?
> >
> > I have gdb installed inside a smartos VM (inside smartos :-)).   but not
> > sure how to access the serial of another VM?
>
> There's probably no great way to do this today. If you look under
> /zones/<uuid>/root/tmp (If I recall correctly) you should see the serial
> device itself as a unix domain socket. You'd need to get gdb to that. By
> default, you can't see another zone's information from the non-global
> zone. This may be a case where putting together a simple transparent
> proxy might help, eg. if gdb in a zone can connect to a socket, then
> have that socket write to the UDS that represents the serial port.
>
> Hopefully my memory's right on these things.
>
> Robert
>


Thanks for the reply Robert.   base on the serial unix domain socket you
mentioned, i guess we can use "socat" (running in the global zone) to
forward it to gdb (perhaps in another VM),

https://gist.github.com/kuenishi/3825178

http://www.cyberciti.biz/faq/linux-unix-tcp-port-forwarding/

http://mmdolze.users.sourceforge.net/serial-port-monitoring.html

Not sure, some exploration needed, thanks Robert.

-- 
Regards,
Peter Teoh



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to