diff mbox

[2/2] kvm tools: Print out important command line options at startup

Message ID 1305136906-14496-2-git-send-email-penberg@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Pekka Enberg May 11, 2011, 6:01 p.m. UTC
It's important to know what the guest configuration looks like when debugging
issues so print out important command line options at startup:

  $ ./kvm run -k ../../arch/x86/boot/bzImage -m 512
    # kvm run -k ../../arch/x86/boot/bzImage -m 512 -c 1

Suggested-by: Ingo Molnar <mingo@elte.hu>
Cc: Asias He <asias.hejun@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 tools/kvm/kvm-run.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c
index 9b5176f..5b56779 100644
--- a/tools/kvm/kvm-run.c
+++ b/tools/kvm/kvm-run.c
@@ -476,6 +476,8 @@  int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 	}
 	free(hi);
 
+	printf("  # kvm run -k %s -m %Lu -c %d\n", kernel_filename, ram_size / 1023 / 1024, nrcpus);
+
 	if (!kvm__load_kernel(kvm, kernel_filename, initrd_filename,
 				real_cmdline))
 		die("unable to load kernel %s", kernel_filename);