Changes between Version 6 and Version 7 of Csle2022/Agenda/virtualization


Ignore:
Timestamp:
Nov 25, 2022, 2:15:19 PM (2 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/virtualization

    v6 v7  
    11= KVM Installation =
    22
    3 KVM, (kernel-based Virtual Machine) is a free and opensource virtualization platform for the Linux kernel. When installed on a Linux system, it becomes a Type-2 hypervisor.
     3KVM, (Kernel-based Virtual Machine) is a free and opensource virtualization platform for the Linux kernel. When installed on a Linux system, it becomes a Type-2 hypervisor.
    44
    55Here we look at how to install KVM on Ubuntu 20.04 LTS.
    66
     7== Preparing Host Machine for KVM ==
     8
     9For this lab we will be using a Ubuntu 20.04 Desktop VM running on VirtualBox. To make lab easy we have uploaded a pre-installed disk file and you can download it here. Please download it and import to your VirtualBox. Once imported run it you may need to change VM hardware configurations like CPU and Memory to suit your computer. Select the VM and go to settings window. Change CPU and Memory to suit your availble resources. Go to Network tab make the Attached to: value to 'Bridged Adapter' and select the connection you are connect from Name: drop down list.
     10To enable KVM virtualization you need to enable virtualization for your processor. Since we are using either Intel or AMD based processor we need to enable VT-x/AMD-V on the host machine. But our Ubuntu Desktop is not on a bare-metal and it is also a VM. Then we need to enable Nested virtualization for the Ubuntu Desktop VM. To enable this go to System => Processor and select the check box 'Enable Nested VT-x/AMD-v'. If it is greyed out then open the terminal on your computer and enter below.
     11
     12{{{
     13VBoxManage modifyvm <VirtualMachineName> --nested-hw-virt on
     14}}}
     15
     16Now view the Processor tab and you should see that the above option is enabled.
     17
     18Now we are good to go ahead and run the VM. Click the start button. You can login to the system using below passwords.
     19
     20user:password
     21
     22
     23
    724== Network Configuration ==
    825
    9 First we have do the network configuration. If we need the VMs to receive the same IP range as in the Host server, then we need to create a network bridge interface. Network bridge 'virbr0' is already created with NAT enabled. Now need to configure it in bridge mode. Change the configuration as in the below,
     26First we have do the network configuration. If we need the VMs to receive the same IP range as in the Host server, then we need to create a network bridge interface. Network bridge 'virbr0' is already created with NAT enabled. Now need to configure it in bridge mode. Please open the terminal application Change the configuration as in the below,
    1027
    1128{{{
     
    6683}}}
    6784
    68 Before proceeding further, we need to confirm that the virtualization daemon – libvritd-daemon – is running. To do so, execute the command
     85Before proceeding further, we need to confirm that the virtualization daemon – libvirtd-daemon – is running. To do so, execute the command
    6986
    7087{{{