How To Install Kali Linux In Vmware

How To Install Kali Linux In Vmware

Reading time1 min
#Linux#Virtualization#Cybersecurity#KaliLinux#VMware#PenetrationTesting

Practical Guide: Installing Kali Linux in VMware Workstation

Kali Linux is a go-to platform for penetration testing, but running it directly on hardware can complicate your workflow, especially if you’re switching contexts or need a disposable environment. Virtualization solves this. Here’s how to provision a robust Kali VM using VMware Workstation Player 17.5.x on a typical x86-64 host with UEFI firmware.


Prerequisites

  • VMware Workstation Player 17.5.x (free for personal use), or VMware Workstation Pro if available.
  • Kali Linux 2024.1 ISO, official release from kali.org
  • CPU with VT-x/AMD-V enabled at BIOS/UEFI layer
  • Minimum 4GB RAM on host (Kali needs at least 2GB for practical use)
  • Stable internet connection

Note: Attempting more advanced tasks (malware analysis, kernel dev) may require nested virtualization or additional customization.


Step 1: VMware Installation

Straightforward—download from VMware, execute the binary installer:

# Windows example; Linux users refer to .bundle package instructions
VMware-workstation-full-17.5.0-22583795.exe

Default installation path is adequate for most scenarios. Verify that the kernel modules or services loaded successfully (vmware --version).


Step 2: Prepare the Kali VM

Create New VM:

  • Launch VMware.
  • Select Create a New Virtual Machine.
  • Installer disc image file (iso): Point to kali-linux-2024.1-installer-amd64.iso (SHA256 validated).
  • Guest OS: Set as Linux > Debian 11.x 64-bit (current Kali tracks Debian 11/bookworm).

Allocation:

SettingRecommendedNotes
CPUs2Quad-core host: use 2 vCPUs
RAM2-4 GB3GB+ if running GUI tools
Disk size30 GB (dynamic)Increase if needed
NetworkNAT (default)Use bridged for lab configs

Known issue: VMware auto-recognition sometimes misidentifies Kali as Ubuntu/Debian. Always specify correct profile to avoid lingering kernel or driver oddities.


Step 3: Initial Boot and OS Installation

Power on the new VM.

  • Hit ESC if you prefer text install; otherwise, choose Graphical Install.
  • Set language, location, keyboard.
  • Hostname: use a descriptive value, e.g. kali-lab01.
  • Domain: leave blank unless integrating with AD/DNS infra.
  • Username: post-2020 images default to non-root user setup (e.g., kali/kali). Adjust as required.

Disk partitioning:

  • "Guided - use entire disk" is fine for all-in-one VMs.
  • Accept default layouts unless specific forensic or crypto lab requirements.

Let the installer complete package pulls and disk writes. Installation logs available on console (Ctrl+Alt+F4) if troubleshooting is required.


Step 4: GRUB and Finalization

If prompted for bootloader location, target /dev/sda.
Note: Misplacing GRUB (e.g., onto /dev/sdb) leads to non-bootable VMs—seen occasionally when residual disks are left mounted.

Before first reboot, disconnect the ISO from the virtual CD device, preventing installer loopbacks.


Step 5: Post-Install: System Update & VMware Tools

Critical: Always update Kali before installing tools.

sudo apt update
sudo apt full-upgrade -y
# If using custom apt sources, verify mirrors before upgrade.

VMware Tools (recommended: open-vm-tools-desktop for desktop VMs):

sudo apt install open-vm-tools-desktop -y
sudo systemctl enable --now vmtoolsd
sudo reboot

Symptoms of not installing tools: clipboard/screen resizing fails, laggy mouse integration.


Troubleshooting and Optimization

ProblemSolution
VM boots to black screenConfirm VT-x/AMD-V enabled in BIOS.
No networkCheck that Network Adapter is NAT/Bridged; reattach if missing.
Install slow/hangs on packageChange to wired connection; retry.
“Failed to start NetworkManager”Ignore on minimal install, or install network-manager manually.
Screen resizing failsReinstall open-vm-tools-desktop; verify X11 is running.

Practical tip: For hardened labs, disable clipboard integration and USB passthrough in VM settings to reduce attack surface.


Example: Automated Deployment via VMX/Batch

For repeated lab builds, copy the .vmx template and use preseeded ISOs:

# kali-template.vmx snippet
memsize = "4096"
numvcpus = "2"
ethernet0.connectionType = "nat"

Clone directory, update disk UUID, and start new jobs.


Summary

A VM-based Kali installation gives rapid rollback, snapshotting, and safe lab isolation. VMware’s device support is broadly solid; typical rough edges concern guest integration (shared folders, display drivers on bleeding-edge releases). Production testers sometimes prefer libvirt or QEMU for faster snapshot orchestration—trade-offs exist.

Gotcha: After big Kali updates (e.g., rolling from 2023.x to 2024.x), revalidate VMware Tools and kernel headers for dkms module compatibility.

For advanced integration (nested ESXi, PCI pass-through), tailor base install with custom kernel boot parameters—beyond scope here.


Note: For scripting, provisioning, or infrastructure-as-code deployment of Kali VMs, consider using Packer with VMX templates and preseed.cfg for consistency across environments.