On Thu, Jul 03, 2008 at 01:30:19PM -0700, Margot H. Miller wrote:

> DEBUG enabled  |                    <----- HANGS HERE 
> 
> To troubleshoot, is there a mechanism to pass boot flags to the
> Solaris kernel that is started in this new domain (for domain creation, not
> after it is created).  We are trying to debug this kernel hang, so would
> like to pass in '-k' to boot into kmdb.

Run this script:

#!/bin/bash

#usage: domu-boot-flags domname flags

test -n "$1" || exit 1
test -n "$2" || exit 2

virsh dumpxml $1 | grep -v 'bootloader_args' >/tmp/$1.xml

printf
'/<bootloader>\na\n<bootloader_args>--args="%s"</bootloader_args>\n.\nw\nq\n' 
"$2" | ed -s /tmp/$1.xml >/dev/null

virsh destroy $1 >/dev/null 2>&1
virsh undefine $1 >/dev/null 2>&1
virsh define /tmp/$1.xml


> If this is not possible, any other ideas for debugging a kernel hang in a 
> domain? 
> We have tried forcing a crash dump but unable to examine it with mdb.

In the dom0, run:

virsh dump domu-name /var/tmp/crash.dump
mdb /var/tmp/crash.dump

And you can debug as normal, presuming that you're not hanging *too*
early during boot.

regards
john
_______________________________________________
xen-discuss mailing list
[email protected]

Reply via email to