几天一直因为装不上vm tools而苦恼,其实有其他的替代方案,只是搞不定的话心里一直有个疙瘩
之前使用的是VMware7装的Ubuntu14.04 64位的,安装vm tools时错误一大堆,查了很多资料无果,只能使用共享剪贴板功能,我的目标是需要开启共享文件夹
今天上午搜了一下最新版的VMware,找到了10,而且是中文版,便装上打算再试试,装完后,之前VMware7报的那些错误倒是没有了,反而有几个新错误,而且安装完之后连最基本的共享剪贴板功能都没有了,继续查资料,终于在google中找到了
apt-get install gcc
1 - Run apt-get install dkms linux-headers-$(uname -r) build-essential psmisc
2 - Run git clone https://github.com/rasa/vmware-tools-patches.git
3 - Run cd vmware-tools-patches/patches
4 - Remove every folder except vmhgfs.
5 - Get the last version of VMwareTools clicking on VMWare Bar VM InstallReinstall VMWare Tools. It will open a virtual CD containing the tar file.
6 - Copy VMwareTools-9.2.4-1398046.tar.gz to vmware-tools-patches folder.
7 - On vmware-tools-patches folder, run .untar-and-patch-and-compile.sh
重新启动后,分辨率可自适应,剪贴板可正常使用,输入lsmod grep vm可看到vmhgfs,但是在共享目录也就是/mnt/hgfs中,提示该文件夹不是目录
ln -s /mnt/hgfs/u64/ /home/johnny/
假设u64为共享文件夹,/home/johnny为当前用户root目录
在~/.profile中加入此行,重启后无须再链接。
在网上查说是VMware10的Bug,在10.0.2版本中修复了,正在下载,明日再试。
重新启动后,分辨率可自适应,剪贴板可正常使用,输入lsmod grep vm可看到vmhgfs,但是在共享目录也就是mnthgfs中,提示该文件夹不是目录
在网上查说是VMware10的Bug,在10.0.2版本中修复了,正在下载,明日再试。
Creating a new initrd boot image for the kernel.
update-initramfs Generating bootinitrd.img-3.13.0-24-generic
initctl未知任务 vmware-tools-thinprint
Unable to start services for VMware Tools
Execution aborted.
一盆冷水啊,查了一些,跟打印有关,反正我也不用打印功能,干脆删掉吧
root@ www.linuxidc.cometcinit# rm vmware-tools-thinprint.conf
重新启动服务
root@ www.linuxidc.cometcvmware-tools# .services.sh restart
Stopping VMware Tools services in the virtual machine
Guest operating system daemon done
VMware User Agent (vmware-user) done
Blocking file system done
Unmounting HGFS shares done
Guest filesystem driver done
VM communication interface done
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine
Switching to guest configuration done
VM communication interface done
Guest filesystem driver done
Mounting HGFS shares done
Blocking file system done
VMware User Agent done
Guest operating system daemon done
查看共享目录
root@ www.linuxidc.cometcvmware-tools# df
文件系统 1K-blocks 已用 可用 已用% 挂载点
devsda1 19478204 4487716 13978008 25%
none 4 0 4 0% sysfscgroup
udev 1010624 4 1010620 1% dev
tmpfs 204276 1072 203204 1% run
none 5120 0 5120 0% runlock
none 1021364 152 1021212 1% runshm
none 102400 56 102344 1% runuser
devsr0 61542 61542 0 100% mediayufanVMware Tools
.host 186165244 47665228 138500016 26% mnthgfs
root@ www.linuxidc.cometcvmware-tools# cd mnthgfs
root@ www.linuxidc.commnthgfs# ls
WindowsShare
root@ www.linuxidc.commnthgfs# cd WindowsShare
root@ www.linuxidc.commnthgfsWindowsShare# ls
终于搞定了!
-----------------------------------------------------
sudo mount -t vmhgfs .host mnthgfs
vmware-hgfsclient.hostshared homepnutsshared vmhgfs defaults 0 0
Ubuntu 12.04下安装VMware Tools httpwww.linuxidc.comLinux2012-0560472p2.htm
第二步,共享文件夹
首先,点击虚拟机---设置后,会出现虚拟机设置,选择“选项”,点击共享文件夹----总是启用---添加,然后按顺序操作就OK。
此时你在本地F盘下面创建share文件夹,这就是本机与虚拟机共享的文件夹了.
到这里很OK,你进入虚拟机,点应用程序-附件-终端后,进入linux操作界面,
然后输入 cd /mnt/hgfs
再输入命今 ls,会发现目录下面存在目录share,说明共享成功了。
若/mnt/hgfs下无目录情况解决:
VMware8虚拟机安装Ubuntu 11.10使用share folders共享目录
将虚拟机掉电关闭(不能暂停),设置share folders目录,重启虚拟机。
此时/mnt/hgfs目录仍然是空的。
应该sudo apt-get install open-vm-dkms,一路按enter键通过。
然后sudo mount -t vmhgfs .host:/ /mnt/hgfs,这样/mnt/hgfs下便有了与windows的共享目录。
为了每次开机自动挂载共享目录,在/etc/init.d/open-vm-tools末尾增加一行:
sudo mount -t vmhgfs .host:/ /mnt/hgfs (host:/ 处 2个空格)
在PC上移动vm后需要关机,设置为enabled 并使用/usr/bin/vmware-config-tools.pl -d
、