1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > 虚拟机ubuntu设置和windows的共享文件夹

虚拟机ubuntu设置和windows的共享文件夹

时间:2024-07-03 10:57:30

相关推荐

虚拟机ubuntu设置和windows的共享文件夹

vmware workstation:12

ubuntu:16.04

参考:VMware下Ubuntu与宿主Windows共享文件夹

VMware无法通过mount挂载共享文件夹---》下面的评论

ubuntu 执行apt-get update报错Failed to fetch

1、安装vmtool,这个在虚拟机的设置里面就有

下载完会弹出一个虚拟磁盘里面又vmtool的安装包,拷贝到home目录下,解压出来有一个vmtool的目录,在该目录下执行;

./vmware-install.pl

疯狂回车~

2、在"虚拟机--->设置”菜单中有设置共享文件夹。先设置好和windows要共享的目录。

3、下一步执行:

sudo apt-get install open-vm-tools-dkms

发现找不到open-vm-tools-dkms,网上查询之后发现是源不对。

按如下操作依次执行:

1、cd /etc/apt

2、sudomv source.list source.list.bak

3、sudo vi source.list

加入阿里的源-->保存:

deb /ubuntu/ trusty main multiverse restricted universe

deb /ubuntu/ trusty-backports main multiverse restricted universe

deb /ubuntu/ trusty-proposed main multiverse restricted universe

deb /ubuntu/ trusty-security main multiverse restricted universe

deb /ubuntu/ trusty-updates main multiverse restricted universe

deb-src /ubuntu/ trusty main multiverse restricted universe

deb-src /ubuntu/ trusty-backports main multiverse restricted universe

deb-src /ubuntu/ trusty-proposed main multiverse restricted universe

deb-src /ubuntu/ trusty-security main multiverse restricted universe

deb-src /ubuntu/ trusty-updates main multiverse restricted universe

4、打开文件:sudo vi /etc/resolv.conf

添加阿里云的DNS服务器:

nameserver223.5.5.5

nameserver223.6.6.6

5、sudo apt-get update

6、sudo apt-get install open-vm-tools-dkms

7、sudo vi /etc/init.d/open-vm-tools

把“sudo mount -t vmhgfs-fuse .host:/ /mnt/hgfs/” 写到最后一行,开机自动挂载共享目录。

8、执行一遍sudo mount -t vmhgfs-fuse .host:/ /mnt/hgfs/

执行成功后~~

阿西吧! 出现了共享文件夹了~~~

==================================================完美分割线=========================================================================

好气! 在自己笔记本上这个操作就是不对!!!经历了诸多磨难终于在自己笔记本上搞出来了!!

不容易,期间遇到好多问题,趁着还有印象赶紧记一下,感觉这次应该是可以通用的!

以下来自:/linux/209903.html

*********************************************************************************************************************************************

按网上说的挂载一下,

mount -t vmhgfs .host:/CV /mnt/hgfs/

报错 mount: unknown filesystem type ‘vmhgfs’

根据网友/?p=3676中的说法

要换用以下命令

/usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

提示fuse:bad mount point /mnt/hgfs No such file or directory

再试mkdir /mnt/win

接着/usr/bin/vmhgfs-fuse .host:/ /mnt/win -o subtype=vmhgfs-fuse,allow_other

这次ok.

ls /mnt/win

终于出现windows共享目录了。

***********************************************************************************************************************************

感觉666啊! 赶紧在自己笔记本上试一下!

干!没有vmhgfs-fuse。

忘记这个红色的网站去了没有……

发现了另外一个命令:vmshare-mounter

执行:sudovmshare-mounter .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

出现这个错误:

fuse: bad mount point `.host:/VmShare': No such file or directory

往百度上一搜索:

发现这个网页:/questions/580319/enabling-shared-folders-with-open-vm-tools

摘取其中关键部分:

*****************************************************************************************************************

As the other answers didn't work for me, I finally got it working after long time of digging from this link :Files missing in /mnt/hgfs on Ubuntu VM?where PieCot gives the solution:

$ git clone /rasa/vmware-tools-patches.git$ cd vmware-tools-patches$ ./patched-open-vm-tools.sh

****************************************************************************************************************

克隆下来后发现这是提供了一个vmtool的补丁。

一想难道vmtool我一直没安装成功?赶紧重新安装一次瞧瞧:

果然:

****

make[2]: *** [/tmp/modconfig-oc8JBk/vmhgfs-only/file.o] 错误 1

****

幸好有大神提供的补丁!

按着步骤操作:

执行:

./patched-open-vm-tools.sh

打完补丁会自动编译并且会下载、安装一些工具。下载工具的时候系统提醒我安装失败。

崩溃……

错误 trusty InRelease

问题在接着往百度上一搜:

进到一贴吧:/p/3259946156

******************************摘取贴吧一老哥的解决方案*************************************************

不知道什么原因,优麒麟的很多源里面的软件包都不更新了,所以会出现很多404错误,你复制404错误地址搜索,全部都来自于去。解决办法是一条一条删除优麒麟的源列表。删除后大半年更新没出现404错误。

***********************************************************************************************************

说干就干,进到“全部设置--软件和更新” ,删除掉源列表。选择了163的服务器!

执行:sudo apt-get update

更新完成之后:

再次执行:./patched-open-vm-tool.sh

终于成功编译过去。

vm+table键 看到了“vmhgfs-fuse"命令。

执行:

sudovmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

我这边可能因为之前的操作,/mnt/hgfs目录里面有东西~~~

mkdir /mnt/win

sudovmhgfs-fuse .host:/ /mnt/win -o subtype=vmhgfs-fuse,allow_other

终于可以了!!

之后:

vi /etc/profile

末尾加入:

sudovmhgfs-fuse .host:/ /mnt/win -o subtype=vmhgfs-fuse,allow_other

宝宝好累。

但是出现了没法直接拷贝东西去虚拟机里面的问题。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。