`
isiqi
  • 浏览: 16030174 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

qemu虚拟机的安装体验

阅读更多

qemu虚拟机的安装体验

		
		
		
		
		听说qemu不错,我也下一个来做个测试。
1、现到官方网站http://fabrice.bellard.free.fr/qemu/下源码,目前的版本是0.8.1,不大,才1.5M
2、解压,做./configure时需要SDL库,立即安装libsdl-image1.2,libsdl-image1.2-dev两个东西,又该软件不支持gcc4.x版本,删除/usr/bin/gcc ,建立新连接
ln -s gcc-3.4 gcc (系统中另有3.4版,否则需要安装)
3、一切就绪./configure,make,sudo make install顺利。
4、使用
简单一点,现在官方网站下载一个linux核心,5.8M,解压得到一个可运行的linux.img
执行qemu linux.img,一切OK,通过cat /proc/cpuinfo ,cpu性能下降了不少。

5、为了更好的性能,下载QEMU Accelerator,区区185k,却可以提高好几倍的性能,太精华了!可惜是闭源。
老步骤,./configure ,make ,sudo make install
编译出一个kqemu.ko核心模块,如果需要加速就装进这个模块
sudo modprobe kqemu

再次运行qemu linux.img运行正常,同时出现提示:
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
error, but for better emulation accuracy either use a 2.6 host Linux kernel or
type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.
Could not open '/dev/kqemu' - QEMU acceleration layer not activated

可惜echo 1024 > /proc/sys/dev/rtc/max-user-freq执行也出现失败,可能是核心编译的参数没有设置高精度时间,无法做这个调整。

6、下一步,仿真win2000
建目录qemuWin2000,在目录下执行
sudo dd of=hd.img bs=1024 seek=8000000 count=0
得到一个8G虚拟盘hd.img

7、安装系统
qemu -hda hd.img -cdrom /media/USB-2/ISOS/WIN2000.SP4.iso -boot d

/media/USB-2/ISOS/WIN2000.SP4.iso是我的Win2000安装盘

我用的2000是一个网络上下载的系统恢复盘,安装过程不正常,最后运行蓝屏,没有完成win2000的测试


后安装gentoo,成功,ubuntu 失败,看来这个模拟系统还是有些问题,还是vmware稳定阿。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics