Changes between Version 6 and Version 7 of Csle2022/Agenda/virtualization
- Timestamp:
- Nov 25, 2022, 2:15:19 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Csle2022/Agenda/virtualization
v6 v7 1 1 = KVM Installation = 2 2 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.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. 4 4 5 5 Here we look at how to install KVM on Ubuntu 20.04 LTS. 6 6 7 == Preparing Host Machine for KVM == 8 9 For 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. 10 To 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 {{{ 13 VBoxManage modifyvm <VirtualMachineName> --nested-hw-virt on 14 }}} 15 16 Now view the Processor tab and you should see that the above option is enabled. 17 18 Now we are good to go ahead and run the VM. Click the start button. You can login to the system using below passwords. 19 20 user:password 21 22 23 7 24 == Network Configuration == 8 25 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,26 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. Please open the terminal application Change the configuration as in the below, 10 27 11 28 {{{ … … 66 83 }}} 67 84 68 Before proceeding further, we need to confirm that the virtualization daemon – libv ritd-daemon – is running. To do so, execute the command85 Before proceeding further, we need to confirm that the virtualization daemon – libvirtd-daemon – is running. To do so, execute the command 69 86 70 87 {{{