This document explains how to debug a guests' kernel using KGDB.
1. Run the guest:
- 'kvm run -k [vmlinuz] -p "kgdboc=ttyS1 kgdbwait" --tty 1'
+ 'lkvm run -k [vmlinuz] -p "kgdboc=ttyS1 kgdbwait" --tty 1'
And see which PTY got assigned to ttyS1 (you'll see:
' Info: Assigned terminal 1 to pty /dev/pts/X').
-kvm-balloon(1)
+lkvm-balloon(1)
================
NAME
----
-kvm-balloon - Inflate or deflate the virtio balloon
+lkvm-balloon - Inflate or deflate the virtio balloon
SYNOPSIS
--------
[verse]
-'kvm balloon [command] [size] [instance]'
+'lkvm balloon [command] [size] [instance]'
DESCRIPTION
-----------
The command inflates or deflates the virtio balloon located in the
specified instance.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
Command can be either 'inflate' or 'deflate'. Inflate increases the
size of the balloon, thus decreasing the amount of virtual RAM available
-kvm-debug(1)
+lkvm-debug(1)
================
NAME
----
-kvm-debug - Print debug information from a running instance
+lkvm-debug - Print debug information from a running instance
SYNOPSIS
--------
[verse]
-'kvm debug [instance]'
+'lkvm debug [instance]'
DESCRIPTION
-----------
The command prints debug information from a running instance.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
-kvm-list(1)
+lkvm-list(1)
================
NAME
----
-kvm-list - Print a list of running instances on the host.
+lkvm-list - Print a list of running instances on the host.
SYNOPSIS
--------
[verse]
-'kvm list'
+'lkvm list'
DESCRIPTION
-----------
This command prints a list of running instances on the host which
-belong to the user who currently ran 'kvm list'.
+belong to the user who currently ran 'lkvm list'.
-kvm-pause(1)
+lkvm-pause(1)
================
NAME
----
-kvm-pause - Pause the virtual machine
+lkvm-pause - Pause the virtual machine
SYNOPSIS
--------
[verse]
-'kvm pause [instance]'
+'lkvm pause [instance]'
DESCRIPTION
-----------
The command pauses a virtual machine.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
-kvm-resume(1)
+lkvm-resume(1)
================
NAME
----
-kvm-resume - Resume the virtual machine
+lkvm-resume - Resume the virtual machine
SYNOPSIS
--------
[verse]
-'kvm resume [instance]'
+'lkvm resume [instance]'
DESCRIPTION
-----------
The command resumes a virtual machine.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
-kvm-run(1)
+lkvm-run(1)
================
NAME
----
-kvm-run - Start the virtual machine
+lkvm-run - Start the virtual machine
SYNOPSIS
--------
[verse]
-'kvm run' [-k <kernel image> | --kernel <kernel image>]
+'lkvm run' [-k <kernel image> | --kernel <kernel image>]
DESCRIPTION
-----------
-kvm-sandbox(1)
+lkvm-sandbox(1)
================
NAME
----
-kvm-sandbox - Run a command in a sandboxed guest
+lkvm-sandbox - Run a command in a sandboxed guest
SYNOPSIS
--------
[verse]
-'kvm sandbox ['kvm run' arguments] -- [sandboxed command]'
+'lkvm sandbox ['lkvm run' arguments] -- [sandboxed command]'
DESCRIPTION
-----------
-kvm-setup(1)
+lkvm-setup(1)
================
NAME
----
-kvm-setup - Setup a new virtual machine
+lkvm-setup - Setup a new virtual machine
SYNOPSIS
--------
[verse]
-'kvm setup <name>'
+'lkvm setup <name>'
DESCRIPTION
-----------
-kvm-stat(1)
+lkvm-stat(1)
================
NAME
----
-kvm-stat - Print statistics about a running instance
+lkvm-stat - Print statistics about a running instance
SYNOPSIS
--------
[verse]
-'kvm [command] [-n instance] [-p instance pid] [--all]'
+'lkvm [command] [-n instance] [-p instance pid] [--all]'
DESCRIPTION
-----------
The command prints statistics about a running instance.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
Commands:
--memory, -m Display memory statistics
-kvm-stop(1)
+lkvm-stop(1)
================
NAME
----
-kvm-stop - Stop a running instance
+lkvm-stop - Stop a running instance
SYNOPSIS
--------
[verse]
-'kvm stop [instance]'
+'lkvm stop [instance]'
DESCRIPTION
-----------
The command stops a running instance.
-For a list of running instances see 'kvm list'.
+For a list of running instances see 'lkvm list'.
-kvm-version(1)
+lkvm-version(1)
================
NAME
----
-kvm-version - Print the version of the kernel tree kvm tools
+lkvm-version - Print the version of the kernel tree kvm tools
was built on.
SYNOPSIS
--------
[verse]
-'kvm version'
+'lkvm version'
DESCRIPTION
-----------
# List of known perf commands.
# command name category [deprecated] [common]
#
-kvm-run mainporcelain common
-kvm-setup mainporcelain common
-kvm-pause common
-kvm-resume common
-kvm-version common
-kvm-list common
-kvm-debug common
-kvm-balloon common
-kvm-stop common
-kvm-stat common
-kvm-sandbox common
+lkvm-run mainporcelain common
+lkvm-setup mainporcelain common
+lkvm-pause common
+lkvm-resume common
+lkvm-version common
+lkvm-list common
+lkvm-debug common
+lkvm-balloon common
+lkvm-stop common
+lkvm-stat common
+lkvm-sandbox common
static struct cmdname_help common_cmds[] = {"
-sed -n 's/^kvm-\([^ \t]*\).*common/\1/p' command-list.txt |
+sed -n 's/^lkvm-\([^ \t]*\).*common/\1/p' command-list.txt |
while read cmd
do
# TODO following sed command should be fixed
- sed -n '/^NAME/,/^kvm-'"$cmd"'/ {
+ sed -n '/^NAME/,/^lkvm-'"$cmd"'/ {
/NAME/d
/--/d
s/.*kvm-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/