Changes between Version 8 and Version 9 of Csle2022/Agenda/virtualization
- Timestamp:
- Nov 25, 2022, 4:36:25 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Csle2022/Agenda/virtualization
v8 v9 76 76 Before installing KVM on Ubuntu, we are first going to verify if the hardware supports KVM. A minimum requirement for installing KVM is the availability of CPU virtualization extensions such as AMD-V and Intel-VT. 77 77 78 To check whether the Ubuntu system supports virtualization, run the following command.78 To check whether the Ubuntu system supports hardware virtualization, run the following command. 79 79 80 80 {{{ … … 84 84 An outcome greater than 0 implies that virtualization is supported 85 85 86 To check if your system supports KVM virtualization execute the command86 To check if your system supports KVM acceleration execute the command 87 87 {{{ 88 88 sudo apt install cpu-checker … … 90 90 }}} 91 91 92 With the confirmation that our system can support KVM virtualization, we are going to install KVM, To install KVM, virt-manager, bridge-utils and other dependencies, run the command 92 If supported output should be, 93 INFO: /dev/kvm exists 94 KVM acceleration can be used 95 96 With the confirmation that our system can support KVM acceleration, we are going to install KVM module on the Ubuntu system. Installation includes KVM modules, dependencies and utilities. 93 97 94 98 {{{ 95 apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients virt-manager bridge-utils99 sudo apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients virt-manager bridge-utils 96 100 }}} 97 101 … … 100 104 {{{ 101 105 sudo systemctl status libvirtd 102 systemctl enable --now libvirtd 106 }}} 107 108 If the output shows an error, "error creating bridge interface virbr0: file exists" then restart the service, 109 110 {{{ 111 sudo systemctl restart libvirtd 103 112 }}} 104 113 … … 108 117 }}} 109 118 110 To view available Guest osvariants,119 To view available Guest OS variants, 111 120 112 121 {{{ … … 115 124 }}} 116 125 117 == Creating a Virtual Machine == 126 == Create and Manager VMs using Virt Manager == 127 128 virt-manager is already installed in above steps. But to create and manage VMs using virt-manager the current user should be a member of the libvirt and kvm user groups. So let us add the Ubuntu user to the above groups. 129 130 sudo adduser <user> libvirt 131 132 sudo adduser <user> kvm 133 134 Now to open the virt-manager run, 135 136 sudo virt-manager 137 138 == Create and Manager VMs using Virtual Machine == 118 139 119 140 The virt-install command-line tool is used for creating virtual machines on the terminal. A number of parameters are required when creating a virtual machine.