VMware

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.


This article is a stub. You can help by expanding it.
Resources

VMware, Inc. sells a variety of closed-source hypervisors. "VMware" can refer to both the company or its products.

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

Required kernel options

To install and run VMware Workstation on Gentoo you need to enable these kernel options.

KERNEL
[*] Enable loadable module support --->
[*] Networking support  --->
        Networking options  --->
            <*> Virtual Socket protocol
            <*>   VMware VMCI transport for Virtual Sockets 
    File systems  --->
        <*> FUSE (Filesystem in Userspace) support 
    Misc devices  --->
        <*> VMware VMCI Driver

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

systemd services

If you are using systemd you might want to create some systemd service files to start VMware services on startup using systemd.

FILE /etc/systemd/system/vmware.service
[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
FILE /etc/systemd/system/vmware-usbarbitrator.service
[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:

FILE /etc/systemd/system/vmware-networks-server.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:

FILE /etc/systemd/system/vmware-workstation-server.service
[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.

KERNEL
[*] Networking support  --->
        Networking options  --->
            <*> Virtual Socket protocol
            <*>   VMware VMCI transport for Virtual Sockets 
    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
    File systems  --->
        <*> FUSE (Filesystem in Userspace) support

The keywords for the above options are:

  • 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_PVSCSI
  • CONFIG_VMXNET3
  • CONFIG_VMWARE_VMCI
  • CONFIG_VMWARE_VMCI_VSOCKETS
  • CONFIG_FUSE_FS
  • CONFIG_FUSION
  • CONFIG_FUSION_SPI

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.