In this blog post, I will show you how to install and setup Kali Linux 2019 in Hyper-V. Since Hyper-V is shipped with Windows OS (Except Home Edition), chances are that you already have Hyper V available in your system, ready to be used.
What is Hyper-V
Hyper V is a virtualization software from Microsoft which allows you to run multiple Operating system on your Windows Machine. Hyper V is exactly like VMware Workstation or Oracle VirtualBox, except that Hyper V is from Microsoft and is available for free for almost all the versions of Windows except Home version.
To Install Kali Linux using Kali Linux official Image, please follow my post How to use Kali Linux Official Image to install Kali Linux in VMware 15 and VirtualBox 6
Download Kali Linux ISO image
To install the Kali Linux, we will have to first get the installer ISO image file. You can get it by visiting the official download page. Please download the 64 bit or 32 bit image depending on the system you have. Dont get confused by the many options available such as Kali Linux 64 bit Mate or Kali Linux 64 bit Xfce. They are all the same except for the desktop environment. LXDE, Mate, Xfce are various open source desktop environments. I use Kali Linux 64 bit, but the choice is yours. It does not really matter.
Just remember that Kali Linux 64 bit Light is the minimal distribution which will not contain all the features. Since the file size is large, around 3.3 GB, I prefer to download via torrent because it is fast and flexible.
For this blog I chose the “Kali 64 bit Linux” iso (https://cdimage.kali.org/kali-2019.1a/kali-linux-2019.1a-amd64.iso)
Which Windows Version Supports Hyper V and how to Enable it
Since Hyper V is a part of Windows OS, separate installation is not required. But Hyper-V is not enabled by default and to use it, it needs to be enabled. To enable Hyper V, the following requirements must be met.
- Windows 10 Enterprise, Professional, or Education
- 64-bit Processor with Second Level Address Translation (SLAT)
- CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
- Minimum of 4 GB memory.
- The Hyper-V role cannot be installed on Windows 10 Home.
For detailed discussion please go through my blog on how to enable Hyper V in Windows.
Enable Virtualization Technology either Intel VT-x or AMD-V
To enable Hyper V, system must have Virtualization Technology Enabled in BIOS. For AMD processors, Virtualization is enabled by default, but in the case of Intel, VT-x may not be enabled by default. So, there are steps to be followed to enabled Intel VT in BIOS or UEFI. Please follow my post on Step by step guide to enable Intel VT-x or AMD-V in BIOS or UEFI in Windows 10 and Windows 8.
Before you start installing Kali Linux, we will have to create network connection switch first. Please follow the steps below
- Open Hyper-V Manager
- Click Virtual Switch Manager under action on the right pane in Hyper-V Manger screen
- Select External and click on create virtual switch.
- In the Virtual Switch properties dialog box, specify the name of your choice of the virtual switch and under Connection Type -> External Network, select your system Ethernet card and not your WiFi card. Click on OK to complete the process.
Once you have Hyper V setup successfully, Please follow the below steps to Install Kali Linux 2019
Step 1 – Open Hyper V Manager
First step is to open Hyper V manager. If you have setup everything correctly, you can search for Hyper-V Manager in Taskbar or you can find the shortcut in Start Menu under Windows Administrative tools.
On the right hand side you will see New-> Virtual Machine. Click on Virtual Machine to launch New Virtual Machine Wizard and click Next.
Step 2 – New Virtual Machine Wizard – Specify Name and Location
In this dialog box, please enter the name of the Virtual Machine. In Our case, we can name our Virtual machine as Kali Linux. But you can specify anything according to your preference. There is a checkbox to chnage the location where the Virtual Machine Files will be created. If you leave this unchecked, default location will be used. Else Check the box to change the location. I normally leave it as default. But if you have disk space constraints, it better to specify the location in a different disk drive.
Step 3 – New Virtual Machine Wizard – Specify Generation
These days you can create two versions(Generation) of Virtual Machines. The latest one is Generation 2. Before generation 2 type virtual machines came into existence, there was nothing like generation 1 virtual machines. All virtual machines were the same. But from generation 2 virtual machines, older virtual machines were called generation one virtual machines. Generation one virtual machines supports legacy hardware. Generation 2 Provides the following new functionality on a virtual machine:
- PXE boot by using a standard network adapter
- Boot from a SCSI virtual hard disk
- Boot from a SCSI virtual DVD
- Secure Boot (enabled by default)
- UEFI firmware support
But lets not complicate things for ourselves and choose Generation 1 and click next.
Step 4 – New Virtual Machine Wizard – Assign Memory
In this dialog box you will have to specify the amount of RAM you want to allocate to the virtual machine once the virtual machine is turned on. By default it is 1GB(1024 MB), but I normally prefer 2GB(2048 MB). Also, check Use Dynamic Memory for this Virtual Machine. This will allow Hyper V to adjust RAM according to the requirement of the Virtual machine.
Step 5 – New Virtual Machine Wizard – Configure Network
For virtual machines to be be able to communicate with other virtual machines or internet, it should have a network adapter. In this dialog box you will have to specify the network adapter. Please choose connection(external virtual virtual switch) from the drop down menu and click on next.
Step 6 – New Virtual Machine Wizard – Connect Virtual Hard Disk
Virtual Machines require hard disk space. This is the place where you decide how much disk space you want to allocate to the virtual machine. For Kali, its recommended to select around 60 GB of disk space. Give Virtual disk a name of your choice. Please note that, not all of the allocated disk space will be used during the installation process. It is dynamically created, that is it will expand as the usage grows with the maximum limit of what you specify as the virtual disk size. Give the name of the virtual hard disk, specify the disk space and click next.
Step 7 – New Virtual Machine Wizard – Installation Option
In this dialog box you will be asked to specify the setup media. Check Install an operating system from bootable CD/DVD-ROM -> Image File. Browse to the downloaded ISO image file and click next.
Step 8 – New Virtual Machine Wizard – Completing the New Virtual Machine Wizard
This dialog box will show you the summary of the options you have selected. Click Finish to create the Virtual Machine. You will see the process for creating new virtual machine will begin. At the end end you will see Hyper-V Manager with the newly created virtual machine under Virtual Machine Box.
Step 9 – Hyper-V Manager- Virtual Machine Settings
After the virtual machine is created, you will see the name of the virtual machine listed under Virtual Machines.
Right click on the name of the virtual manager and click on settings to change Virtual machine Options. You will also see settings option on the right hand side, as shown in the screenshot below.
You can change the following most common virtual machine startup settings such as memory, network, CPU and so on…
Change Allocated Memory
here you can specify the memory with which the Virtual machine will start or boot. I normally choose 2048 MB(2 GB) and always check Enable Dynamic Memory.
Change the number of Virtual processor
Here you can specify the number of Virtual processors. Normally I set it to 2. It depends on the actual CPU your system has. Since I have i7 CPU (Which has 8 cores), I Normally allocate 2 core to the Virtual Machine.
Here you can create virtual Hard drives and DVD drives. By default, one Hard Disk and one DVD drive is created. If you want additional ones, you can create it here.
Here you can specify the network adapter to use for the Virtual machine.
Here you can specify the floppy drive. Floppy drives and things of the the past and almost extinct. You can leave it as default which is none.
Change Virtual machine name
If you wish to change the name of the virtual machine, you can do it here.
Step 10 – Start Installation Process
Till now we have created and configured a new virtual machine. Now lets start the installation process by right clicking on the name of the virtual machine in Hyper V manager and selecting connect. You can see connect option on the right side of Hyper V manager as shown in the below screenshot.
After you click on connect, you will be see a new window open asking you to start the Virtual Machine. Click on start.
Step 7 – Select Graphical Install from Boot Menu
Here you will see many options. Select Graphical Install using the down arrow key and click continue.
Step 8 – Select a Language
In this dialog box you will be asked to select a language. Please select a language and continue. This option sets your language in the Kali Linux Operating system. Default is English.
Step 9 – Select Location
In this dialog box you will be asked to select a Location. Please select a location and continue. This option sets your Location in the Kali Linux Operating system. later on, you will be able to set the time zone based on the location you choose here.
Step 10 – Configure the Keyboard
In this dialog box you will be asked to select the keyboard layout. Please select a Keyboard layout using the arrow keys and click continue. This option sets your Keyboard in the Kali Linux Operating system. By default it is set to American English.
After you click continue, you will see the installation progresses for some them you see the Network Configuration dialog box, which is the next step.
Step 11 – Configure the Network – Enter Hostname
In this dialog box you will be asked to enter the hostname for your system. This being a home network, we can set anything. Enter any anything and click continue.
Step 12 – Configure the Network – Enter domain name
In this dialog box you will be asked to enter the domain name for your system. This being a home network, we can set anything like example.com
Step 13 – Set User and password
In this dialog box you will be asked to enter the password for the root user account. Please enter a password of your choice and click continue. This is the password for user root with which you will login when the installation completes.
You will be asked to setup a user only if you leave the root password as blank in the above screen. if you setup an password, you will not see the below screens. In that case you will have to login as root and the password you setup above.
In this screen you have to enter username of the account, in all small letters. This account should be used for general non administrative activities. Click on continue.
In this screen you have to enter Full name of the user other than root. This account should be used for general non administrative activities. Click on continue.
In this screen you have to enter username of the account, in all small letters. This will be used to login as a user other than root.This account should be used for general non administrative activities. Click on continue.
Here you will have to enter the password for the newly created user. Remember, this is not the root password. Enter password and Click continue.
Step 14 – Configure Clock
In this dialog box you will be asked to time zone based on the location you selected earlier. Please enter a time zone of your choice and click continue.
Step 15 – Partition Disk
In this dialog box you are asked how you would like to partition your disk. Select Guided – Use entire disk and click continue. This is the default option.
In this dialog box you are asked to select a disk to partition. Select sda, VMware Virtual disk. There should be only one option. Click Continue.
Step 16 – Select partition scheme
In this dialog box you are asked to select a scheme for disk partition. Select the default, All files in one partition and click Continue.
Step 17 – Disk partition Overview
In this dialog box you are see the summary of your disk partition. Select the Finish Partitioning and Write changes to disk which should be selected by default. All you have to do is to click continue.
Step 18 – Disk partition Confirmation
In this dialog you are asked to confirm Write changes to disk. Select yes and click continue.
Step 19 – Installation starts
Now the actual installation starts. Wait for Configure the Package Manager Dialog box to appear.
Step 20 – Configure the package manager
In this dialog box you will ask if you wish to configure network mirror for Package manager. Choose yes and continue. You can skip this by selecting NO. But the default option Yes is better. I will go with Yes.
Step 21 – Configure the package manager – HTTP Proxy
In this dialog box you will ask if you wish to HTTP proxy. Leave it blank and click continue.
Installation process will continue. Wait for sometime and let the process continue.
Step 22 – Install GRUB boot loader
In this dialog box you will be asked if you would like to install the GRUB boot loader. Select Yes and click Continue.
Step 23 – Select device for GRUB boot loader Installation
In this dialog box you will be asked to select boot loader device for GRUB installation. Select /dev/sda and click Continue.
Installation will continue. Wait for the process to complete.
Step 24 – Installation Complete
Installation will continue and now you will see Installation complete dialog box. Click continue to finalize the installation and wait for the VM to reboot. After reboot you will see the login screen. Login with your username or root user and provide your password. You will then see the Kali Linux desktop.
You will see Virtual Machine Start up and eventually you should see Kali Installation screen.
You are done, You can start working on Kali Linux 2018. Thanks for Visiting my blog.