原创 虚拟机下Linux和windows的文件共享――共享方式

2008-11-6 15:52 19570 11 16 分类: MCU/ 嵌入式

本人使用的是vmware workstation6.0绿色版,LinuxRedhat Linux9.0。首先在虚拟机下设置windows的共享文件,然后安装vmware tools实现共享。<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


一、在虚拟机下设置windows的共享文件


虚拟机》设置》选点下共享文件夹选中后》添加》


点击开大图


下一步》名称(随便填) 浏览选择一个共享文件夹》下一步》选择启用该共享》完成。


点击开大图


二、 安装VMvare tools


虚拟机》设置》硬件点下CDROM》使用ISO镜像》选择你的Vmware tools安装程序镜像。会在虚拟机里弹出cdrom界面如下,桌面上有vmvare tools 盘符


点击开大图


点击开大图


下面就是虚拟机里面的命令操作了,打开虚拟终端


[root@localhost root]# cd /mnt


[root@localhost mnt]# ls            当前没有hgfs文件夹,因为vmvare tools 没有安装


cdrom     floppy


[root@localhost root]# cd ..


[root@localhost /]# ls


bin   dev  home    lib         misc  opt   root  tftpboot  usr


boot  etc  initrd  lost+found  mnt   proc  sbin  tmp       var


[root@localhost /]# cd tmp


[root@localhost tmp]# ls


orbit-root  ssh-XX9WNhuH  ssh-XXcHmBpQ  ssh-XXnDf4aF  vmware-tools-distrib


[root@localhost tmp]# cd vmware-tools-distrib/


[root@localhost vmware-tools-distrib]# ls


bin  doc  etc  FILES  INSTALL  installer  lib  vmware-install.pl


[root@localhost vmware-tools-distrib]# ./vmware-install.pl


A previous installation of VMware Tools has been detected.


 


The previous installation was made by the tar installer (version 4).


 


Keeping the tar4 installer database format.


 


Uninstalling the tar installation of VMware Tools.


 


Skipping VMware Tools services shutdown on the host:       [  确定  ]


 


The removal of VMware Tools <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />6.0.4 build-93057 for Linux completed successfully.


Thank you for having tried this software.


 


Installing VMware Tools.


 


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


tools] /usr/bin


 


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


[/etc/rc.d] /etc/rc.d


 


What is the directory that contains the init scripts?


[/etc/rc.d/init.d] /etc/rc.d/init.d


 


In which directory do you want to install the daemon files?


[/usr/sbin] /usr/sbin


 


In which directory do you want to install the library files?


[/usr/lib/vmware-tools] /usr/lib/vmware-tools


 


The path "/usr/lib/vmware-tools" does not exist currently. This program is


going to create it, including needed parent directories. Is this what you want?


[yes] yes


 


In which directory do you want to install the documentation files?


[/usr/share/doc/vmware-tools] usr/share/doc/vmware-tools


 


The path "usr/share/doc/vmware-tools" is a relative path. Please enter an


absolute path.


 


In which directory do you want to install the documentation files?


[/usr/share/doc/vmware-tools] /usr/share/doc/vmware-tools


 


The path "/usr/share/doc/vmware-tools" does not exist currently. This program


is going to create it, including needed parent directories. Is this what you


want? [yes] yes


 


The installation of VMware Tools 6.0.4 build-93057 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] yes


 


 


Stopping VMware Tools services in the virtual machine:


   Guest operating system daemon:                          [  确定  ]


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


 


The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.


 


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


 


The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.


 


pcnet32                18240   0


Unloading pcnet32 module


 


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


 


The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.


 


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


 


The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.


 


[EXPERIMENTAL] The VMware CPU Time Accounting daemon (vmware-vmdesched) can


help increase the accuracy of CPU time accounting performed by the guest


operating system. Please refer to the VMware Knowledge Base for more details on


this capability. Do you wish to enable this feature? [no] yes


 


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


 


The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.


 


[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service


provides a new communication capability with the Host, primarily for


development at the moment.  Would you like to enable this feature? [no] yes


 


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


 


The module up-2.4.20-8.i686-RH9.0 loads perfectly in the running kernel.


 


 


 


Detected XFree86 version 4.3.0.


 


 


Please choose one of the following display sizes that X will start with (1 -


15):


 


[1]  "640x480"


[2]  "800x600"


[3]< "1024x768"


[4]  "1152x864"


[5]  "1280x800"


[6]  "1152x900"


[7]  "1280x1024"


[8]  "1376x1032"


[9]  "1400x900"


[10]  "1400x1050"


[11]  "1440x900"


[12]  "1680x1050"


[13]  "1600x1200"


[14]  "1920x1200"


[15]  "2364x1773"


Please enter a number between 1 and 15:


 


[3] 3


 


 


XFree86 Version 4.3.0 (Red Hat Linux release: 4.3.0-2)


Release Date: 27 February 2003


X Protocol Version 11, Revision 0, Release 6.6


Build Operating System: Linux 2.4.20-3bigmem i686 [ELF]


Build Date: 27 February 2003


Build Host: porky.devel.redhat.com


 


        Before reporting problems, check http://www.XFree86.Org/


        to make sure that you have the latest version.


Module Loader present


OS Kernel: Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003 PF


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.2996", Time: Mon Nov  3 16:08:19 2008


(++) Using config file: "/tmp/vmware-config0/XF86Config.2996"


 


X is running fine with the new config file.


 


Starting VMware Tools services in the virtual machine:


   Switching to guest configuration:                       [  确定  ]


   Guest filesystem driver:                                [  确定  ]


   Mounting HGFS shares:                                   [  确定  ]


   Guest memory manager:                                   [  确定  ]


   Guest vmxnet fast network device:                       [  确定  ]


   Loading vmdesched driver module:                        [  确定  ]


   Guest descheduled time accounting daemon:               [  确定  ]


   New Host-Guest communications path:                     [  确定  ]


   Blocking file system:                                   [  确定  ]


   DMA setup:                                              [  确定  ]


   Guest operating system daemon:                          [  确定  ]


 


The configuration of VMware Tools 6.0.4 build-93057 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 X server session.


 


To use the vmxnet driver, restart networking using the following commands:


/etc/init.d/network stop


rmmod pcnet32


rmmod vmxnet


modprobe vmxnet


/etc/init.d/network start


 


To make use of the virtual printer, you will need to restart the CUPS service


 


Enjoy,


 


--the VMware team


 


[root@localhost vmware-tools-distrib]# cd /mnt


[root@localhost mnt]# ll                   此时可以在mnt目录下见到hgfs文件夹


 


总用量 9


dr-xr-xr-x    1 root     root         2048  7 20 10:25 cdrom


drwxr-xr-x    2 root     root         4096 11  3 12:02 floppy


dr-xr-xr-x    1 root     root         4192 11  3 16:03 hgfs


[root@localhost mnt]# cd hgfs/


 


重启vmvare-tools 服务


 


[root@localhost hgfs]# etc/init.d/vmware-tools restart


Stopping Vmware Tools services in the virtual machine:


       Guest operating system daemon:                                                 [确定]


       Blocking file system:                                                             [确定]


       Unmounting HGFS shares:                                                   [失败]


       Guest filesystem driver:                                                               [失败]


       Guest memory manager:                                                              [确定]


关闭环回接口:


       Guest vmxnet fast network device:                                              [确定]


       New Host-Guest communication path:                                        [确定]


       Guest descheduled time accounting daemon:                                [确定]


       Unloading vmdesched driver module:                                          [确定]


 


查看hgfs文件夹里是否存在windows刚共享的share,存在即表示成功,注意名字为虚拟机下面的名字,即第一步中所设置的share,对应于windows下面的Linux,见上面的图


[root@localhost hgfs]# ls


share



至此Vmware tools安装完毕
PARTNER CONTENT

文章评论5条评论)

登录后参与讨论

用户377235 2012-9-17 15:59

非常感谢!

用户1651713 2011-7-31 23:08

Starting VMware Tools services in the virtual machine: Switching to guest configuration: [ OK ] Paravirtual SCSI module: [ OK ] Guest filesystem driver: [ OK ] Mounting HGFS shares: [FAILED] Guest memory manager: [ OK ] Guest vmxnet fast network device: [ OK ] VM communication interface: [ OK ] VM communication interface socket family: [ OK ] Blocking file system: [ OK ] VMware User Agent: [ OK ] Guest operating system daemon: [ OK ] Virtual Printing daemon: [ OK ] 设置完共享目录后 在/mnt/hgfs下什么都没有 怎么回事

用户738303 2011-6-9 22:44

你在百度上搜VMware_tools_linux应该能找到吧。不让可以发给你,不过我的文件是08年的哦

用户347381 2011-5-27 16:19

怎么样得到这个Vmware tools安装程序镜像,我找不到呀

用户738303 2008-12-30 21:05

这个应该不影响windows和linux的共享吧,我的也有好几项失败,但是可以实现共享
相关推荐阅读
用户738303 2009-05-13 19:04
GPRS模块短消息发送方法
最近做了一个GPRS模块的简单测试,其中短消息方式比较简单,同时也与其他GPRS模块通用,现在将我的调试笔记写下来。短消息方式:<?xml:namespace prefix = o ns = "...
用户738303 2009-05-07 15:48
AT91SAM9260的bootstrap(包括norflash)
公司的一个项目用AT91SAM9260的ARM,从百特买了一个AT91SAM9260的开发板,上面有一个norflash,但没有焊。公司要求用norflash,结果却发现开发板资料中并没有norfla...
用户738303 2008-12-30 21:04
AT91SAM9260学习——用WINARM编译bootstrap
一、下载安装WinARM编译工具(winarm.rar文件)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:o...
用户738303 2008-11-11 16:19
89C51控制ZY12864D点阵液晶显示数字
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />图1所示是<?xml:name...
用户738303 2008-10-25 16:56
MCS51的LED1602液晶显示控制电路及程序
图1所示是80C51单片机与LED1602的接口电路。其中,74HC573作为地址锁存器。LED1602的D0~D7为8位双向数据线;RS为寄存器选择,高电平选择数据寄存器,低电平选择指令寄存器;R/...
EE直播间
更多
我要评论
5
11
关闭 站长推荐上一条 /3 下一条