Kali linux with vmware

Kali linux with vmware

Installing “Guest Tools”, gives a better user experience with VMware VMs. This is why since Kali Linux 2019.3, during the setup process it should detect if Kali Linux is inside a VM. If it is, then automatically install any additional tools (in VMware case, open-vm-tools and open-vm-tools-desktop ). The Guest Tools are also pre-installed in the Live image since Kali Linux 2021.3.

As of September 2015, VMware recommends using the distribution-specific open-vm-tools (OVT) instead of the VMware Tools package for guest machines.

Open-VM-Tools

Should you decide to create your own VMware installation of Kali Linux (rather than using our pre-made VMware images), and you want to force a manual reinstall of open-vm-tools (as something has gone wrong), first make sure you are fully updated, then enter the following:

[email protected]:~$ sudo apt update [. ] [email protected]:~$ [email protected]:~$ sudo apt install -y --reinstall open-vm-tools-desktop fuse [. ] [email protected]:~$ [email protected]:~$ sudo reboot -f [email protected]:~$ 

Adding Support for Shared Folders When Using OVT

Unfortunately, shared folders will not work out of the box, some additional scripts are needed. Those can be installed easily with kali-tweaks :

In the Kali Tweaks menu, select Virtualization, then Install additional packages and scripts for VMware. Congratulations, you now have two additional tools in your toolbox!

The first one is a little script to mount the VMware Shared Folders. Invoke it with:

And with a bit of luck, checking /mnt/hgfs/ you should see your shared folders.

The second script is a helper to restart the VM tools. Indeed, it’s not uncommon for OVT to stops functioning correctly (e.g. such as copy/paste between the host OS and guest VM stops working). In this case, running this script can help to fix the issues:

For older versions of Kali Linux, here is our previous guide.

Updated on: 2023-Mar-06
Author: g0tmi1k

Источник

How to install Kali Linux in VMware

Kali Linux is a powerful Linux distro for penetration testing and ethical hacking. It’s not meant as an everyday operating system, so most Kali users will utilize the distro by running it temporarily from a USB drive, or opt for a persistent installation in a virtual machine.

Installing Kali in VMware gives you easy access to the hundreds of security and hacking tools that are included with Kali. Any time you need to do some packet sniffing, password cracking, etc. you can simply fire up the virtual machine and get to work. It’s also a great way to test out hacking applications without having to install software on your host system.

Читайте также:  Команда поиск папки linux

In this tutorial, we’ll show you how to install Kali Linux in a VMware virtual machine. You’ll be able to follow along with this guide regardless of your host operating system, so both Linux and Windows users will find these step by step instructions to be applicable.

In this tutorial you will learn:

  • How to configure VMware to host Kali Linux
  • How to create a Kali Linux virtual machine

Running Kali Linux inside a VMware virtual machine

Software Requirements and Linux Command Line Conventions

Category Requirements, Conventions or Software Version Used
System Kali Linux
Software VMware
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Getting Started

This tutorial assumes that you already have VMware installed. If not, you can head over to the VMware website to download VMware Workstation for free.

The other thing you need to have in order to get started is the Kali Linix install image. This comes in the form of an ISO file. Check out our guide on downloading Kali Linux ISO image to get a copy. Once VMware is installed and you have your ISO file downloaded, you’re ready to follow the steps in the next section.

Install Kali Linux in VMware

Create a new virtual machine

Click browse and navigate to where your Kali Linux ISO file is saved

Select Linux and Debian as the operating system type

Fill out a name for the VM and select a different location if you want

Select a size for the hard disk and whether to split files - default values are fine

Review settings and click finish to create the VM

Play virtual machine to launch the Kali Linux installer

From this point, you’ll be installing Kali Linux just like you would on a physical machine. We have another guide on how to install Kali Linux if you need some help with that.

When starting your Kali VM, if you receive a notification about installing “VMware Tools for Linux,” this is a good time to go ahead and install it, as it will enable advanced features for your virtual machine.

Download and install the Linux Tools for VMware for an improved experience

Also note that you can send mouse and keyboard output back to your host operating system by pressing Ctrl + Alt at the same time on your keyboard.

Closing Thoughts

Virtualization is a great way to run a second system without needing extra hardware. VMware makes this easy with its sleek interface and extensive configuration options. Having a virtualized version of Kali Linux gives you a lot of flexibility to run penetration testing software or maintain a separated hacking environment from your host system.

Источник

Kali linux with vmware

You can install VMware workstation or player on Kali Linux, allowing you to use Virtual Machines (VMs) inside of Kali Linux. However if you wish to use Kali Linux as a virtual machine, you will want our Kali Linux Guest VMware guide.

VMs are great, as there are many reasons why to use them. One of the being, able to run multiple Operating Systems at the same time. You can have your host machine “untouched”, and then only interact with the guest VMs. Another is when something is going right, take a snapshot. When something goes wrong, revert back.

Читайте также:  Xampp on linux mint

VMware Workstation & Fusion is a commercial software (there is VMware Player which is free but it is limited in features). There are various free or open source solution (such as VirtualBox, QEMU, KVM/Xen with virt-manager).

Preparation

Before trying to install VMware, please make sure your version of Kali Linux is up-to-date, and if required, reboot the machine:

[email protected]:~$ sudo apt update [. ] [email protected]:~$ [email protected]:~$ sudo apt full-upgrade -y [. ] [email protected]:~$ [email protected]:~$ [ -f /var/run/reboot-required ] && sudo reboot -f [email protected]:~$ 

Download

To start with, you will need to download VMware. You can do this by going to VMware’s download page. At the time of writing, the latest version is 15.5.1-15018445 .

Alternatively, you can do the following command line method:

[email protected]:~$ sudo apt install -y curl [. ] [email protected]:~$ [email protected]:~$ curl -L https://www.vmware.com/go/getworkstation-linux \ > ~/Downloads/vmware.bin [email protected]:~$ [email protected]:~$ file Downloads/vmware.bin Downloads/vmware.bin: a /usr/bin/env bash script executable (binary data) [email protected]:~$ [email protected]:~$ ls -lah Downloads/vmware.bin -rwxr-xr-x 1 kali kali 511M Feb 14 20:46 Downloads/vmware.bin [email protected]:~$ 

When everything is up-to-date, and ready to go, make sure the file is executable and then call it:

[email protected]:~$ chmod +x ~/Downloads/vmware.bin [email protected]:~$ [email protected]:~$ sudo ~/Downloads/vmware.bin Extracting VMware Installer. done. Installing VMware Workstation 15.5.1 Configuring. [######################################################################] 100% Installation was successful. [email protected]:~$ 

We can see we have installed VMware Workstation 15.5.1. The version number may be needed later on.

After the installer is installed, you should be able to just run vmware to continue setup:

At this point, you should be be straight forward, often just clicking through.

Setup

The first part may be VMware Kernel Modules.

If vmware wasn’t called with superuser privileges, you may be prompted for a password.

At this point, it may not install correctly, and get the error message: Unable to install all modules. See log /tmp/vmware-kali/vmware-*.log for details. (Exit code 1) . This is often due to Kali’s kernel being newer than what VMware is expecting.

Looking at the log may help with troubleshooting the issue as well as the guide at the end of this post, vmware-host-modules .

You will need to accept the legal agreement.

You may wish for it VMware to check for any updates.

You may wish to join “VMware Customer Experience Improvement Program”.

Enter the current username.

Enter a location for Shared VMs (this is different to each users own VMs).

Enter a port for HTTPS access

If you have a product key, you can enter it now, else it will be a trial for 30 days.

You may be once again prompt for superuser privileges if you didn’t execute the setup file with it.

The final screen should look like this.

If you now wish, you are able to install Kali Linux in a VMware VM (on Kali Linux).

Читайте также:  Мой ip через терминал linux

Troubleshooting

libaio missing

If you see the following problem, upon trying to run vmware .

Try installing the libaio1 package:

[email protected]:~$ vmware [AppLoader] Use shipped Linux kernel AIO access library. An up-to-date "libaio" or "libaio1" package from your system is preferred. [email protected]:~$ [email protected]:~$ sudo apt install -y libaio1 [. ] [email protected]:~$ 

Then the next time you start vmware , it should of gone away.

Missing Packages

From time to time, things may not go right. There could be a number of reasons why VMware may not install. The first thing to check would be you have all the necessary packages installed:

[email protected]:~$ sudo apt install -y build-essential linux-headers-$( uname -r ) vlan libaio1 [. ] [email protected]:~$ 

Try running vmware again, and see if now setup continues.

Too Newer Kernel

A common issue is because the setup file for VMware isn’t supporting the latest kernels, which could be an issue as Kali Linux is a rolling distribution and receives frequent updates. If this is the case, we can patch VMware modules to support this:

[email protected]:~$ sudo apt install -y git [. ] [email protected]:~$ [email protected]:~$ sudo git clone \ -b workstation-$( grep player.product.version /etc/vmware/config | sed '/.*\"\(.*\)\".*/ s//\1/g' ) \ https://github.com/mkubecek/vmware-host-modules.git \ /opt/vmware-host-modules/ [. ] [email protected]:~$ [email protected]:~$ cd /opt/vmware-host-modules/ [email protected]:/opt/vmware-host-modules$ sudo make [email protected]:/opt/vmware-host-modules$ [email protected]:/opt/vmware-host-modules$ sudo make install [email protected]:/opt/vmware-host-modules$ 

Try now to install VMware, by doing vmware.

If you are still having issues, you may need to restart your Kali Linux before trying one more final time.

vmware-host-modules + Kernel Updates

As VMware has various kernel modules, we need to make sure they are kept up-to-date and re-patched when Kali Linux’s kernel gets updated. This can be achieved by the steps in the following guide:

[email protected]:~$ sudo tee /etc/kernel/install.d/99-vmmodules.install " BOOT_DIR_ABS="\$3" KERNEL_IMAGE="\$4" VMWARE_VERSION=\$( grep player.product.version /etc/vmware/config \ | sed '/.*\"\(.*\)\".*/ s//\1/g' ) ret=0 case "\$" in add) [ -z \$ ] \ && exit 0 git clone -b workstation-\$ https://github.com/mkubecek/vmware-host-modules.git /opt/vmware-host-modules-\$/ cd /opt/vmware-host-modules-\$/ make VM_UNAME=\$ make install VM_UNAME=\$ ((ret+=\$?)) ;; remove) exit 0 ;; *) usage ret=1;; esac exit \$ EOF [email protected]:~$ 

Still can’t start up VMware? vmware-modconfi

If VMware is unsuccessful, we can dig a little further by running the following:

[email protected]:~$ sudo vmware-modconfig --console --install-all [. ] [email protected]:~$ [email protected]:~$ sudo vmware-modconfig --console --install-all 2>&1 | grep error [. ] [email protected]:~$ 

Looking at the output, may either give us the exact issue, or at the very least something to search the Internet for.

Can’t Power on a Virtual Machine

You may also face the following issues, when trying to power on a VM.

  • Failed to initialize monitor device
  • Could not open /dev/vmmon: No such file or directory. Please make sure that kernel module ‘vmmon’ is loaded
  • Unable to change virtual machine power state: Transport (VMDB) error -14: Pipe connection has been broken.

The quickest solution to fix these would be to reboot Kali Linux and try again.

Updated on: 2023-Mar-06
Author: g0tmi1k

Источник

Оцените статью
Adblock
detector