console of the hypervisor
Hi Folks,
I am new to Xen so please excuse any silly questions
Can someone please tell me
1) Can I switch to the console of the hypsevisor on the same machine, or do I have to use another machine with serial cable to go to the hypervisor console? Can I see the console log of the hypervisor in domain 0?
2) Can I use the same xenolinux kernel that we run in domain0 for other domains?
3) How to debug hypervisor? I am not able to find the pdb.txt which is supposed to answer this question.
Thanks in advance for your help.
Sanjay
Signature · 9 lines
----------------------- http://www.cc.gatech.edu/~ksanjay ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl
Quoted 7 lines
Hi Folks,
I am new to Xen so please excuse any silly questionsCan someone please tell me
1) Can I switch to the console of the hypsevisor on the same machine, or do I have to use another machine with serial cable to go to the hypervisor console? Can I see the console log of the hypervisor in domain 0?
The hypervisor doesn't have a fully-fledged console -- just a debug interface where certain key presses obtain useful tracing and stats. The only way to get this info, together with any other Xen output, after booting is via a serial interface.
Quoted 2 lines
2) Can I use the same xenolinux kernel that we run in domain0 for other domains?
Yes. The privileged drivers automatically disable themselves when run in other domains.
Quoted 2 lines
3) How to debug hypervisor? I am not able to find the pdb.txt which is supposed to answer this question.
I don't think any core Xenm developer uses a debugger -- I have always found crash dumps and explicitly-added tracing to be sufficient. There are apparently a bunch of PDB improvements/fixes to go in after teh 2.0 release announcement, coming soon.
-- Keir
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
user-space GDB stub
I've added a ptrace interface for domains to libxc and modified the ptrace client portion of gdbserver to use this "xc_ptrace". This allows one to debug a VM without impacting anything else running on the machine at the time. It makes debugging an OS look very much like debugging a user-space program.
I'm wondering if there are others who would benefit from this?
-Kip
I start my domain:
kmacy@shemp sh ~/xentmp/xenargs.shemp
Using config file "/u/kmacy/xentmp/freebsd.shemp". Started domain xen-vm2.lab.netapp.com, console on port 9604 ************ REMOTE CONSOLE: CTRL-] TO QUIT ********
I attach to it:
kmacy@shemp r ./gdbserver shemp:2345 --attach 4
Attached; pid = 4
Listening on port 2345
I start gdb with the symbols:
kmacy@siml3 ./gdb /t/niners/users/xen/bsd/sys/i386-xeno/compile/XENCONF/kernel.debug GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
warning: A handler for the OS ABI "FreeBSD ELF" is not built into this configuration
of GDB. Attempting to continue with the default i386 settings.
(gdb) target remote shemp:2345
Remote debugging using shemp:2345
init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1489
1489 __asm__("int $0x3;");
warning: no shared library support for this OS / ABI (gdb) bt
#0 init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1489 During symbol reading, Incomplete CFI data; unspecified registers at 0xc01b249c.
#1 0xc0027dbc in btext () at {standard input}:101
(gdb) p $eip
$1 = (void *) 0xc01b258b
(gdb) bt
#0 init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1489 #1 0xc0027dbc in btext () at {standard input}:101
(gdb) f 0
#0 init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1489
1489 __asm__("int $0x3;");
Current language: auto; currently c
(gdb) list
1484 kern_envp =
xen_setbootenv((caddr_t)start_info->cmd_line);
1485
1486 boothowto |= xen_boothowto(kern_envp);
1487
1488 if (boothowto & RB_GDB_PAUSE)
1489 __asm__("int $0x3;");
1490
1491 /* Init basic tunables, hz etc */ 1492 init_param1(); 1493 /*
(gdb) p $eip
$2 = (void *) 0xc01b258b
(gdb) x/i $20xc01b258b <init386+251>: int3
(gdb) set *(char *)$2=0x90
(gdb) x/i $20xc01b258b <init386+251>: nop
(gdb) s
Program received signal SIGSTOP, Stopped (signal). init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1492
1492 init_param1();
(gdb) s
Program received signal SIGSTOP, Stopped (signal). init_param1 () at ../../../kern/subr_param.c:101
101 {
(gdb) bt
#0 init_param1 () at ../../../kern/subr_param.c:101
#1 0xc01b2591 in init386 () at ../../../i386-xeno/i386-xeno/machdep.c:1492
#2 0xc0027dbc in btext () at {standard input}:101
(gdb) b mi_startup
Breakpoint 1 at 0xc0053b38: file ../../../kern/init_main.c, line 175. (gdb) c
Continuing.
Program received signal SIGSTOP, Stopped (signal). mi_startup () at ../../../kern/init_main.c:175
175 if (sysinit == NULL) {
(gdb) b start_init
Breakpoint 2 at 0xc0054199: file ../../../kern/init_main.c, line 533. (gdb) c
Continuing.
Program received signal SIGSTOP, Stopped (signal). start_init (dummy=0x0) at ../../../kern/init_main.c:533
533 int init_does_devfs = 0;
(gdb)
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
" > 3) How to debug hypervisor? I am not able to find the pdb.txt which is " > supposed to answer this question.
I used gdb to debug the live hyperviser. I posted a howto on
the list on July 23. I ran it under VMWare, but the instructions
should work just as well with a real serial line.
If the pdb bits of the system are still current, that howto could be appended to the 2.0 doc collection..
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl