* Prasad Joshi <prasadjoshi124@xxxxxxxxx> wrote: > The kvm run command should automatically pickup the image file to boot if one is > not explicitly specified. > > Changes since V1: > - Deallocate variable 'line' when fopen(/proc/mounts) fails > > Changes since V2: > - Instead of searching from /proc/mounts, use the device file /dev/root to > detect the device file for root file system > - Added a helper function get_host_image() to return the image to be used to > boot the virtual machine. > > Changes since V3: > - The link '/dev/root' might be missing on some of the systems. Switched back > to using /proc/mounts file. > - Some simple reformatting > > Signed-off-by: Prasad Joshi <prasadjoshi124@xxxxxxxxx> > --- > tools/kvm/kvm-run.c | 109 +++++++++++++++++++++++++++++++++++++++++++++----- > 1 files changed, 98 insertions(+), 11 deletions(-) Looks good here, with your patch applied 'kvm run' will now boot host userspace with zero configuration needed (!), when there's a bzImage built in that kernel tree: aldebaran:~/linux/linux/tools/kvm> ./kvm run [...] Welcome to Fedora release 16 (Rawhide)! Tested-by: Ingo Molnar <mingo@xxxxxxx> I noticed two quirks: 1) i mentioned this earlier, 'kvm run' will display a lengthy help screen or will just run the bzImage - depending on whether the file is present. Assymetric tool behavior like that is not very consistent - i'd suggest to print an intermediate help screen instead: ./kvm run No kernel image found - please see 'kvm run --help' for more options This informs the user of two things: a) that it tried to find a kernel image but failed to find it b) how to get the larger help text. 2) I get this: Warning: Unable to open /dev/net/tun This is a meaningless error message to the user. What is a '/dev/net/tun' and why does the user care? A much better error message would be something like: Info: Tried to activate transparent guest networking but was unable to open /dev/net/tun See "kvm run --help" about networking setup details. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html