vmware 12下安装ubuntu 16.04后,按往常的惯例安装vmware-tools,安装时提示建议使用open-vm-tools,因而放弃vmware-tools的安装,尝试使用open-vm-toolslinux
首先安装open-vm-toolsubuntu
sudo apt-get install open-vm-tools
安装时,apt提示建议安装open-vm-tools-desktop,一不作二不休,一块儿装了吧bash
sudo apt-get install open-vm-tools-desktop
以前在虚拟机上已经设置了共享文件夹,如今经过下面的命令就能够看到已经设置好的共享文件夹名ui
vmware-hgfsclient
而后根据wiki.archlinux.org上找到的教程配置共享文件夹code
进入/etc/systemd/system目录教程
cd /etc/systemd/system
建立一个文件,我这里命名为mnt.hgfs.serviceip
sudo gedit ./mnt.hgfs.service
填入下面的内容,为了方便,就不单独配置各个共享文件夹了,直接将全部共享文件夹mount到一个目录下get
[Unit] Description=Load VMware shared folders Requires=vmware-vmblock-fuse.service After=vmware-vmblock-fuse.service ConditionPathExists=.host:/ ConditionVirtualization=vmware [Service] Type=oneshot RemainAfterExit=yes ExecStart= ExecStart=/usr/bin/vmhgfs-fuse -o allow_other -o auto_unmount .host:/ /mnt/hgfs [Install] WantedBy=multi-user.target
保存后,用systemctl命令使能这个service虚拟机
sudo systemctl enable mnt.hgfs.service
若是没有建立/mnt/hgfs文件夹,须要建立it
sudo mkdir -p /mnt/hgfs
重启后检查共享目录是否已经挂载到/mnt/hgfs目录下了