[Others] VM虚拟机中的DEEPIN ,Shared Folders重启虚拟机,会失效
Tofloor
poster avatar
深圳市耀影科技有限公司
deepin
2022-02-24 20:13
Author

VM虚拟机中的DEEPIN ,Shared Folders重启虚拟机,会失效,需要关闭在打开

image.png

Reply Favorite View the author
All Replies
深圳市耀影科技有限公司
deepin
2022-02-24 21:32
#1

1,配置虚拟机设置,开启共享文件夹

2,打开深度终端,查看虚拟机上刚才设置的共享文件夹是否出现

输入命令:vmware-hgfsclient

返回已设置好的共享目录名

3,如果能看到共享文件夹名称,再进行下一步

在/etc/systemd/system目录,创建一个文件mnt.hgfs.service:

sudo deepin-editor /etc/systemd/system/mnt.hgfs.service
# 或者
sudo nano /etc/systemd/system/mnt.hgfs.service

添加以下内容:

[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=/usr/bin/vmhgfs-fuse -o allow_other -o auto_unmount .host:/ /mnt/hgfs

[Install]
WantedBy=multi-user.target

然后:保存退出。

4,启用刚才建立的mnt.hgfs.service

sudo systemctl enable mnt.hgfs.service 

6,重启系统

Reply View the author
rekees2020
deepin
2022-02-25 05:57
#2

直接用局域网共享的方式更简单

Reply View the author
深圳市耀影科技有限公司
deepin
2022-02-25 06:36
#3
rekees2020

直接用局域网共享的方式更简单

局域网共享有点问题

Reply View the author