KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

boot kernel from host os

1 reply [Last post]
rrlangly
Offline
Joined: May 22 2010
Points: 3

I'm trying to do kernel module development and am looking for how to load the exact same kernel that my host OS is running.

kvm -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no -kernel /boot/kernel-2.6.32-gentoo-r7 -hda /dev/sda -boot c -m 512

If I load the above command, the guest OS loads the correct kernel, but also mounts everything on my hd as rw, which isn't what I want. I want everything on my hd to be protected.

If I load the following command, it works, but it's a very bloated livecd kernel, and not the version I'm trying to develop to.

kvm -net nic,macaddr=52:54:00:12:34:56 -net tap,ifname=qtap0,script=no,downscript=no -hda ./gentoo-i386.img -cdrom ./livecd-amd64-installer-2008.0.iso -boot d -m 512

Can anyone help out w/ how I should run the kernel off my current host OS, yet protect the rest of my system?

phone number lookup (not verified)
not sure if i agree with this

not sure if i agree with this

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.