VMware
VMware, Inc. sells a variety of closed-source hypervisors. "VMware" can refer to both the company or its products.
VMware works best on a systemd system and although it can be forced to work on an OpenRC system, it is suboptimal and not recommended.
Installation
When installing VMware Workstation on Gentoo you need to download the bundle from VMware's website.
root #
chmod +x VMware-Workstation-Full-16.1.2-17966106.x86_64.bundle
root #
./VMware-Workstation-Full-16.1.2-17966106.x86_64.bundle
VMware-Workstation-Full-17.5.2-23775571.x86_64.bundle was the latest version that I was able to get to work. Please do test the latest versions and update this note, however for those that just want to use VMware Workstation quickly, then I recommend 17.5.2. Immolo (talk) 03:52, 23 October 2024 (UTC)
Required kernel options
To install and run VMware Workstation on Gentoo you need to enable these kernel options.
[*] Enable loadable module support --->
File systems --->
<*> FUSE (Filesystem in Userspace) support
Misc devices --->
<*> VMware VMCI Driver
If you require VMware VMCI Sockets for host-guest/guest-guest communication, you need to also enable CONFIG_VMWARE_VMCI_VSOCKETS. This is an optional feature and isn't required to run VMware guests.
[*] Networking support --->
Networking options --->
<*> Virtual Socket protocol
<*> VMware VMCI transport for Virtual Sockets
Kernel modules
VMware Workstation 16.0 is known to support up to linux 5.8, and 16.1 works on 5.10 from my testing. If you use an older version of Workstation it will require an older kernel, 15.5 supports up to 5.4, 14.1.7 suppots up to 4.18, and 12.5.9 supports up to 4.12. After a kernel upgrade you will have to rebuild the VMware modules. You can do this by running the following command.
root #
vmware-modconfig --console --install-all
For kernels greater than 6.9 the following workaround enables VMWare Workstation 17.5:
root #
git clone -b tmp/workstation-17.5.2-k6.9.1 https://github.com/nan0desu/vmware-host-modules.git
root #
cd vmware-host-modules/
root #
make
root #
make install
systemd services
If you are using systemd you might want to create some systemd service files to start VMware services on startup using systemd.
[Unit]
Description=VMware daemon
Requires=vmware-usbarbitrator.service
Before=vmware-usbarbitrator.service
After=network.target
[Service]
ExecStart=/etc/init.d/vmware start
ExecStop=/etc/init.d/vmware stop
PIDFile=/var/lock/subsys/vmware
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
[Unit]
Description=VMware USB Arbitrator
Requires=vmware.service
After=vmware.service
[Service]
ExecStart=/usr/bin/vmware-usbarbitrator
ExecStop=/usr/bin/vmware-usbarbitrator --kill
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
If you want to enable networking, add this service:
[Unit]
Description=VMware Networks
Wants=vmware-networks-configuration.service
After=vmware-networks-configuration.service
[Service]
Type=forking
ExecStartPre=-/sbin/modprobe vmnet
ExecStart=/usr/bin/vmware-networks --start
ExecStop=/usr/bin/vmware-networks --stop
[Install]
WantedBy=multi-user.target
If you want to connect to your VMware Workstation from another server:
[Unit]
Description=VMware Workstation Server
Requires=vmware.service
After=vmware.service
[Service]
ExecStart=/etc/init.d/vmware-workstation-server start
ExecStop=/etc/init.d/vmware-workstation-server stop
PIDFile=/var/lock/subsys/vmware-workstation-server
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Uninstallation
If you use systemd and created systemd service files, you should delete them first:
root #
systemctl disable --now vmware.service vmware-networks-server.service vmware-workstation-server.service
root #
rm /etc/systemd/system/vmware.service /etc/systemd/system/vmware.service /etc/systemd/system/vmware-networks-server.service /etc/systemd/system/vmware-workstation-server.service
VMware Workstation has an uninstaller, and can be uninstalled.
root #
vmware-installer -u vmware-workstation
Gentoo guests
Running Gentoo Linux as a guest inside of VMware Workstation requires enabling some kernel modules and installing app-emulation/open-vm-tools.
Kernel Configuration
When working with VMware ESXi, despite the Ethernet emulator stating it would be an Intel e1000e, the guest OS was presented with an AMD Ethernet adapter. Both are included for completeness as well as the e1000.
Device Drivers --->
[*] Fusion MPT device support --->
<*> Fusion MPT ScsiHost drivers for SPI
Misc devices --->
<*> VMware Balloon Driver
<*> VMware VMCI Driver
SCSI device support --->
[*] SCSI low-level drivers --->
<*> VMware PVSCSI driver support
[*] Network device support --->
[*] Ethernet driver support --->
[*] AMD devices
<*> AMD 8111 (new PCI LANCE) support
<*> AMD PCnet32 PCI support
[*] Intel devices
<*> Intel(R) PRO/1000 Gigabit Ethernet support
<*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support
<*> VMware VMXNET3 ethernet driver
Input device support --->
[*] Keyboards --->
<*> AT keyboard
[*] Mice --->
[*] PS/2 mouse
[*] Virtual mouse (vmmouse)
Graphics support --->
<*> DRM driver for VMware Virtual GPU
[*] Enable mksGuestStats instrumentation of vmwgfx by default
Frame buffer Devices --->
<*> Support for frame buffer devices --->
File systems --->
<*> FUSE (Filesystem in Userspace) support
The
VMware Balloon Driver
option is visible only once the VMware VMCI Driver
option is enabled, and the Enable framebuffer console under vmwgfx by default
option is visible only once the Support for frame buffer devices
option is enabled.The keywords for the above options are:
- CONFIG_FUSION
- CONFIG_FUSION_SPI
- CONFIG_NET_VENDOR_AMD
- CONFIG_AMD8111_ETH
- CONFIG_PCNET32
- CONFIG_NET_VENDOR_INTEL
- CONFIG_E1000
- CONFIG_E1000E
- CONFIG_KEYBOARD_ATKBD
- CONFIG_VMWARE_BALLOON
- CONFIG_VMWARE_VMCI
- CONFIG_VMWARE_PVSCSI
- CONFIG_VMXNET3
- CONFIG_MOUSE_PS2_VMMOUSE
- CONFIG_DRM_VMWGFX
- CONFIG_DRM_VMWGFX_MKSSTATS
- CONFIG_FB
- CONFIG_FUSE_FS
If you require VMware VMCI Sockets for host-guest/guest-guest communication, you need to also enable CONFIG_VMWARE_VMCI_VSOCKETS. This is an optional feature and isn't required to run VMware guests.
[*] Networking support --->
Networking options --->
<*> Virtual Socket protocol
<*> VMware VMCI transport for Virtual Sockets
Emerge
Install app-emulation/open-vm-tools:
root #
emerge --ask app-emulation/open-vm-tools
vmware-tools service
Start the service:
root #
rc-service vmware-tools start
And, add the vmware-tools service to the default run level.
root #
rc-update add vmware-tools
See also
- Virtualization — the concept and technique that permits running software in an environment separate from a computer operating system.