Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

what is hgfs in linux?

5 Answer(s) Available
Answer # 1 #

This article is about installing Arch Linux in a VMware product, such as Workstation Player, Fusion or Workstation Pro.

The following drivers are only needed if you are running Arch Linux on a hypervisor like VMware vSphere Hypervisor. Client-server applications can write to the VMCI Sock (vsock) interface to make use of the VMCI virtual device, when communicating between virtual machines.

Some modules, such as the legacy vmhgfs shared folder module, will require additional work to manually compile and systemd enable in order to function properly.

In 2007, VMware released large partitions of the VMware Tools under the LGPL as Open-VM-Tools. The official Tools are not available separately for Arch Linux.

Originally, VMware Tools provided the best drivers for network and storage, combined with the functionality for other features such as time synchronization. However, now the drivers for the network/SCSI adapter are part of the Linux kernel.

The official VMware Tools also had the advantage of being able to use the Unity mode feature, but as of VMWare Workstation 12, Unity mode for Linux guests has been removed due to lack of use and developer difficulties in maintaining the feature. See this thread.

The open-vm-tools package comes with the following utilities:

Install open-vm-tools. Start and/or enable vmtoolsd.service and vmware-vmblock-fuse.service.

Try to install gtkmm3 manually if copy and paste between host and guest does not work properly.

Install the dependencies: base-devel (for building), net-tools (for ifconfig, used by the installer) and linux-headers (for kernel headers). In order to check out open-vm-tools you will need pkgctl from the devtools package.

Then, create bogus init directories for the installer:

The installer can then be mounted:

Extracted (e.g. to /root):

And started:

The following build failures can safely be ignored:

Enable vmware-vmblock-fuse systemd services (make sure the dependencies are manually installed, or that the -s flag) used. The open-vm-tools source code should be checked out using the Arch Build System.

Enable vmware-vmblock-fuse.service and vmtoolsd.service.

Reboot the Virtual Machine.

Log in and start the VMware Tools:

Additionally, to auto start vmware-tools on boot, create a new file /etc/systemd/system/vmwaretools.service:

And enable the new vmwaretools.service.

Install the dependencies: xf86-input-vmmouse, xf86-video-vmware, and mesa.

These packages should be all that are required to get started with booting into a graphical target: . /etc/xdg/autostart/vmware-user.desktop will get started which will set up most of what is needed to work with the Virtual Machine.

However, if booting into multi-user.target or using an uncommon setup (e.g. multiple monitors), then vmtoolsd.service needs to be enabled. In addition to this, run Xorg as root to give permission for loading drivers.

Share a folder by selecting Edit virtual machine settings > Options > Shared Folders > Always enabled, and creating a new share.

The shared folders should be visible with:

Now the folder can be mounted:

If the error message fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf is displayed, uncomment the following line in /etc/fuse.conf:

Other vmhgfs-fuse mount options can be viewed by using the -h input flag:

Add a rule for each share:

Create and mount the Shared Folders (if not done so already):

Create the following .service:

Ensure the folder exists on the system. If this folder does not exist then it must be created, as the systemd service depends on it:

Enable the -.service mount target.

If all shared folders should be mounted automatically then omit .

Share a folder by selecting Edit virtual machine settings > Options > Shared Folders > Always enabled, and creating a new share.

Ensure the vmhgfs driver is loaded:

The shared folders should be viewable with:

Now the folder can be mounted:

Edit mkinitcpio.conf thusly:

and then regenerate the initramfs.

Add a rule for each share:

Create and mount the Shared Folders:

For shared folders to work the vmhgfs driver must be loaded. Create the following .services:

Ensure the folder exists on the system. If this folder does not exist then it must be created, as the systemd scripts depend on it:

Enable the mnt-hgfs.automount mount target.

If all shared folders should be mounted automatically then omit .

When using mlocate, it is pointless to index the shared directories in the locate DB. Therefore, add the directories to PRUNEPATHS in /etc/updatedb.

If not selected at guest creation time, 3D Acceleration can be enabled in: Edit virtual machine settings > Hardware > Display > Accelerate 3D graphics.

It is possible to update OpenGL and GLSL with new kernel modules, overriding Arch-controlled versions.

Currently, OpenGL 3.3 and GLSL 3.30 can be supported. See https://bbs.archlinux.org/viewtopic.php?id=202713 for more details.

Configuring time synchronization in a Virtual Machine is important; fluctuations are bound to occur more easily in a guest VM. This is mostly due to the CPU being shared by more than one guest.

There are 2 options to set up time synchronization: the host or an external source.

To use the host as a time source, ensure vmtoolsd.service is started. Then enable the time synchronization:

To synchronize the guest after suspending the host:

See NTP.

Arch Linux, as well as other Linux guests, may have slow network speeds while using NAT. To resolve this, switch the network type to Bridged mode in the guest settings on the host, changing the configuration file for the network on the guest where necessary. For more information on configuration, see Network configuration. If on a Windows host and it is not connecting properly despite correct guest configuration, open the Virtual Network Editor on the host as Administrator and press the Restore defaults button at the bottom left.

If unacceptably loud or annoying sounds occur, then it may be related to the PC speaker. The issue may be resolved by disabling the PC speaker within the guest image.

The following problems may occur with the mouse:

These may be fixed by uninstalling the xf86-input-vmmouse package. xf86-input-vmmouse and xf86-input-libinput should be sufficient for handling mouse and keyboard inputs.

Adding settings to the .vmx configuration file may help (Mouse position jumps to where it left the guest VM):

VMware also attempts to automatically optimize the mouse for gaming. If problems are experienced, disabling the optimization is recommended: Edit > Preferences > Input > Optimize mouse for games: Never

Alternatively, attempting to disable the catchall event in 60-libinput.conf may be required:

The following errors may be displayed if VMWare's memory hot-add feature is enabled:

Disable the memory hot-add feature by setting mem.hotadd = "FALSE" to the .vmx.

Adjust the timeout for the vmtoolsd service (defaults to 90 seconds).

"Autofit" means that when the VMWare window's size is adjusted in the host, Arch Linux in the guest should automatically follow and readjust its resolution to fit the new size of the host window.

Ensure autofit is enabled. For VMware Workstation the setting can be found in: View -> Autosize -> Autofit Guest

For some reason, autofit requires the packages gtkmm and gtk2, so ensure they are installed. If X windows is not installed or a non–GTK-based desktop environment (such as KDE) is being used, the might have to be installed independently.

The relevant modules may have to be added to mkinitcpio.conf:

Do not forget to regenerate the initramfs.

Enable vmtoolsd.service.

If this does not work, ensure the vmtoolsd.service is restarted.

If GNOME is running on Wayland, install xf86-video-vmware (FS#57473).

See .

The drag-and-drop (copy/paste) feature requires both open-vm-tools and gtkmm3 packages to be installed.

Make the command vmware-user run after X11 by either:

OR

Copy/paste does not currently work on Wayland, though applications running through XWayland work fine.

Workstation 11 has a bug where vmware-hostd crashes if an Arch guest is running as a shared VM and vmtoolsd is running in the guest. A patch to open-vm-tools to work around the bug is here.

Running GUI applications as root -- some of the following is copied from

Trying to run a graphical application as root via su, sudo or pkexec in a Wayland session (e.g. GParted or Gedit), will fail with an error similar to this:

This is a security feature of Wayland they reason GUI applications should not be run as root. This can be achieved using the following in the terminal

A more versatile —though much less secure— workaround is to use xhost to temporarily allow the root user to access the local user's X session. To do so, execute the following command as the current (unprivileged) user:

To remove this access after the application has been closed:

Launch vmware-netcfg with:

[3]
Edit
Query
Report
Prem Seetharam
Quality Assurance Manager
Answer # 2 #

Previously, I couldn't mount windows shared folder after installing vmware tools. I didn't see any folders under /mnt/hgfs.

Finally, I got resolved this share folder mounting issue by installing open-vm-dkms.

[2]
Edit
Query
Report
Mariem Griggs
Ringmaster
Answer # 3 #

This is a quick article about a recurring question: How can I share a local directory with my VMware Virtual Machine using a Linux Distribution?

To make this tutorial possible, first of all you need be sure you have installed vmtools drivers. In case you are not sure, please execute:

First we need to share a local folder using your VMware. Go to VM menu, after Settings > Options > Shared Folders and click on ‘Always enabled’. After, click on ‘Add…’ button and choose your local folder to share it.

In order to confirm if your local selected folder was really shared, run the below command and check if your folder will be listed.

After that, create a directory inside /mnt/hgfs. Thus, open your terminal in order to create a directory called ‘shared’ and execute the following command.

Now, let’s share the ‘shared’ directory we just created.

That’s it! It is sharing and you can check it by clicking on Activities > Files > Other locations > Computer or running the commands:

If you have experiencing some issues, please restart your VM and check again if the folder is shared following the above commands.

The procedure instructed above work until the next VM restart. Thus, if you want to persist this change, please follow as instructed below.

You must have administrator permission to edit /etc/fstab. In this example, we will use nano editor.

If you do not have a section reserved to shared folders, please add this instructions at the end of the file.

[0]
Edit
Query
Report
Owais Prajapati
CHOCOLATE TEMPERER
Answer # 4 #

Open and edit inode.c. Edit line 888, change

to

Then save the file and exit the editor. Finally, tar it back up:

Open and edit ./vmci-only/linux/driver.c.

Edit line 127, change

to

Edit line 1753, change

to

Edit line 1981, change

to

Close and save ./vmci-only/linux/driver.c. Then tar the files back up.

Now you can run ./vmware-install.pl and it should successfully install HGFS.

I needed to fix both of these broken modules to get HGFS working. Other sites report just needing to fix the vmhgfs module.

[0]
Edit
Query
Report
Yoson Tanner
Nursing Management
Answer # 5 #
  • Select Window > Virtual Machine Library.
  • Select a virtual machine in the Virtual Machine Library window and click Settings.
  • Under Systems Settings in the Settings window, click Sharing.
  • Select the Enable Shared Folders check box.
  • Click the add (+) button at the bottom of the display box.
[0]
Edit
Query
Report
Steve-O Chow
Technical Writer