Chinaunix首页 | 论坛 | 博客
  • 博客访问: 725499
  • 博文数量: 39
  • 博客积分: 10290
  • 博客等级: 上将
  • 技术积分: 1500
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-16 15:05
文章分类
文章存档

2011年(15)

2010年(2)

2009年(8)

2008年(14)

我的朋友

分类: LINUX

2008-11-26 20:49:41

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!

阅读(1569) | 评论(1) | 转发(0) |
0

上一篇:mldonkey备忘

下一篇:爱因斯坦说

给主人留下些什么吧!~~

mrguo2008-12-08 12:16:26

飘来,看过,谢了。。。