Setting up Kali Linux in VirtualBox gives you a full penetration testing environment without touching your main operating system. You can test security tools, practice ethical hacking techniques, and learn cybersecurity skills in a completely isolated environment. If something breaks, you simply roll back to a snapshot. Your host system stays untouched.
This guide walks through the complete installation process for Kali Linux on VirtualBox, from downloading the right files to configuring guest additions for the best performance. I’ll cover both methods: using pre-built VirtualBox images (quick setup) and installing from ISO (full control over configuration).
Related: Kali Linux Commands: Essential Guide for Penetration Testing
What Do You Need Before Installing Kali Linux in VirtualBox?
Before downloading anything, check your system meets the minimum requirements for running Kali Linux smoothly in VirtualBox.
Hardware requirements:
- At least 4GB of RAM (8GB recommended if you want to run multiple VMs)
- 25GB of free disk space (50GB or more if you plan to install many tools)
- A 64-bit processor with virtualization support (Intel VT-x or AMD-V)
- Modern CPU from the last 5-7 years
Software requirements:
- VirtualBox installed (version 6.0 or later, though 7.0 is current)
- Either a Kali Linux ISO file or a pre-built VirtualBox image
- 7-Zip or a similar extraction tool for the pre-built image
Most modern computers have virtualization support, but it’s often disabled in the BIOS by default. You’ll need to enable it before VirtualBox can create 64-bit virtual machines. I’ll show you how to check this in a moment.
How Do You Enable Virtualization in Your BIOS?
Virtualization extensions (Intel VT-x or AMD-V) let your processor run virtual machines efficiently. Without these enabled, VirtualBox won’t let you create 64-bit virtual machines, and performance will be terrible even for 32-bit ones.
To check if virtualization is enabled on Windows, open Task Manager (Ctrl+Shift+Esc), click the Performance tab, and look at the CPU section. You’ll see a line that says “Virtualization: Enabled” or “Virtualization: Disabled.”
On Linux, run this command in the terminal:
egrep -c '(vmx|svm)' /proc/cpuinfo
If the output is 0, virtualization is disabled. Any number higher than 0 means it’s available.
Enabling virtualization in BIOS:
The exact steps vary by manufacturer, but the general process is consistent:
- Restart your computer
- Press the BIOS key during startup (usually F2, F10, Del, or Esc. Watch the boot screen for the correct key)
- Navigate to Advanced settings or CPU Configuration
- Look for Intel VT-x, Intel Virtualization Technology, AMD-V, or SVM Mode
- Enable the setting
- Save changes and exit (usually F10)
The setting might be under different menu names. On Dell systems, it’s often under “Virtualization Support.” On HP, it might be under “System Configuration.” MSI motherboards typically have it under “OC” or “Overclocking” settings.
After enabling virtualization and restarting, verify it’s active using the methods above before proceeding with the Kali Linux VirtualBox installation.
Where Can You Download Kali Linux for VirtualBox?
Kali Linux offers two download options for VirtualBox users. The pre-built image is faster to set up. The ISO installer gives you more control over partitioning and software selection.
Downloading the Pre-Built Kali Linux VirtualBox Image
Visit the official Kali Linux website at kali.org/get-kali and navigate to the Virtual Machines section. You’ll see download cards for different virtualization platforms. Click the VirtualBox card.
The current version as of late 2025 is Kali Linux 2025.3. The file is distributed as a 7z archive (compressed format) and weighs around 3-4GB. The download page shows the exact file size and SHA256 checksum for verification.
Select the architecture matching your system. For most modern computers, that’s 64-bit (amd64). The download begins immediately. The filename will look like kali-linux-2025.3-virtualbox-amd64.7z.
After downloading, verify the checksum to ensure the file downloaded correctly without corruption. On Windows, use PowerShell:
Get-FileHash kali-linux-2025.3-virtualbox-amd64.7z -Algorithm SHA256
On Linux, use:
sha256sum kali-linux-2025.3-virtualbox-amd64.7z
Compare the output with the checksum listed on the download page. If they match, your download is good. If not, download it again.
Downloading the Kali Linux ISO File
Alternatively, download the ISO installer from kali.org/get-kali. Click on “Installer Images” instead of Virtual Machines. You’ll see several options:
- Installer (recommended for most users, around 4GB)
- Live (boots without installing, useful for testing)
- Network installer (minimal download, fetches packages during installation)
For VirtualBox installation, the standard Installer image works best. It includes the core tools and desktop environment. The filename looks like kali-linux-2025.3-installer-amd64.iso.
Verify the ISO checksum just like the pre-built image. This step catches corrupted downloads that would cause installation problems later.
How Do You Import the Pre-Built Kali Linux VirtualBox Image?
The pre-built image is the fastest way to get Kali Linux running in VirtualBox. You skip the entire installation process and boot directly into a working system.
Extracting the 7z archive:
The downloaded file is compressed with 7-Zip. You need 7-Zip, WinRAR, or a similar tool to extract it. On Windows, right-click the .7z file and select “7-Zip > Extract Here” or “Extract to kali-linux-2025.3-virtualbox-amd64.”
On Linux, install p7zip if you don’t have it:
sudo apt install p7zip-full
Then extract:
7z x kali-linux-2025.3-virtualbox-amd64.7z
Extraction creates a folder containing two files: a .vdi file (the virtual hard disk) and a .vbox file (the VM configuration). The .vbox file is what VirtualBox needs to import the machine.
Importing into VirtualBox:
Launch VirtualBox. Click “Add” in the toolbar (or go to Machine > Add). Navigate to the extracted folder and select the .vbox file. Click “Open.”
VirtualBox loads the virtual machine configuration. You’ll see the VM appear in the left sidebar with the name “kali-linux-2025.3-virtualbox-amd64” or similar. The VM is now registered and ready to start.
Before booting, verify the settings. Select the VM and click “Settings.” Check these key areas:
System settings:
- Base Memory: Should be at least 2048 MB. If you have 8GB or more of host RAM, allocate 4096 MB for better performance.
- Processors: Allocate 2 CPU cores minimum. More cores improve performance for CPU-intensive tasks.
Display settings:
- Video Memory: Set to 128 MB (the maximum VirtualBox allows)
- Graphics Controller: VMSVGA works well for Kali
- Enable 3D Acceleration if your host system supports it
Storage settings:
- The .vdi file should be attached to the SATA controller
- Change the type to SSD for better performance (right-click the disk, select “Solid-state Drive”)
Network settings:
- NAT is fine for most purposes (lets the VM access the internet through your host)
- Bridged Adapter if you want the VM to appear as a separate machine on your network
After verifying settings, click “OK.” Select the VM and click “Start.” Kali Linux boots up. The default credentials are:
- Username:
kali - Password:
kali
You should change these default credentials immediately after your first login for security. The pre-built image is now ready to use.
How Do You Install Kali Linux from ISO in VirtualBox?
Installing from ISO gives you full control over the installation. You choose the desktop environment, select which tools to install, and configure disk partitioning exactly how you want it.
Creating a New Virtual Machine for Kali Linux
Open VirtualBox and click “New” in the toolbar. The “Create Virtual Machine” wizard opens.
Name and operating system:
- Name: Enter “Kali Linux” or something descriptive
- Folder: Choose where to store VM files (needs 25GB+ of free space)
- ISO Image: Click the dropdown and select “Other,” then browse to your downloaded Kali Linux ISO
- Type: Linux
- Version: Debian (64-bit)
VirtualBox detects the ISO and may offer to use “Unattended Install.” Skip this option. Click “Next” to continue.
Hardware allocation:
- Base Memory: Allocate at least 2048 MB (2GB). If you have 8GB+ of host RAM, use 4096 MB.
- Processors: Assign 2 CPUs minimum. This significantly improves performance.
Click “Next.”
Virtual hard disk:
- Select “Create a Virtual Hard Disk Now”
- Disk Size: Set to at least 25 GB. I recommend 50 GB if you plan to install additional tools.
- Pre-allocate Full Size: Leave unchecked (dynamically allocated disks grow as needed and save host disk space initially)
Click “Next,” then “Finish.” The virtual machine appears in the VirtualBox manager, but it’s not yet configured optimally.
Optimizing VirtualBox Settings for Kali Linux
Select your new VM and click “Settings.” We need to adjust several settings for better performance and usability.
Display settings:
- Video Memory: Increase to 128 MB
- Graphics Controller: Select VMSVGA
- Enable 3D Acceleration: Check this box if available
Storage settings:
- Select the hard disk under SATA Controller
- In the Attributes pane on the right, check “Solid-state Drive”
- Verify the ISO file is attached to the IDE controller (it should say “kali-linux-2025.3-installer-amd64.iso”)
Network settings:
- Attached to: NAT (default, works for most users)
- Adapter Type: Paravirtualized Network (virtio-net) for better performance
USB settings:
- Enable USB Controller
- Select USB 3.0 (xHCI) Controller if you plan to use USB devices
Shared Clipboard and Drag’n’Drop:
- Shared Clipboard: Bidirectional
- Drag’n’Drop: Bidirectional
These features won’t work until you install VirtualBox Guest Additions later, but setting them now saves time.
Click “OK” to save all settings. The virtual machine is now properly configured and ready for Kali Linux installation.
Running the Kali Linux Installation in VirtualBox
Select the Kali Linux VM and click “Start.” VirtualBox boots from the attached ISO. The Kali Linux boot menu appears with several options.
Select “Graphical Install” using arrow keys and press Enter. The graphical installer is more intuitive than the text-based installer and works identically.
Installation steps:
Language selection: Choose your preferred language for the installation process and the installed system. English is the default.
Location: Select your country. This determines timezone and mirrors for downloading packages.
Keyboard configuration: Choose your keyboard layout. The installer detects it reasonably well, but verify by typing in the test field.
Network configuration: The installer attempts to configure networking automatically via DHCP. It usually succeeds. If it fails, you can configure it manually or skip it (you can set up networking after installation).
Hostname: Enter a name for your Kali machine. The default “kali” is fine for a VM. Choose something descriptive if you’re running multiple Kali installations.
Domain name: Leave blank unless you’re joining a domain (rare for personal VMs).
User account setup:
- Full name: Your actual name or alias
- Username: “kali” is standard, but choose whatever you prefer
- Password: Choose a strong password (you’ll type this frequently, so balance security with convenience)
Disk partitioning:
This is where you choose how to format the virtual hard disk. For a VirtualBox VM, the simplest option works perfectly:
Select “Guided – use entire disk.” The installer shows the virtual disk VirtualBox created. Select it and press Continue.
The next screen asks about partitioning scheme:
- “All files in one partition” is simplest and recommended for beginners
- “Separate /home partition” keeps user data separate (useful if you’ll reinstall frequently)
- “Separate /home, /var, and /tmp partitions” offers more granular separation
For a VM, “All files in one partition” works great. Select it and Continue.
The installer shows a summary of the partition layout. Review it and select “Finish partitioning and write changes to disk.”
Confirm “Yes” to write changes. The installer formats the virtual disk and begins installing the base system. This takes 5-10 minutes.
Software selection:
After installing the base system, the installer asks which desktop environment and tools to install.
Desktop environment: Kali offers several options:
- Xfce (default, lightweight, recommended for VMs)
- GNOME (more modern but heavier)
- KDE Plasma (feature-rich but resource-intensive)
- None (command-line only)
I recommend Xfce for VirtualBox installations. It performs well with limited resources and provides a complete desktop experience.
Metapackages: These are collections of tools grouped by purpose:
- kali-linux-default (recommended, includes standard tools)
- kali-linux-large (comprehensive tool set, requires more disk space)
- kali-linux-everything (installs all tools, not recommended unless you have 100GB+ disk space)
Select “kali-linux-default” for your first installation. You can always install additional tools later using apt.
The installer downloads and installs packages. This takes 15-30 minutes depending on your internet connection. The VM is downloading packages through your host’s network connection, so speed varies.
GRUB bootloader:
The installer asks where to install the GRUB bootloader. Select “Yes” to install GRUB to the master boot record. Choose the virtual disk (/dev/sda typically) as the target.
Installation complete:
The installer finishes and prompts you to reboot. Remove the installation media by going to Devices > Optical Drives > Remove disk from virtual drive. Click “Continue” to reboot.
Kali Linux boots from the virtual hard disk now. You see the GRUB menu, then the Kali Linux login screen.
Log in with the username and password you created during installation. You now have a fully functional Kali Linux installation in VirtualBox.
How Do You Install VirtualBox Guest Additions on Kali Linux?
VirtualBox Guest Additions significantly improve the virtual machine experience. You get proper screen resolution adjustment, clipboard sharing between host and guest, drag-and-drop file transfers, and better graphics performance.
Kali Linux 2019.3 and newer automatically detect when they’re running in VirtualBox and attempt to install guest additions during the installation process. If this automatic installation worked, you’re already set. Test by maximizing the VM window. If the desktop resolution adjusts automatically to fill the window, guest additions are working.
If guest additions aren’t working (common symptom: the desktop stays at 800×600 regardless of window size), manual installation is straightforward.
Method 1: Install from Kali repositories (recommended):
This method is the most reliable for Kali Linux in VirtualBox. Open a terminal in Kali and run these commands:
sudo apt update
sudo apt install -y virtualbox-guest-x11
sudo reboot
The first command updates the package list. The second installs the guest additions package maintained by Kali developers. This package is specifically compiled for Kali’s kernel. The reboot activates the new drivers.
After rebooting, test the functionality:
- Resize the VirtualBox window. The Kali desktop should resize automatically.
- Copy text on your host machine, then try pasting it in Kali (Ctrl+V)
- Drag a file from your host desktop into the Kali VM window
If these features work, guest additions are successfully installed.
Method 2: Install from VirtualBox ISO (if Method 1 fails):
Sometimes the repository method doesn’t work due to kernel version mismatches. In those cases, install directly from the VirtualBox Guest Additions ISO:
First, install required packages:
sudo apt update
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
The build-essential package provides compilers needed to build kernel modules. DKMS (Dynamic Kernel Module Support) automatically recompiles modules when the kernel updates. The linux-headers package provides kernel headers matching your running kernel.
Next, insert the Guest Additions CD from the VirtualBox menu: Devices > Insert Guest Additions CD image.
A CD icon appears on the Kali desktop. Open a terminal and run:
cd /media/cdrom
sudo sh ./VBoxLinuxAdditions.run
The installation script compiles and installs the guest additions. Watch for “Building” and “Starting” messages. The process takes 1-2 minutes.
If you see errors about kernel headers not found, the linux-headers package doesn’t match your kernel version. Check your kernel version:
uname -r
Then install the matching headers explicitly:
sudo apt install linux-headers-4.19.0-kali1-amd64
Replace the version string with your actual kernel version from the uname -r output.
After successful installation, reboot:
sudo reboot
The guest additions load automatically on boot. Test the functionality as described in Method 1.
Troubleshooting guest additions installation:
If neither method works, check these common issues:
Screen still doesn’t resize: Make sure 3D acceleration is enabled in VirtualBox settings and that you allocated at least 128 MB of video memory.
Clipboard doesn’t work: Verify that Shared Clipboard is set to “Bidirectional” in VirtualBox settings (Devices > Shared Clipboard > Bidirectional).
Kernel module build fails: Your kernel is probably newer than the guest additions version. Update VirtualBox to the latest version on your host system, then try the installation again.
Guest additions service not running: Check the service status:
sudo systemctl status vboxadd
If it’s not running, start it manually:
sudo systemctl start vboxadd
How Do You Configure Shared Folders Between Host and Kali Linux?
Shared folders let you transfer files between your host machine and Kali Linux VM without network configuration or USB drives. VirtualBox Guest Additions must be installed first.
In VirtualBox Manager, select your Kali VM and click Settings. Go to Shared Folders. Click the folder icon with a plus sign to add a new shared folder.
Configure the shared folder:
- Folder Path: Browse to a folder on your host system you want to share
- Folder Name: Give it a short name (no spaces). This is how it appears in Kali. Example: “shared” or “transfer”
- Auto-mount: Check this box (makes the folder available immediately on boot)
- Mount Point: Leave blank for default, or specify a path like /mnt/shared
- Make Permanent: Check this box (otherwise the share disappears when you shut down the VM)
Click OK, then OK again to close settings.
Boot or reboot your Kali VM. The shared folder appears at /media/sf_foldername (where foldername is the name you chose).
Your Kali user needs permission to access shared folders. Add your user to the vboxsf group:
sudo usermod -aG vboxsf $USER
Log out and log back in for the group change to take effect. You can now access files in /media/sf_shared (or whatever you named it):
cd /media/sf_shared
ls
Files appear from your host machine. Any files you create or modify in this folder are immediately visible on both the host and guest systems.
For easier access, create a symlink in your home directory:
ln -s /media/sf_shared ~/shared
Now you can access the shared folder from ~/shared instead of typing the full path.
What Are Common Issues When Installing Kali Linux in VirtualBox?
Several problems crop up regularly during Kali Linux VirtualBox installation. Here’s how to fix them.
VirtualBox only shows 32-bit options:
Cause: Virtualization extensions are disabled in BIOS or you’re running VirtualBox inside another VM (nested virtualization).
Fix: Reboot and enable Intel VT-x or AMD-V in your BIOS as described earlier. If you’re on Windows and recently installed Hyper-V or WSL2, disable Hyper-V as it conflicts with VirtualBox. Run this in PowerShell as administrator:
bcdedit /set hypervisorlaunchtype off
Reboot after running this command.
Kali boots to a black screen:
Cause: Graphics controller incompatibility or insufficient video memory.
Fix: Shut down the VM. Go to Settings > Display. Try different graphics controllers:
- Try VMSVGA first
- If that fails, try VBoxVGA
- Disable 3D acceleration temporarily
Increase video memory to 128 MB if it’s lower. Start the VM again.
Installation is extremely slow:
Cause: Not enough RAM or CPU cores allocated, or host system is under heavy load.
Fix: Allocate more resources in VirtualBox settings. Give the VM at least 2 CPU cores and 4GB of RAM if your host can spare it. Close other applications during installation. Make sure the virtual disk type is set to SSD.
Network not working in Kali:
Cause: NAT network configuration issue or outdated VirtualBox version.
Fix: Go to Settings > Network. Try changing the adapter type to “Paravirtualized Network (virtio-net).” If NAT doesn’t work, try Bridged Adapter mode instead. Update VirtualBox to the latest version.
Guest additions won’t install:
Cause: Missing kernel headers or kernel version mismatch.
Fix: Update Kali completely first:
sudo apt update
sudo apt full-upgrade
sudo reboot
After updating, install via the repository method described earlier. If compilation still fails, check /var/log/vboxadd-install.log for specific error messages.
VM is slow or laggy:
Cause: Insufficient resources or no guest additions.
Fix: Install guest additions first. Then increase RAM allocation to 4GB and CPU cores to 2 or more. Enable PAE/NX in Settings > System > Processor. Set video memory to 128 MB and enable 3D acceleration. Convert the virtual disk type to SSD in storage settings.
How Do You Take Snapshots of Your Kali Linux VM?
Snapshots are your safety net in VirtualBox. They capture the complete state of your VM at a specific moment. If you break something while testing a tool or misconfigure the system, you revert to the snapshot in seconds.
Before making significant changes (installing new software, modifying system files, testing potentially destructive tools), take a snapshot:
In VirtualBox Manager, select your running or powered-off Kali VM. Click the “Snapshots” button in the toolbar (it looks like three horizontal lines with circles).
Click “Take” to create a new snapshot. Give it a descriptive name like “Fresh install” or “Before installing custom tools” and optionally add a description explaining what’s in this snapshot.
Click “OK.” VirtualBox creates the snapshot. For a powered-off VM, this is instant. For a running VM, it takes a few seconds as VirtualBox saves RAM contents.
The snapshot appears in the snapshot tree. You can create multiple snapshots and form a tree structure (snapshots of snapshots).
To restore a snapshot, select it in the snapshot tree and click “Restore.” VirtualBox warns that this will discard the current state. Confirm to revert.
The VM returns to exactly the state it was in when you took the snapshot. All files, installed programs, and even running processes are restored.
Snapshot best practices:
Take a snapshot after initial installation and guest additions setup. Label it “Clean install.” This is your baseline.
Take snapshots before major system changes or before starting a new project. Label them descriptively.
Delete old snapshots you don’t need anymore to free up disk space. Right-click a snapshot and select “Delete.”
Don’t rely on snapshots as your only backup. They’re stored with the VM files. If the host disk fails or the VM files corrupted, you lose snapshots too.
How Do You Update Kali Linux Running in VirtualBox?
Kali Linux is a rolling distribution. New packages and updates are released constantly. Regular updates keep your tools current and fix security vulnerabilities.
To update Kali Linux in VirtualBox, open a terminal and run:
sudo apt update
sudo apt full-upgrade
The first command refreshes the package list from Kali’s repositories. The second downloads and installs updates for all installed packages.
During the upgrade process, you might see prompts asking whether to keep modified configuration files or install the maintainer’s version. For most cases, choose “Y” to install the maintainer’s version unless you’ve heavily customized configuration files.
The upgrade downloads hundreds of megabytes to several gigabytes, depending on how long since your last update. On a rolling distribution, I recommend updating weekly at a minimum.
After major upgrades, especially kernel updates, reboot the VM:
sudo reboot
Guest additions might need to be reinstalled after kernel updates. If your screen resolution stops adjusting or the clipboard stops working after a kernel update, reinstall guest additions using Method 1 from the earlier section.
Upgrading to a new Kali version:
Kali releases major versions quarterly (2025.1, 2025.2, etc.). On a rolling distribution, you don’t need to reinstall for these releases. Your regular apt full-upgrade commands already keep you on the latest version.
If you want to verify your Kali version:
cat /etc/os-release
This shows your current version, codename, and other distribution information.
Can You Clone Your Kali Linux VirtualBox VM?
Cloning creates an exact copy of your VM. This is useful when you want multiple Kali instances for different projects or when you want a backup copy before making risky changes.
In VirtualBox Manager, right-click your Kali VM and select “Clone.” The Clone Virtual Machine wizard opens.
Give the clone a new name like “Kali Linux – Testing” or “Kali Linux – Project X.” Choose whether to create a Full Clone (complete independent copy) or a Linked Clone (shares the original’s virtual disk, saves space but depends on the original).
For most purposes, choose Full Clone. It uses more disk space but creates a truly independent VM you can modify without affecting the original.
Click “Next,” then choose whether to clone the current state only or the current state plus all snapshots. Cloning with snapshots preserves your entire snapshot tree in the clone.
Click “Clone.” VirtualBox creates the copy. This takes several minutes for a full clone as it copies the entire virtual disk.
The cloned VM appears in VirtualBox Manager as a separate machine. You can start both the original and clone simultaneously if your system has enough resources.
Remember to change the hostname in the cloned VM to avoid confusion:
sudo hostnamectl set-hostname kali-testing
Reboot for the hostname change to take effect.
What Should You Do First After Installing Kali Linux in VirtualBox?
Your fresh Kali installation needs a few configuration steps before it’s ready for serious use.
Change the default password:
The pre-built image uses kali/kali credentials. Change this immediately:
passwd
Enter your current password (kali), then type a new strong password twice.
Update the system:
Fresh installations are often months old. Update everything:
sudo apt update
sudo apt full-upgrade -y
Install additional tools if needed:
The default installation includes core tools. If you need specific tools, install them:
sudo apt install <tool-name>
Browse available tools:
apt-cache search kali-
This shows all Kali metapackages and tools.
Configure network settings:
The default NAT networking works for most scenarios. If you need the VM to appear as a separate machine on your network (for testing against other machines), change to Bridged Adapter in VirtualBox settings.
Take your first snapshot:
After initial configuration and updates, take a “Clean baseline” snapshot. This gives you a known-good state to return to if anything breaks.
Test the pentesting tools:
Launch some of the included tools to verify everything works:
- Nmap for network scanning
- Metasploit framework for exploitation
- Burp Suite for web application testing
- Wireshark for packet analysis
Your Kali Linux VirtualBox installation is now ready for cybersecurity learning and testing. The isolated environment lets you experiment safely without affecting your host system or network.