QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1763|回复: 1

在VMware里建立共享文件夹shared folders

[复制链接]
发表于 2005-3-28 23:50:47 | 显示全部楼层 |阅读模式
环境:
Host  OS:   Window2000
Guest OS:   Linux AS3
Vmware workstation: 5.0.0.12888

目标:
在Host  OS 和 Guest OS之间建立共享文件夹
=====================

步骤:
1.在VMware里, 安装完成Linux AS3, 运行Linux

2.使光驱里mount上VWware Tools
  为了影射VWware Tools到Linux的CD-ROM驱动器
    2.1 先让Window2000里的VMware的CDROM指向物理驱动器:
       VM  ->  Settings..  ->  Hardware  ->  CD-ROM(IDE 1:0) 双击  ->  Connection -> Use phisical driver -> OK

    2.2 Linux登出:
       Main Menu -> Log Out -> Log Out -> OK

    2.3 Linux登入:
       User Name :root
       Passward:  xxxxxx

    2.4 Window2000里的VMware, 启动
       VM  ->  Install Vmware Tools.

  这时就会看到Linux里的CD-ROM已经变成了VWware Tools的安装盘

3.安装VMware Tools
    3.1 进入Linux命令窗口
      [root@aaa root]# cd /mnt/cdrom
      [root@aaa cdrom]# cp VMwareTools-5.0.0-12888.tar.gz /tmp
      [root@aaa tmp]# cd /tmp
      [root@aaa tmp]# tar zvxf VMwareTools-5.0.0-12888.tar.gz
      [root@aaa tmp]# ls
      orbit-root  ssh-BOlv1930  VMwareTools-5.0.0-12888.tar.gz  vmware-tools-distrib
      [root@aaa tmp]# cd vmware-tools-distrib
      [root@aaa vmware-tools-distrib]# ls
      bin  doc  etc  FILES  INSTALL  installer  lib  sbin  vmware-install.pl
      [root@aaa vmware-tools-distrib]# ./vmware-install.pl
      Installing the content of the package.
      
      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/)?
      [/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]
      
      The path "/usr/lib/vmware-tools" does not exist currently. This program is goingto create it, including needed parent directories. Is this what you want?
      [yes]
      
      In which directory do you want to install the documentation files?
      [/usr/share/doc/vmware-tools]
      
      The path "/usr/share/doc/vmware-tools" does not exist currently. This program isgoing to create it, including needed parent directories. Is this what you want?
      [yes]
      
      The installation of VMware Tools 5.0.0 build-12888 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:                          [  OK  ]
      Trying to find a suitable vmhgfs module for your running kernel.
      
      The module up-2.4.21-15.i686-RH1082608943 loads perfectly in the running kernel.
      
      Trying to find a suitable vmxnet module for your running kernel.
      
      The module up-2.4.21-15.i686-RH1082608943 loads perfectly in the running kernel.
      
      
      
      Detected XFree86 version 4.3.0.
      
      Shutting down console mouse services:                      [  OK  ]
      Starting console mouse services:                           [  OK  ]
      
      Please choose one of the following display sizes (1 - 9):
      
      [1]  "640x480"
      [2]< "800x600"
      [3]  "1024x768"
      [4]  "1152x864"
      [5]  "1152x900"
      [6]  "1280x1024"
      [7]  "1376x1032"
      [8]  "1600x1200"
      [9]  "2364x1773"
      Please enter a number between 1 and 9:
      
      [2] 3
      
      
      XFree86 Version 4.3.0 (Red Hat Enterprise Linux 3 release: 4.3.0-62.EL)
      Release Date: 15 August 2003
      X Protocol Version 11, Revision 0, Release 6.6
      Build Operating System: Linux 2.4.21-4.ELsmp i686 [ELF]
      Build Date: 04 March 2004
      Build Host: tweety.devel.redhat.com
        
              Before reporting any problems, please make sure you are using the most
              recent XFree86 packages available from Red Hat by checking for updates
              at http://rhn.redhat.com/errata or by using the Red Hat Network up2date
              tool.  If you still encounter problems, please file bug reports in the
              XFree86.org bugzilla at http://bugs.xfree86.org and/or Red Hat
              bugzilla at http://bugzilla.redhat.com
      
      Module Loader present
      OS Kernel: Linux version 2.4.21-15.EL ([email protected]) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)) #1 Thu Apr 22 00:27:41 EDT 2004 PFMarkers: (--) 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.2257", Time: Mon Mar 28 22:28:32 2005
      (++) Using config file: "/tmp/vmware-config0/XF86Config.2257"
      (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:                       [  OK  ]
         Guest filesystem driver:                                [  OK  ]
         DMA setup:                                              [  OK  ]
         Guest operating system daemon:                          [  OK  ]
      
      The configuration of VMware Tools 5.0.0 build-12888 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
      modprobe vmxnet
      /etc/init.d/network start
      
      Enjoy,
      
      --the VMware team
      
      [root@aaa vmware-tools-distrib]#


    3.2 Linux登出:
       Main Menu -> Log Out -> Log Out -> OK

    3.3 Linux登入:
       User Name :root
       Passward:  xxxxxx

     Vmware tools 安装完毕, 可以看见显示从原来的800*600 变成1024*768.

4.创建共享文件夹
    4.1 运行Linux, 首先确保Linux里 /mnt/hgfs 目录存在。
        如果不存在, 手工创建它:
        [root@aaa root]# cd /mnt
        [root@aaa mnt]# mkdir hgfs

    4.2 在Window2000 里用Vmware创建共享文件夹
        VM  ->  Settings..  ->  Options  ->  Shared Folders -> Add... -> ...(指向你想存放共享文件的window文件夹,并给这个文件夹取个名字,例如“Linux_Share”) -> 把Enabled勾上。

    4.3 在Linux里, \mnt\hgfs\Linux_Share里就是共享空间。
        可以copy文件到这个目录里试一下。 在Window2000的刚才用于共享的文件夹里, 就会看见这个Linux新copy进来的文件。
        

        如果没有看到,
        Linux登出:
        Main Menu -> Log Out -> Log Out -> OK

        Linux登入:
        User Name :root
        Passward:  xxxxxx

完毕。
发表于 2005-3-29 09:16:05 | 显示全部楼层
好!
我都不用Vmware
大家觉得怎么样?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-25 11:14 , Processed in 0.082105 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表