首页 » 嵌入式笔记 » 正文

ubuntu16.04 vmware虚拟机安装

一:vm tools 可以用 apt安装

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

二:设置共享文件夹
进入/etc/systemd/system目录
cd /etc/systemd/system
创建一个文件,我这里命名为mnt.hgfs.service
sudo gedit ./mnt.hgfs.service
填入下面的内容,为了方便,就不单独配置各个共享文件夹了,直接将所有共享文件夹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
如果没有创建/mnt/hgfs文件夹,需要创建
sudo mkdir -p /mnt/hgfs
重启后检查共享目录是否已经挂载到/mnt/hgfs目录下了

转载自:http://my.oschina.net/u/1158620/blog/712253

发表评论