vmware 12下安裝ubuntu 16.04后,按往常的慣例安裝vmware-tools抛姑,安裝時提示建議使用open-vm-tools,于是放棄vmware-tools的安裝艳狐,嘗試使用open-vm-tools
首先安裝open-vm-tools
sudo apt-get install open-vm-tools
安裝時定硝,apt提示建議安裝open-vm-tools-desktop,一不做二不休毫目,一起裝了吧
sudo apt-get install open-vm-tools-desktop
之前在虛擬機上已經(jīng)設(shè)置了共享文件夾镀虐,現(xiàn)在通過下面的命令就可以看到已經(jīng)設(shè)置好的共享文件夾名
vmware-hgfsclient
然后根據(jù)wiki.archlinux.org上找到的教程配置共享文件夾
進入/etc/systemd/system目錄
cd /etc/systemd/system
創(chuàng)建一個文件箱蟆,我這里命名為mnt.hgfs.service
sudo gedit ./mnt.hgfs.service
填入下面的內(nèi)容,為了方便刮便,就不單獨配置各個共享文件夾了空猜,直接將所有共享文件夾mount到一個目錄下
[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
如果沒有創(chuàng)建/mnt/hgfs文件夾搜贤,需要創(chuàng)建
sudo mkdir -p /mnt/hgfs
重啟后檢查共享目錄是否已經(jīng)掛載到/mnt/hgfs目錄下了
? 著作權(quán)歸作者所有https://my.oschina.net/u/1158620/blog/712253