Andrew Huang 引用自(http://bluedrum.cublog.cn) 转载注明出处及联络方式
一般虚拟机的常见场景是在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模块
配置网络,这里强烈建议选择一个桥接,一个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)...
接下来编译的是VMNet.ko模块
- AUsing 2.6.x kernel build system.
-
make: Entering directory `/tmp/vmware-config0/vmnet-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/vmnet-only/driver.o
-
CC [M] /tmp/vmware-config0/vmnet-only/hub.o
-
CC [M] /tmp/vmware-config0/vmnet-only/userif.o
-
CC [M] /tmp/vmware-config0/vmnet-only/netif.o
-
CC [M] /tmp/vmware-config0/vmnet-only/bridge.o
-
CC [M] /tmp/vmware-config0/vmnet-only/procfs.o
-
CC [M] /tmp/vmware-config0/vmnet-only/smac_compat.o
-
SHIPPED /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
-
LD [M] /tmp/vmware-config0/vmnet-only/vmnet.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
-
WARNING: could not find /tmp/vmware-config0/vmnet-only/.smac_linux.x386.o.cmd for /tmp/vmware-config0/vmnet-only/smac_linux.x386.o
-
CC /tmp/vmware-config0/vmnet-only/vmnet.mod.o
-
LD [M] /tmp/vmware-config0/vmnet-only/vmnet.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 vmnet.ko ./../vmnet.o
-
make: warning: Clock skew detected. Your build may be incomplete.
-
make: Leaving directory `/tmp/vmware-config0/vmnet-only'
-
The module loads perfectly in the running kernel.
最后的过程
- Hit enter to continue.
-
-
Generating SSL Server Certificate
-
-
In which directory do you want to keep your virtual machine files?
-
[/var/lib/vmware/Virtual Machines]
-
-
In which directory do you want to keep your virtual machine files?
-
[/var/lib/vmware/Virtual Machines]
-
-
The path "/var/lib/vmware/Virtual Machines" does not exist currently. This
-
program is going to create it, including needed parent directories. Is this
-
what you want? [yes]
-
-
Please enter your 20-character serial number.
-
-
Type XXXXX-XXXXX-XXXXX-XXXXX or 'Enter' to cancel: 90N0W-YF48G-2007J-48KAR
-
-
Starting VMware services:
-
Virtual machine monitor [ OK ]
-
Virtual ethernet [ OK ]
-
Bridged networking on /dev/vmnet0 [ OK ]
-
Host-only networking on /dev/vmnet1 (background) [ OK ]
-
-
The configuration of VMware Server 1.0.10 build-203137 for Linux for this
-
running kernel completed successfully.
二.配置安装虚拟机
完成配置后在图形界面,菜单里会多了一项VMWare Server Console启动,运行开始虚拟机,首先要创建一个虚拟机,
选择创建一个虚拟机
这里因为是安装WINDOWS.选择对应类型
第一个网卡选择桥接模式
在创建好后,马上加入一个HostOnly 网卡
这里选择一个GHost版安装,接下就是WINDOWS安装了.
安装GHOST版要注意,要先运行7将C盘格式化,再执行功能(1),否则在安装计会提示"无法打开GHOST A:\GHOSTERR.TXT 434"
三.关于缺省的bridge网卡的修改
在虚拟机运行后,用ifconfig 查看会看到
vmnet0 ,vmnet1 这个网络节点.这就几个虚拟网卡描述
缺省网桥是绑定的第一个以太网卡了,但是很多时候需要将其重新切换到无线网卡,或者其它网卡,比如USB网卡的网卡. 但是很奇怪,LINUX版的VMWare没有提供Windows版中的虚拟网络切换.
经过检索实验发现,可以通过修改配置文件.VMWare的配置文件是在
/etc/vmware/locations
在这个文件里有很多句
answer VNET_0_INTERFACE eth0
remove_answer VNET_0_INTERFACE
answer VNET_0_INTERFACE eth0
remove_file /dev/vmnet0
将eth0全部置换成你需要绑定的网卡名字,如wlan0,usb0等.(注意这个文章里有很多重复,要全部修改!)
修改完毕后,重启VMWare
/etc/init.d/vmware restart
或
service vmware restart
阅读(6376) | 评论(0) | 转发(0) |