VMWare

Fix Segmentation fault on 5.8+ Kernel

VMWare v15.5.7 does not work with Linux Kernel 5.8+. To resolve issue, do following:

git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules/
git checkout workstation-15.5.7
git pull
make
sudo make install
sudo /etc/init.d/vmware restart

sudo nano /usr/bin/vmware

# Replace this:
if "$BINDIR"/vmware-modconfig --appname="VMware Workstation" --icon="vmware-workstation" &&
   vmware_module_exists $vmmon; then
   exec "$libdir"/bin/"vmware" "$@"
fi

# With this:
if vmware_module_exists $vmmon; then
   exec "$libdir"/bin/"vmware" "$@"
fi

Networking

Permanent IP address/etc/vmware/vmnet8/dhcpd.conf:

host test {
    hardware ethernet 0:50:56:21:49:12;
    fixed-address 192.168.65.111;
}

Custom domain name networking_config:

...
VNET_8_DHCP_PARAM_DOMAIN_NAME "example.net"
...

## Migrate config
# vmware-networks --migrate-network-settings networking_config

VMWare VM configuration

VM config file:

    # CD-ROM prefferences
    sata0:1.present = "TRUE"
    sata0:1.fileName = "/root/tmp/unlocker-master/tools/darwin.iso"
    sata0:1.deviceType = "cdrom-image"

# disable VMWare tools time sync
tools.syncTime = "FALSE"

# disable gathering debugging information
vmx.buildType = "release"

# disable page sharing
sched.mem.pshare.enable = "FALSE"

# disable memory tremming
MemTrimRate = "0"

# disable isolation tools (drug and drop, etc)
isolation.tools.copy.disable = "TRUE"
isolation.tools.dnd.disable = "TRUE"
isolation.tools.paste.disable = "TRUE"

# enable pass CPU performance countes to guest
vpmc.enable = "TRUE"

# enable virtual machine execution mode to VT-x/EPT or AMD-RVI (run virtual machines virtual machine - allow nested virtualization)
vhv.enable = "TRUE"

# Virtualization engine mode
#
# Intel VT-x or AMD-V
monitor.virtual_mmu = "software"
monitor.virtual_exec = "hardware"
#
# Automatic
monitor.virtual_mmu = "automatic"
monitor.virtual_exec = "automatic"
#
# Intel VT-x/EPT or AMD-RVI
monitor.virtual_mmu = "hardware"
monitor.virtual_exec = "hardware"

Linux installation

https://pubs.vmware.com/workstation-12/index.jsp#com.vmware.ws.using.doc/GUID-1F5B1F14-A586-4A56-83FA-2E7D8333D5CA.html

sh VMware-Workstation.bundle --console --custom --eulas-agreed --set-setting=vmware-workstation serialNumber <SN>
    --required  # silent installation

# deafults:
# /var/lib/vmware/Shared VMs

# if linux without graphic
apt install xfonts-base libxinerama-dev libxcursor-dev libxtst-dev

# uninstall command
vmware-installer -u vmware-workstation

VMWare command line

# increase virtual disk space (shut down VM, make sure that there are no snapshots)
vmware-vdiskmanager -x <VALUE>GB <path_to.vmdk>

# show running VM's
vmrun list

# start VM in background
# If "Error: The file is already in use vmrun" delete *.lck dir (may be happen if vm was moved)
vmrun start <path_to_vmx> [gui|nogui]

# stop VM
stop <path_to_vmx> [hard|soft]

# clonning VM
vmrun clone <path_to_vmx> <path_to_dest_vmx> full|linked [-snapshot=from_snapshot_name] [-cloneName=Name]

# open GUI net configuration
vmware-netcfg

# NAT config (port forwarding, etc.)
/etc/vmware/vmnet8/nat/nat.conf

# reload network (apply network config changes)
vmware-networks --stop && vmware-networks --start

# create cnapshot
vmrun snapshot <path_to.vmx> <snapshot_name>

# show snapshots
vmrun listSnapshots <path_to.vmx> [showTree]

# set VM state to a snapshot
vmrun revertToSnapshot <path_to.vmx> <snapshot_name>

# remove a snapshot from a VM
vmrun deleteSnapshot <path_to.vmx> <snapshot_name> [andDeleteChildren]