Vmware: Difference between revisions
Jump to navigation
Jump to search
Enable 3D acceleration (
(→Tips) |
|||
Line 67: | Line 67: | ||
+PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /mnt/hgfs" |
+PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /mnt/hgfs" |
||
</source> |
</source> |
||
=== Enable network promiscuous mode on Debian === |
|||
Create file {{file|/etc/systemd/system/vmware-promiscuous.service}}: |
|||
<source lang="bash"> |
|||
[Unit] |
|||
Description=Enable vmware promiscuous mode |
|||
After=vmware.service |
|||
[Service] |
|||
Type=oneshot |
|||
ExecStart=/bin/bash -c "chgrp vmnet /dev/vmnet0; chmod g+rw /dev/vmnet0" |
|||
ExecStop=/bin/bash -c "chgrp root /dev/vmnet0; chmod g-rw /dev/vmnet0" |
|||
RemainAfterExit=yes |
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
</source> |
|||
Then enable and start it: |
|||
<source lang="bash"> |
|||
sudo systemctl enable vmware-promiscuous.service |
|||
sudo systemctl start vmware-promiscuous.service |
|||
</source> |
|||
Note: |
|||
* <code>vmware.service</code> is a generated service, generated by <code>systemd-sysv-generator</code> from {{file|/etc/init.d/vmware}}. Unit file is found in {{file|/run/systemd/generator.late/vmware.service}}. |
Revision as of 13:49, 4 May 2020
Install
Linux guests
After install, you must install:
- Either VMWare tools, which comes as an ISO file downloaded on request by VMWare.
- Or, which is recommended, install open-source package open-vm-tools (and package open-vm-tools-desktop for GUI environment):
sudo apt install open-vm-tools
sudo apt install open-vm-tools-desktop # If using Xfce, Gnome...
Tips
Enable copy-paste in Linux GUI guests
Install package open-vm-tools-desktop to enable copy-paste in Xfce / Gnome:
sudo apt install open-vm-tools-desktop # If using Xfce, Gnome...
- First, install VM tools, or on Linux guest, install package open-vm-tools.
sudo apt install open-vm-tools
- Then create a shared folder in the VM settings.
To mount the shared folders in the guest [1]:
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other -o uid=0
For mount this at started, add to /etc/fstab:
# Use shared folders between VMWare guest and host
.host:/ /mnt/hgfs/ fuse.vmhgfs-fuse defaults,allow_other,uid=0 0 0
Some say the share has an impact on the VM performance. In that case, use option noauto
:
# Use shared folders between VMWare guest and host
.host:/ /mnt/hgfs/ fuse.vmhgfs-fuse defaults,allow_other,uid=0,noauto 0 0
Then mount the share manually with sudo mount /mnt/hgfs
.
- Notes
- VMWare mounts the share automatically when it is created and the VM is running. If the VM was off, first power on the VM, then disable and enable back the shared folders. However this has to be done everytime the VM is rebooted.
- Don't forget to exclude shared folders from locate / mlocate scan.
Compile modules vmmon / vmnet on recent kernels
See https://github.com/mkubecek/vmware-host-modules.git.
Enable 3D acceleration (No 3D support is available from the host
)
Add to ~/.vmware/preferences [2]:
mks.gl.allowBlacklistedDrivers = "TRUE"
Hide Menu Bar in Guest
Edit .vmware/preferences [3]:
pref.vmplayer.fullscreen.nobar = "TRUE"
Assuming the shared folders are mounted on /mnt/hgfs, edit /etc/updatedb.conf and add /mnt/hgfs
to pruned dir list:
-PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph"
+PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /mnt/hgfs"
Enable network promiscuous mode on Debian
Create file /etc/systemd/system/vmware-promiscuous.service:
[Unit]
Description=Enable vmware promiscuous mode
After=vmware.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c "chgrp vmnet /dev/vmnet0; chmod g+rw /dev/vmnet0"
ExecStop=/bin/bash -c "chgrp root /dev/vmnet0; chmod g-rw /dev/vmnet0"
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Then enable and start it:
sudo systemctl enable vmware-promiscuous.service
sudo systemctl start vmware-promiscuous.service
Note:
vmware.service
is a generated service, generated bysystemd-sysv-generator
from /etc/init.d/vmware. Unit file is found in /run/systemd/generator.late/vmware.service.