28 十月, 2008

MS VPC 2007 + Xen 3.1.4,启动失败: Unrecoverable processor error

Microsoft Virtual PC 2007,安装Redhat Enterprise Linux AS4 i386版,可以运行。不过,VPC不支持64位的Linux,即便你的CPU支持VT。

下载Xen 3.1.4的源码,编译成功。注意,需要Linux-2.6.18.8的kernel 源码包,还需要安装X11的开发包。为了成功生成doc,需要安装latex和transfig (fig2dev)包。

#make world
#make install
# depmod 2.6.18.8-xen
# mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18.8-xen.img 2.6.18.8-xen

修改/boot/grub/grub.conf,reboot.

才load进kernel和initrd module,VPC就报错了:Unrecoverable processor error,接着就强制reset了。

Fatal error,试了几种办法,譬如修改内核启动的arguments (vga=771noreplace-paravirt),不过都不起作用。

只能放弃了,又是白努力一场,还是回到VMWARE上慢慢想办法吧。

参考:"What Works and What Doesn't in Microsoft Virtual PC 2004",我估计,大部分对VPC 2007也适用。


27 十月, 2008

如何在VMWare Workstation的虚机内运行Xen HVM虚机

这个问题就是如何实现VM-In-VM。

今天在VMWare Workstation 6的Linux RHLAS4 x86_64 VM内安装Xen 3.1.3,并尝试用Xen来安装一个Windows XP的虚机,结果碰到如下问题:

“Xen Error: HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?”

意思是说,虚机的CPU(我的是Intel)不支持VT。

对于Physical processor,如果机器支持VT,可以通过BIOS来设置这个开关,那么VMWare Workstation 6呢?

可以手工修改虚机的.vmx文件,添加如下两行:

monitor_control.restrict_backdoor = "TRUE"
monitor_control.vt64 = "TRUE"

对于AMD的CPU,或者是32位的OS,可以参考以下文档:

More on Installing VMware ESX Server Inside a Workstation 6 VM

What does "supports virtualization" really suggest?

另外,/proc/cpuinfo中的cpu flags,表示支持VT的是vmx,而不是vme。因为早期的linux核心都还不支持vmx flag,所以,即便cpuinfo中没标明vmx flag,也不等于说CPU没有VT功能。核心是否支持vmx flag,可以查看/usr/include/asm.../cpufeatures.h是否包含X86_FEATURE_VMX。(以上内容仅针对Intel芯片有效)

资源:

VMX-file advanced parameters

Update:使用最新的VMWARE 6.5安装Redhat EL AS4 i386,可以手工配置processor execute mode,支持Intel VT-x或者AMD V-x。


28 七月, 2008

[build error:] relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

接下来的错误反馈一般是 xxxxxx.a: could not read symbols: Bad value

今天在64位Linux上编译MonetDB的时候碰到这个问题,这里有答案:

You will get these messages on x86_64 any place that libtool tries to use a static (.a) library in a .la, and as it says, it can't link. These "recompile with -fPIC" messages fall into three types -

  1. recompile the current package with -fPIC
  2. fix a broken symlink (I had a dangling symlink for ncurses in my scripts, because of a typo - on x86 libtool couldn't find the .so but took the .a and ran with it, on x86_64 it barfed)
  3. convert a Makefile to use .la instead of .a (very uncommon)

我采用的是第2种解决方法,就是将xxxxxx.a链接到正确的shared library (.so)上