免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2143 | 回复: 0
打印 上一主题 下一主题

宿主机与虚拟机中采用桥接网络方式的操作系统共享ADSL上网的方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-08 16:14 |只看该作者 |倒序浏览

                INPUT,TEXTAREA,SELECT,.FCK__Anchor,.FCK__PageBreak,.FCK__InputHidden { behavior: url(http://hi.baidu.com/fc/editor/css/behaviors/disablehandles.htc) ; }TABLE { behavior: url(http://hi.baidu.com/fc/editor/css/behaviors/showtableborders.htc) ; }
最近在玩虚拟机把一些心得写一下:
我用的是vmware6.0多特软件站汉化的 也不能说全汉化不过用起来蛮好的
至少不用你自己在网上找狂找序列号而且有些序列号只能用30天 大多数都是没用的
装了一个centos4.7来学习用的还有一个刚出来的Fedora-10-i386当小白鼠玩不过发现了几个问题
1.启动速度比较慢比centos慢多了
2.在把vmware-tools装好后重启,不知道为什么会启动不了,可能是虚拟机版本太低了(要是有高手看到了,知道什么原因的告诉我一下)我换了vmware6.5官方正式版
因为找不到序列号 所以放弃了其实6.0已经够了 所以小白鼠就这样挂了...失败!!
centos装了vmware-tools 一点不良反应都没有把装的过程说一下(部分转载)
VMware Tools安装(For Linux Guest
OS)
为什么要装 VMware Tools?

因为它可以改善 Virtual Machine 的运行性能,而且可以让
Host OS 和 Guest OS 互通有无,这样我们就不用伤脑筋,要架设什么服务器,来沟通两个
OS,现在就让我们开始吧!

VMware Tools所在位置:VMware 安装路径
\VMware\VMware Workstation\linux.iso

[root@rd01 ~]# mount /cdrom   
#
有时可能加载不了,这时就要先将系统关闭,再手动指定 ISO 映像,看下图
[root@rd01 ~]# cd /cdrom
[root@rd01
~]# ls -a
[root@rd01 ~]# cp VMwareTools-5.5.1-19175.tar.gz /tmp
[root@rd01
~]# cd /tmp
[root@rd01 ~]# tar zxpf
VMwareTools-5.5.1-19175.tar.gz
[root@rd01 ~]# cd
vmware-tools-distrib
[root@rd01 vmware-tools-distrib]#
./vmware-install.pl
Creating a new installer database using the tar3
format.

Installing the content of the package.

# 安装过程的画面,全部使用默认值,一直按 Enter
就对了

In which directory do you want to
install the binary files?
[/usr/bin]

What is the directory that contains
the init directories (rc0.d/ to rc6.d/)?

[color="#008080"][/etc/rc.d]
What is the directory that contains
the init scripts?
[/etc/rc.d/init.d]

In which directory do you want to
install the daemon files?
[/usr/sbin]

In which directory do you want to
install the library files?
[/usr/lib/vmware-tools]

Thepath "/usr/lib/vmware-tools" does
not exist currently. This programisgoingto create it, including needed parent
directories. Is thiswhatyou want?
[yes]

In which directory do you want to
install the documentation
files?
[/usr/share/doc/vmware-tools]

Thepath "/usr/share/doc/vmware-tools"
does not exist currently.Thisprogram isgoing to create it, including needed
parent directories.Isthis what you want?
[yes]

The installation of VMware Tools 5.5.1
build-19175 for Linux completed
successfully. You can decide to remove this
software from your system at any
time by invoking the following command:
"/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the
first time, you need to configure it by
invoking the following command:
"/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the
command for you now? [yes]

Stopping VMware Tools services in
the virtual machine:
Guest operating system daemon:             [ 确定
]
Trying to find a suitable vmhgfs module for your running
kernel.

The module bld-2.6.9-5.EL-i686-RHEL4
loads perfectly in the running kernel.

pcnet32        30153 0
Unloading
pcnet32 module

Trying to find a suitable vmxnet
module for your running kernel.

The module bld-2.6.9-5.EL-i686-RHEL4
loads perfectly in the running kernel.

Detected X.org version
6.8.

关闭控制台鼠标服务:                    [ 确定
]
启动控制台鼠标服务:                    [ [Page]确定 ]

Please choose one of the following
display sizes (1 - 13):

# 显示分辨率,这里是以 1024x768
为例

# VMware Tools 安装的时候,会自动修改 X server
的配置文件

[1] "640x480"
[2]
[color="#008080"][2] 3
X Window System Version
6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0,
Release 6.8.2
Build Operating System: Linux 2.6.9-34.EL i686 [ELF]
Current
Operating System: Linux rd01.domain 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006
i686
Build Date: 04 May 2006
Build Host:
x8664-build.centos.org

    Before reporting problems, check

[color="#008080"]http://wiki.X.Org
    to make sure that you have the latest
version.
Module Loader present
OSKernel: Linux version 2.6.9-34.EL
(

[email=buildcentos@build-i386][color="#008080"]buildcentos@build-i386[/email]
) (gccversion3.4.5 20051201 (Red Hat 3.4.5-2)) #1
Wed Mar 8 00:07:35 CST 2006P
Markers: (--) probed, (**) from config file,
(==) default setting,
    (++) from command line, (!!) notice, (II)
informational,
    (WW) warning, (EE) error, (NI) not implemented, (??)
unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.3131", Time: Mon
Jun 12 20:57:34 2006
(++) Using config file:
"/tmp/vmware-config0/XF86Config.3131"
(WW) VMWARE(0): Failed to set up
write-combining range (0xf0000000,0x1000000)

X is running fine with the new config
file.

Starting VMware Tools services in the
virtual machine:
Switching to guest configuration:            [ 确定 ]
Guest
filesystem driver:                [ 确定 ]
DMA setup:                       [
确定 ]
Guest operating system daemon:             [ 确定
]

The configuration of VMware Tools
5.5.1 build-19175 for Linux for this running
kernel completed
successfully.

You must restart your X session before
any mouse or graphics changes take
effect.

You can now run VMware Tools by
invoking the following command:
"/usr/bin/vmware-toolbox" during an XFree86
session.

To use the vmxnet driver, restart
networking using the following commands:
/etc/init.d/network stop
rmmod
pcnet32
rmmod vmxnet
depmod -a[Page]
modprobe
vmxnet
/etc/init.d/network start

[color="#008080"]Enjoy,
--the VMware
team

[root@rd01 vmware-tools-distrib]#
shutdown -r now

# 修改完成之后,重新启动计算机,让 VMware Tools
生效

昨天晚上下了个雨霖铃木风的告别办vista2.1装好后
也装了 vmware tools 在vista里装起来比较简单和应用程序一样一直下一步..................就好了
还有个就是上网问题 centos
不用上网只要能和宿主机连通就好了(具体方法就不说了网上有很多要是实在不行就留言吧)(我用的是host-only方式)
在vista上实现共享上网在网上看到很少这里我找了很久才找到的(部分转载)
我是用第一种
宿主机
操作系统:Windows xp
sp2,单网卡,ADSL动态IP,宽带1M。
虚拟机
Vmware workstation 5.5.2,虚拟的操作系统分别为:Windows
xp sp2、Windows 2000 server、

Windows 98.windows
vista各系统分别只有虚拟的1个单网卡,采用桥接网络。
主机与虚拟机中各虚拟的操作系统实现共享上网的方法:
方法一
1)宿主机XP中建立拨号连接。
2)在宿主机“网上邻居”的“属性”窗口中的“宽带”的拨号连接的图标上鼠标右击,选“属性”,在打

开的宽带连接的属性窗口中点“高级”选项,将“Internet连接共享”中的三个复选框选上,并将“家庭

网络连接(H)”中选上“本地连接”,点“确定”。
3)再在宿主机“网络连接”窗口中右击“本地连接”,选“属性”,打开“本地连接”对话框,双击“此

连接使用下列项目”下的“Internet协议(TCP/IP)”,在“Internet协议(TCP/IP)属性”对话框中将“

默认网关”填为“192.168.0.1”,“使用下面的DNS服务器地址(E)”的IP地址填为当地电信提供的地

址,“确定”。
4)虚拟机中的Windows xp、Windows
2000 server windows vista(注再在windows
vista下本地连接是协议版本4,,协议版本6自动获取)系统中。在“网络连接”窗口中右击“本地连接”

,选“属性”,打开“本地连接”对话框,双击“此连接使用下列项目”下的“Internet协议(TCP/IP)

”,在“Internet协议(TCP/IP)属性”对话框中,选择“使用下面的IP地址(S)”,指定IP地址为

“192.168.0.2-192.168.0.254”当中的任意一个,但每台计算机中不得有重复,将“默认网关”填为“

192.168.0.1”,“使用下面的DNS服务器地址(E)”的IP地址填为当地电信提供的IP地址(在cmd命令下输入ipcnofig
-all可以看到是宽带连接的DNS),“确定”。
5)虚拟机中的Windows 98系统中。右击“网上邻居”,选“属性”,打开“网络”属性对话框,双

击“配置”选项卡中的“TCP/IP->AMD PCNET Family
Ethernet Adapter”,在“TCP/IP属性”对话框中

,选“IP地址”选项卡,指定IP地址为“192.168.0.2-192.168.0.254”之间任意一个,但不要同任何一

台计算机相重复,子网掩码为“255.255.255.0”,选“网关”选项卡,将网关填为“192.168.0.1”,点“DNS配置”选项卡,点“启用

DNS(E)”,“主机(H)”填宿主机的计算机名,“DNS服务器搜索顺序”中添加当地的电信提供的IP地

址,“确定”,重新启动计算机。
6)在宿主机中打开通过建立的PPPOE拨号连接,就可以在宿主机的XP系统和虚拟机中各操作系统中通

[color="#008080"]过ADSL共享上网了。
方法二
1)在虚拟机中的XP系统中建立拨号连接。
2)在虚拟机“网上邻居”的“属性”窗口中的“宽带”的拨号连接的图标上鼠标右击,选“属性”

,在打开的宽带连接的属性窗口中点“高级”选项,将“Internet连接共享”中的三个复选框选上,点“

确定”。
3)再在虚拟机“网络连接”窗口中右击“本地连接”,选“属性”,打开“本地连接”对话框,双

击“此连接使用下列项目”下的“Internet协议(TCP/IP)”,在“Internet协议(TCP/IP)属性”对话框

中将“默认网关”填为“192.168.0.1”,“使用下面的DNS服务器地址(E)”的IP地址填为当地电信提

供的地址(在cmd命令下输入ipcnofig
-all可以看到是宽带连接的DNS),“确定”。
4)虚拟机中的Windows 2000
server系统中“网络连接”窗口中右击“本地连接”,选“属性”,打

开“本地连接”对话框,双击“此连接使用下列项目”下的“Internet协议(TCP/IP)”,在“Internet

协议(TCP/IP)属性”对话框中,选择“使用下面的IP地址(S)”,指定IP地址为“192.168.0.2-

192.168.0.254”当中的任意一个,但每台计算机中不得有重复,将“默认网关”填为“192.168.0.1”,

“使用下面的DNS服务器地址(E)”的IP地址填为当地电信提供的IP地址,“确定”。
5)虚拟机中的Windows
98系统中。右击“网上邻居”,选“属性”,打开“网络”属性对话框,双

击“配置”选项卡中的“TCP/IP->AMD PCNET Family
Ethernet Adapter”,在“TCP/IP属性”对话框中

,选“IP地址”选项卡,指定IP地址为“192.168.0.2-192.168.0.254”之间任意一个,但不要同任何一

台计算机相重复,子网掩码为“255.255.255.0”,选“网关”选项卡,将网关填为“192.168.0.1”,点“DNS配置”选项卡,点“启用

DNS(E)”,“主机(H)”填宿主机的计算机名,“DNS服务器搜索顺序”中添加当地的电信提供的IP地

址(在cmd命令下输入ipcnofig
-all可以看到是宽带连接的DNS),“确定”,重新启动计算机。
6)宿主机中的Windows
XP系统中“网络连接”窗口中右击“本地连接”,选“属性”,打开“本地

连接”对话框,双击“此连接使用下列项目”下的“Internet协议(TCP/IP)”,在“Internet协议

(TCP/IP)属性”对话框中,选择“使用下面的IP地址(S)”,指定IP地址为“192.168.0.2-

192.168.0.254”当中的任意一个,但每台计算机中不得有重复,将“默认网关”填为“192.168.0.1”,

“使用下面的DNS服务器地址(E)”的IP地址填为当地电信提供的IP地址(在cmd命令下输入ipcnofig
-all可以看到是宽带连接的DNS),“确定”。
7)在虚拟机的XP系统中打开通过建立的PPPOE拨号连接,就可以在宿主机的XP系统和虚拟机中各操作

系统中通过ADSL共享上网了。

[color="#008080"]以上方法是本人在机器上操作结果,如有不妥之处,望各位高手多指正,在此多多感谢!
[color="#000000"]部分转载自网络,!(本文就是在vista虚拟机上完成的).不对的地方希望各位高手多多指教!(本文就是在vista虚拟机上完成的)
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85566/showart_2021825.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP