kvm tools: display appropriate error message when default kernel image could not be found

This change was recommended by Ingo Molnar in his reply to mail 'Use the root
partition of the host to boot the guest machine'. The patch informs user to
explicitly run the 'kvm run --help' command, in case the kvm tool could not find
a default kernel image to boot.

prasad@prasad-kvm:~/KVM/linux-kvm/tools/kvm$ ./kvm run
Fatal: could not find default kernel image in:
	./bzImage
	../../arch/x86/boot/bzImage
	/boot/vmlinuz-2.6.35-25-generic
	/boot/bzImage-2.6.35-25-generic

Please see 'kvm run --help' for more options.

Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Prasad Joshi
2015-06-01 16:39:42 +01:00
committed by Will Deacon
parent afa0f6c1c6
commit a33389d8f0
+1 -1
View File
@@ -176,7 +176,7 @@ static void kernel_usage_with_options(void)
fprintf(stderr, "\t%s\n", kernel);
k++;
}
usage_with_options(run_usage, options);
fprintf(stderr, "\nPlease see 'kvm run --help' for more options.\n\n");
}
static const char *find_kernel(void)