Как мне подключить общие папки в Ubuntu с помощью инструментов VMware?
Эксперты. Я успешно установил инструменты VMware для Ubuntu. Кажется, все работает нормально, но общие папки не были смонтированы автоматически.
Как мне заставить их работать?
Если я бегу vmware-hgfsclient в терминале я получаю список общих папок, но ls -l /mnt/hgfs пустой. На самом деле нет hgfs реж /mnt , Я знаю, что я должен использовать vmware-hgfsclient инструмент, но я действительно не знаю как.
PS Я бы не спрашивал, могу ли я понять vmware-hgfsclient помогите я прочитал.
13 ответов
Я установил на хосте Windows 7 с Ubuntu 11.04 Desktop с установленными VMware Tools.
Настройки виртуальной машины
- Общий доступ к папкам = всегда включен
- Убедитесь, что у вас есть хотя бы одна папка, совместно используемая хостом и гостем
На гостях в Ubuntu
проверьте / mnt / hgfs, что вы можете получить доступ к вашей общей папке.
Если вы не видите свои общие папки (автоматически подключенные) внутри /mnt/hgfs , запустите инструменты настройки VMware:
обновите свой fstab, используя детали ниже:
gksu gedit /etc/fstab
(Я использую рабочий стол Ubuntu, поэтому используйте другой текстовый редактор, чтобы ввести следующую строку в конце файла)
Перезагрузите виртуальную машину (может потребоваться перезагрузить компьютер несколько раз или получить сообщение об ошибке, в котором говорится, что не удалось подключиться, просто пропустите ошибку и перезапустите)
Я заметил, что большинство ответов довольно древние.
Что работало для меня на Ubunt 18.04 (бионический):
Это волшебным образом смонтировало все общие папки для меня. Возможно, вам придется сделать это для конкретной папки вместо .host:/ , В этом случае вы можете узнать название акции с vmware-hgfsclient ,
Если вы хотите, чтобы они были установлены при запуске:
Я выбираю монтировать их по требованию и игнорировать их sudo mount -a и тому подобное с noauto вариант, потому что я заметил, что акции влияют на производительность виртуальной машины.
Я конечно сделал sudo apt-get install open-vm-tools open-vm-tools-desktop заранее. Насколько я помню, ничего другого не требовалось. Тем не менее, другие утверждали, sudo apt-get install build-essential module-assistant linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools было необходимо.
[ОБНОВЛЕНИЕ 2017-05-18] Этот ответ устарел для Ubuntu новее 15.10 (Wiley). Исполняемый файл vmware-hgfsmounter не был доступен в Ubuntu с 16.04LTS (xenial). Хотя, hgfsmounter может быть доступен в других дистрибутивах Linux, так как hgfsmounter функция по-прежнему доступна в исходном коде на GitHub. Если кто-то обновил информацию, пожалуйста, прокомментируйте или отредактируйте этот ответ, вместо того, чтобы понижать голосование, поскольку я считаю, что этот ответ все еще может быть действительным для более старых выпусков Ubuntu.Этот ответ также предполагает, что вы не используете VMWare Tools из VMWare, а вместо этого используете open-vm-tools из вашего дистрибутива Linux. VMWare решила поддержать этот коммутатор в 2015 году. См. KB2073803. Поэтому в этом ответе также предполагается, что ваша версия Ubuntu может устанавливать open-vm-tools из своего репозитория программного обеспечения.
УДАЛЕНО ДЛЯ UBUNTU > 15.10 (Wiley)
конечно, при условии, что я уже включил общую папку с хост-компьютера в настройках VMware Player.
Обратите внимание, что vmware-hgfsclient возвращает список общих папок, которые включены в настройках VMware Player. Эта функция доступна как для open-vm-tools, так и для vmware-tools.
Также обратите внимание, что vmware-hgfsmounter эквивалентно
Vmware shared folders linux vmware
You are using an outdated browser. Please upgrade your browser to improve your experience.
After you enable a shared folder, you can mount one or more directories or subdirectories in the shared folder to any location in the file system in addition to the default location of /mnt/hgfs .
Depending on the kernel version of the Linux guest operating system, VMware Tools uses different components to provide shared-folder functionality. In Linux kernels prior to version 4.0, the VMware Tools services script loads a driver that performs the mount. Linux kernels 4.0 and later use a FUSE file system component.
You can use different mount commands to mount all shares, one share, or a subdirectory within a share to any location in the file system. The commands also vary depending on the Linux-kernel version of the guest.
Linux Kernel Prior to 4.0 | Linux Kernel 4.0 and Later | Description |
---|---|---|
mount -t vmhgfs .host:/ /home/user1/shares | /usr/bin/vmhgfs-fuse .host:/ /home/user1/shares -o subtype=vmhgfs-fuse,allow_other | Mounts all shares to /home/user1/shares |
mount -t vmhgfs .host:/foo /tmp/foo | /usr/bin/vmhgfs-fuse .host:/foo /tmp/foo -o subtype=vmhgfs-fuse,allow_other | Mounts the share named foo to /tmp/foo |
mount -t vmhgfs .host:/foo/bar /var/lib/bar | /usr/bin/vmhgfs-fuse .host:/foo/bar /var/lib/bar -o subtype=vmhgfs-fuse,allow_other | Mounts the subdirectory bar within the share foo to /var/lib/bar |
For Linux kernel prior to version 4.0, you can use VMware-specific options in addition to the standard mount syntax. Enter the command /sbin/mount.vmhgfs -h to list the options.
For Linux kernel version 4.0 or later, enter the command /usr/bin/vmhgfs-fuse -h to list the available options.
How do I mount shared folders in Ubuntu using VMware tools?
Experts. I’ve successfully installed VMware tools for Ubuntu. Everything seems to work fine, but shared folders were not mounted automatically.
How do I get them to work?
If I run vmware-hgfsclient in terminal, I get the list of shared folders, but ls -l /mnt/hgfs is empty. Actually there’s no hgfs dir in /mnt . I know I should probably use the vmware-hgfsclient tool, but I realy don’t know how.
P.S. I wouldn’t ask if I could understand the vmware-hgfsclient help I’ve read.
13 Answers 13
I have set up on Windows 7 host with Ubuntu 11.04 Desktop with VMware Tools installed on.
Virtual Machine settings
- Folder sharing = Always Enabled
- Make sure you have at least one Folder shared between the host and guest
On the Ubuntu Guest
check /mnt/hgfs that you can access your shared folder.
If you don’t see your shared folders (automounted) inside /mnt/hgfs , run VMware configuration tools:
update your fstab using the details below:
gksu gedit /etc/fstab
(I am using ubuntu desktop so use other text editor to enter the next line at the end of the file)
Restart your vm (You may need to restart few times or get error message saying unable to mount just skip the error and restart)
/hst_ebooks this will mount hst_ebooks into your home directory. What you might be wanting to do is making is easy for you to use shared folders for that try above. – Azizur Rahman May 11 ’11 at 20:32
Most other answers are outdated. For Ubuntu 18.04 (or recent Debian distros), try:
If the hgfs directory doesn’t exist, try:
You may have use a specific folder instead of .host:/ . In that case you can find out the share’s name with vmware-hgfsclient . For example:
If you want them mounted on startup, update /etc/fstab with the following:
I choose to mount them on demand and have them ignored by sudo mount -a and the such with the noauto option, because I noticed the shares have an impact on VM performance.
Requirements
Software requirements may require installing the following tools beforehand:
Others have claimed the following are required:
run vmware-config-tools.pl, AGAIN!
This answer also assumes that you are not using VMWare Tools from VMWare but instead using open-vm-tools from your Linux distribution. VMWare decided to support this switch in 2015. See KB2073803. Therefore this answer also assumes that your version of Ubuntu can install the open-vm-tools from it’s software repository.
OUTDATED FOR UBUNTU > 15.10 (Wiley)
assuming of course that I had already enabled a shared folder from the host machine in VMware Player settings.
Note that vmware-hgfsclient returns the list of shared folders that are enabled in the VMware Player settings. This function is available for both open-vm-tools and vmware-tools.
Also note that vmware-hgfsmounter is equivalent to