VMware虚拟机设置共享文件夹

VMware创建共享文件夹

一、创建共享文件夹

image-20230326225024967

二、VMware开启共享文件夹

虚拟机---设置---选项---共享文件夹---总是启用

image-20230326225516792

image-20230326230052896

image-20230326230306805

image-20230326230326436

image-20230326230417025

另一台服务器按以上相同的步骤创建共享文件夹。

三、虚拟机挂载目录

[root@server01 ~]# mkdir /ogg
[root@server01 ~]# vmhgfs-fuse .host:/ShareDir /ogg -o subtype=vmhgfs-fuse,allow_other

ShareDir: Windows文件夹
ogg: 服务器目录

[root@server01 ~]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
devtmpfs                      3.8G     0  3.8G   0% /dev
tmpfs                         3.9G     0  3.9G   0% /dev/shm
tmpfs                         3.9G   13M  3.8G   1% /run
tmpfs                         3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/cl_server01-root   42G   38G  4.6G  90% /
vmhgfs-fuse                   1.8T  1.6T  114G  94% /ogg
/dev/sda1                     297M  216M   82M  73% /boot
tmpfs                         781M  8.0K  781M   1% /run/user/42
tmpfs                         781M     0  781M   0% /run/user/0

四、设置开机自动挂载

[root@server01 ~]# vim /etc/fstab
.host:/ShareDir    /ogg        fuse.vmhgfs-fuse    defaults,allow_other      0 0

Persistent Mounts
There are 2 ways to specify the Shared Folders mounts persistently in /etc/fstab
Below there are both samples /etc/fstab line to mount a FUSE vmhgfs export.

Method 1: Specifying the file system

<file system> <mount point> <type> <options> <dump> <pass>

Replace <file system> with vmhgfs-fuse.
Replace <mount point> with the local file system on which the exported directory is mounted, which default replacement is to use /mnt/hgfs
Replace <type> with fuse.
Example:
vmhgfs-fuse    /mnt/hgfs    fuse    defaults,allow_other    0    0

Method 2: Specifying the remote server and share

<server>:</remote/export> </local/directory> <fuse-type> <options> <dump> <pass>
Replace <server> with the hostname .host the shared folders name of the host server exporting the hosts file system.
Replace </remote/export> with the path to the exported directory which defaults to/or you can use the /share-name-you-created.
Replace </local/directory> with the local file system on which the exported directory is mounted, which defaults to /mnt/hgfs.
Replace <fuse-type> with fuse.vmhgfs-fuse.
Example:
.host:/    /mnt/hgfs        fuse.vmhgfs-fuse    defaults,allow_other    0    0

Note: Using either of the above formats should be fine
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇