Qemu is extremly slow and kqemu always hang my system will natually deriect me to KVM. The native thoughts would be the KVM is supported by main line kernel so the 'hang on' problem would most probably not happen. Then I would like to add some notes and links here about how to deploy KVM in system.
A quick reference link would be here:
Obviously, this is an ubuntu document. What I am emphasized is the section '#How to check if your CPU supports hardware virtualisation'. Quick reference here would be:
Use following command to check if the CPU has virtualization support or not:
Command one:
egrep '(vmx|svm)' --color=always /proc/cpuinfo
Command two:
grep ' lm ' /proc/cpuinfo
|
Of course you can reference kernel source code at arch/x86/kvm to check how to recoganize the CPU's capability via CPUID instruction as well as some CPU documents would be involved. The two function are has_svm and cpu_has_kvm_support respect to different virtualization technology coming from AMD or Intel.
For my case, my centrino II CPU is lake of capacity on virtualization technology while my Althon64x2 CPU could be used to try KVM.
Then the important thing would be make sure the BIOS would support virtualization. This step would be mostly likely require to enter BIOS setting to confirm relevant options have correct settings.
KVM's formal site has this URL:
And download kvm package from above site. At the time point of this nots been writen, the latest kvm release if kvm-79. Download the package then we would start install kvm package to system. Assuming the kvm-79 had been downloaded to some dir. Then following command should be used to intall kvm:
$cd to_some_dir $tar xvf kvm-79.tar.bz2 $cd kvm-79 $./configure --prefix=/usr/local/kvm-79 $make -j5 $su -c 'make install'
|
Okay, here we get /usr/local/kvm-79/bin directory and some kernel modules in /lib/modules/`uname -r`/extra dir. Load kernel modules first:
#modpobe kvm- #chmod 666 /dev/kvm
|
Just direct call the kvm command with following command would be fine.
$/usr/local/kvm-79/bin/qemu-system-x86_64 -cdrom xxx-livecd.iso -m 512 -boot d
|
It is no need to create virtual disk image while we just run live CD. There would be no warings or error messages appear if everything went well. If you get some 'stuck state' while the vm is just power on, you may need to carefully check if the kvm's kernel module had been loaded or the native KVM modules are loaded. The right kernel modules should be coming from kvm package.
Finally, if some 'MP BIOS xxx ... * errors *' occurs, the 'noapic' kernel parameter should be passed to kernel by edit items in grub menu list. Then some kernel command line might be looks like this:
ro root=LABEL=/ rhgb quiet noapic
|
Enjoy!
阅读(1594) | 评论(1) | 转发(0) |