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目錄下了