一般虚拟机的常见场景是在WINDOWS下安装Linux虚拟机,但是有一些情况需要倒过来,比如在Linux下安装VMware虚拟机来反过来安装WINDOWS.
一.RHEL版本的VMWare的安装
可以从官网下载安装程序,VMWare Server是免费的,你可以从看到相关说明
我使用提 VMware-server-1.0.10-203137.i386.rpm这个安装包.
在命令行下执行如下命令安装
rpm -ivh VMware-server-1.0.10-203137.i386.rpm
Preparing... ########################################### [100%]
1:VMware-server ########################################### [100%]
成功后,直接执行vmware,第一次运行提醒需要运行vmware-config.pl 进行配置.
[root@hxy tools]# vmware vmware is installed, but it has not been (correctly) configured for this system. To (re-)configure it, invoke the following command: /usr/bin/vmware-config.pl.
配置过程,主要都采用缺省值
[root@hxy tools]# /usr/bin/vmware-config.pl Making sure services for VMware Server are stopped. Stopping VMware services: Virtual machine monitor [ OK ] You must read and accept the End User License Agreement to continue. Press enter to display it. Do you accept? (yes/no) yes Thank you. Configuring fallback GTK+ 2.4 libraries. In which directory do you want to install the mime type icons? [/usr/share/icons] What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications] In which directory do you want to install the application's icon? [/usr/share/pixmaps]
接下来编译了VMMon模块
Trying to find a suitable vmmon module for your running kernel. 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] Trying to find a suitable vmmon module for your running kernel. 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.18-194.el5/build/include] Extracting the sources of the vmmon module. tar: vmmon-only/linux/driver.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/linux/driver.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/linux/hostif.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/linux/vmmonInt.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/linux/vmhost.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/linux: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/memtrack.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/memtrack.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/task.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/task.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/vmx86.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/vmx86.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/hostif.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/hostKernel.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/phystrack.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/phystrack.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/cpuid.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/cpuid.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common/hash.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/common: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/vmcore/driver_vmcore.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/vmcore/moduleloop.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/vmcore: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/initblock.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/machine.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/modulecall.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_asm.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_asm_x86.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_asm_x86_64.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_time.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vcpuset.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86types.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86desc.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86apic.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86vt.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vmm_constants.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/contextinfo.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/uccostTable.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/x86cpuid.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/speaker_reg.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vmware.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_assert.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_atomic.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_basic_asm.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_basic_asm_x86.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_basic_asm_x86_64.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_basic_defs.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vm_basic_types.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vcpuid.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/iocontrols.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/pshare_ext.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/cpuid_info.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vmware_pack_init.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vmware_pack_begin.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/vmware_pack_end.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/driver-config.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_highmem.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_pgtable.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_spinlock.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_uaccess.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_mm.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_file.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_wait.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_page.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_version.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_timer.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_semaphore.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_sched.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_kernel.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/compat_completion.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/pgtbl.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/hash.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include/includeCheck.h: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/include: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf/geninclude.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf/nopage1.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf/skas1.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf/epoll.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf/setnice.c: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/autoconf: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/Makefile.normal: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/Makefile.kernel: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/README: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only/Makefile: time stamp 2009-10-21 05:06:44 is 183125436 s in the future tar: vmmon-only: time stamp 2009-10-21 05:06:44 is 183125436 s in the future Building the vmmon module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config0/vmmon-only' make: Warning: File `Makefile.kernel' has modification time 1.8e+08 s in the future make -C /lib/modules/2.6.18-194.el5/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/kernels/2.6.18-194.el5-i686' make[1]: Warning: File `/usr/src/kernels/2.6.18-194.el5-i686/arch/i386/Makefile.cpu' has modification time 2e+08 s in the future make[2]: Warning: File `scripts/Makefile.lib' has modification time 8.6e+07 s in the future CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o CC [M] /tmp/vmware-config0/vmmon-only/common/task.o CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o CC [M] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.o make[2]: warning: Clock skew detected. Your build may be incomplete. Building modules, stage 2. make[2]: Warning: File `scripts/Makefile.lib' has modification time 8.6e+07 s in the future MODPOST CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko make[2]: warning: Clock skew detected. Your build may be incomplete. make[1]: warning: Clock skew detected. Your build may be incomplete. make[1]: Leaving directory `/usr/src/kernels/2.6.18-194.el5-i686' cp -f vmmon.ko ./../vmmon.o make: warning: Clock skew detected. Your build may be incomplete. make: Leaving directory `/tmp/vmware-config0/vmmon-only' The module loads perfectly in the running kernel.
配置网络,这里强烈建议选择一个桥接,一个HOST Only,这是做嵌入式开发必须的配置双网卡配置.
Do you want networking for your virtual machines? (yes/no/help) [yes] Configuring a bridged network for vmnet0. Your computer has multiple ethernet network interfaces available: eth0, eth1. Which one do you want to bridge to vmnet0? [eth0] eth0 The following bridged networks have been defined: . vmnet0 is bridged to eth0 Do you wish to configure another bridged network? (yes/no) [no] Do you want to be able to use NAT networking in your virtual machines? (yes/no) [yes] no Do you want to be able to use host-only networking in your virtual machines? [no] yes Configuring a host-only network for vmnet1. Do you want this program to probe for an unused private subnet? (yes/no/help) [yes] Probing for an unused private subnet (this can take some time)...