For RAC, Vmware or Virtualbox? I choose VBox!

VMware  Server版已经2年没有更新,这导致在多个Linux的发行版本上安装VM Server存在种种的阻力。譬如说我现在正在使用的Fedora 15就很难使用Vmware,因此我想到了使用原SUN公司的VirtualBox来替代Vmware。

在网上搜了一圈发现Vbox虚拟RAC环境的Post还不少,花了1天时间实践了一下用VBox部署4节点的11gr2 RAC系统,在这里列出个人对VMware和VirtualBox间特性区别的看法

1.VMware Server可以采用浏览器+插件的方式访问,算的上是一种瘦客户端的应用。就访问的便利而言,Vmware有着明显的优势。VirtualBox默认以前台方式运行,虽然也可以从命令行中以headless方式来后台启动,但就访问来说还是太复杂了

2.Vmware的管理可以完全在管理页面中完成,不需要用户额外去记一些命令,管理上更方便。但是管理页面本身需要Tomcat驱动,如果Tomcat或者管理页面出现一些问题的话那么就令人束手无策了。VirtualBox的图形化界面管理还算流畅,但不是所有操作都支持,很大程度上用户需要记部分VBoxManage命令来达到目的,虽然有一定的学习成本,但加强了用户对VBox的了解,VBoxManage命令简单可靠,是我迁移到VBox的一大理由

3.性能方面VirtualBox有较大的优势,主要体现在内存消耗更少,而且Vbox使用的进程也更少(主要是VBoxXPCOMIPCD,VBoxSVC,VBoxHeadless这三个),关于这一点的讨论见OTN上的Oracle RAC on VMWare vs. Virtualbox这个Thread

4.文档数量上,Vmware占有一定优势,这很大程度上得益于vmware公司作为虚拟化方案巨头的大力宣传。而VirtualBox仅是SUN公司x86虚拟化实现中的一环,当然这不影响Vbox作为我们测试RAC或其他MAA方案的最佳平台。Vbox上的11g r2 RAC最佳实践,可见<Oracle Database 11g Release 2 RAC On Linux Using VirtualBox>

关于VirtualBox的一些信息可以见John Heaton的<Oracle Enterprise Linux and Oracle VM (SUN)Virtual Box>:

在Fedora 15上使用Vmware Server 2.0.2

Vmware Server最新版本2.0.2-203138是在2009年发布的,其使用一种较老的Kernel识别方法,这会导致我们在2.6.3x/2.6.40内核上安装Vmware Server时出现如下错误:

The path "/usr/src/linux/include" is not an existing directory.

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.40-4.fc15.x86_64).  Even if the module were to
compile successfully, it would not load into the running kernel.

摸索了1个多小时终于找到了解决的方法,具体步骤如下:

1.安装必要的rpm包

yum -y install gcc make kernel-headers kernel-devel

找出正确的kernel headers目录,使用如下命令:
[root@vbase include]# echo /usr/src/kernels/`uname -r`/include
/usr/src/kernels/2.6.40-4.fc15.x86_64/include

2.修改version.h头文件,该文件位于以下目录

[root@vbase include]# cat /usr/src/kernels/`uname -r`/include/linux/version.h
#define LINUX_VERSION_CODE 132648
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

在该头文件中加入 uname -r的输出,如:
[root@vbase include]# uname -r
2.6.40-4.fc15.x86_64

#define UTS_RELEASE “2.6.40-4.fc15.x86_64”

3.下载modules.tar文件,解压该tar包,将其中的文件复制到/usr/lib/vmware/modules/source/并覆盖:

tar -xvf modules.tar

cp * /usr/lib/vmware/modules/source/
cp: overwrite `/usr/lib/vmware/modules/source/vmblock.tar’? y
cp: overwrite `/usr/lib/vmware/modules/source/vmci.tar’? y
cp: overwrite `/usr/lib/vmware/modules/source/vmmon.tar’? y
cp: overwrite `/usr/lib/vmware/modules/source/vmnet.tar’? y
cp: overwrite `/usr/lib/vmware/modules/source/vsock.tar’? y

 

4.安装Vmware软件,并执行vmware-config.pl

[root@vbase include]# vmware-config.pl
Making sure services for VMware Server are stopped.

Stopping vmware (via systemctl):                           [  OK  ]

None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel.  Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes] yes

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.40-4.fc15.x86_64/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config2/vmmon-only'
make -C /lib/modules/2.6.40-4.fc15.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/2.6.40-4.fc15.x86_64'
CC [M]  /tmp/vmware-config2/vmmon-only/linux/driverLog.o
CC [M]  /tmp/vmware-config2/vmmon-only/linux/iommu.o
CC [M]  /tmp/vmware-config2/vmmon-only/linux/driver.o
CC [M]  /tmp/vmware-config2/vmmon-only/linux/hostif.o
/tmp/vmware-config2/vmmon-only/linux/hostif.c: In function ‘HostIFReadUptimeWork’:
/tmp/vmware-config2/vmmon-only/linux/hostif.c:2048:10: warning: ‘newUpBase’
may be used uninitialized in this function [-Wuninitialized]
CC [M]  /tmp/vmware-config2/vmmon-only/common/memtrack.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/hashFunc.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/vmx86.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/cpuid.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/task.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/comport.o
CC [M]  /tmp/vmware-config2/vmmon-only/common/phystrack.o
CC [M]  /tmp/vmware-config2/vmmon-only/vmcore/moduleloop.o
LD [M]  /tmp/vmware-config2/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST 1 modules
CC      /tmp/vmware-config2/vmmon-only/vmmon.mod.o
LD [M]  /tmp/vmware-config2/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.40-4.fc15.x86_64'

Building a RAC Test Environment on VMWare For Free

•VMWare Orientation
•Importance of prerequisite checking
•Configuring node #1
•Cloning (VM) node #1
•Installing Clusterware
•Installing ASM and Database
•Creating Database
•Common Challenges and Issues

VMWare Orientation
•Desktop Products
–VMWare Workstation: “Full” product, $
–VMWare Player: Free, no creation, just use
•Server Products
–VMWare Infrastructure (ESX Server): $$$,
robust, clustering capable, OS replacement
–VMWare VirtualCenter: $$, management
tool for whole environment, Windows
–VMWare Server: free, limited, on top of OS

沪ICP备14014813号-2

沪公网安备 31010802001379号