Changes between Version 8 and Version 9 of Csle2022/Agenda/virtualization


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/virtualization

    v8 v9  
    7676Before 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.
    7777
    78 To check whether the Ubuntu system supports virtualization, run the following command.
     78To check whether the Ubuntu system supports hardware virtualization, run the following command.
    7979
    8080{{{
     
    8484An outcome greater than 0 implies that virtualization is supported
    8585
    86 To check if your system supports KVM virtualization execute the command
     86To check if your system supports KVM acceleration execute the command
    8787{{{
    8888sudo apt install cpu-checker
     
    9090}}}
    9191
    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
     92If supported output should be,
     93INFO: /dev/kvm exists
     94KVM acceleration can be used
     95
     96With 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.
    9397
    9498{{{
    95 apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients virt-manager bridge-utils
     99sudo apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients virt-manager bridge-utils
    96100}}}
    97101
     
    100104{{{
    101105sudo systemctl status libvirtd
    102 systemctl enable --now libvirtd
     106}}}
     107
     108If the output shows an error, "error creating bridge interface virbr0: file exists" then restart the service,
     109
     110{{{
     111sudo systemctl restart libvirtd
    103112}}}
    104113
     
    108117}}}
    109118
    110 To view available Guest os variants,
     119To view available Guest OS variants,
    111120
    112121{{{
     
    115124}}}
    116125
    117 == Creating a Virtual Machine ==
     126== Create and Manager VMs using Virt Manager ==
     127
     128virt-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
     130sudo adduser <user> libvirt
     131
     132sudo adduser <user> kvm
     133
     134Now to open the virt-manager run,
     135
     136sudo virt-manager
     137
     138== Create and Manager VMs using Virtual Machine ==
    118139
    119140The 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.