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


Ignore:
Timestamp:
Nov 26, 2022, 10:02:32 AM (2 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/virtualization

    v9 v10  
    4242{{{
    4343network:
     44  version: 2
     45  renderer: networkd
    4446  ethernets:
    4547    enp0s3:
    46       dhcp4: no
    47     eno2:
    48       dhcp4: true
    49     eno3:
    50       dhcp4: true
    51     eno4:
    52       dhcp4: true
    53   version: 2
     48      dhcp4: no
    5449
    5550  bridges:
    56     virbr0:
    57       interfaces: [enp0s3]
     51    br0:
     52    dhcp4: no
     53      interfaces:
     54        - enp0s3
    5855      addresses:
    5956        - <IP_ADDRESS>/23
     
    106103}}}
    107104
    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
    112 }}}
    113 
    114105Check if KVM modules are loaded,
    115106{{{
     
    124115}}}
    125116
    126 == Create and Manager VMs using Virt Manager ==
     117== Create and Manage VMs using Virt Manager ==
    127118
    128119virt-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.
     
    136127sudo virt-manager
    137128
    138 == Create and Manager VMs using Virtual Machine ==
     129The virt-manager window will be opened. To create a new VM please click on the icon on the left most side.
     130
     131Now VM wizard will appear. Select the option Local Install media (ISO image or CDROM) to install the guest with a ISO image.
     132
     133Next click on Browse button to select an ISO image.
     134
     135In next window click Browse Local.
     136
     137And go to the Downloads directory. There should be OS image called linux-lite-6.2-64bit.iso. This is a linux distribution based on Ubuntu. Select it and open.
     138
     139Since Linux Lite is not an very common operating system it will not be automatically detected. So uncheck the checkbox at the bottom of the window as below. Then type Generic default in the above text box. Then select Forward button to go to the next step.
     140
     141Now you have to specify Memory and number of virtual CPUs for the VM. For this linux distribution minimum of 768MB RAM is required. 1 number of CPU will be good enough. Once given click Forward button.
     142
     143In this window you can specify an hard disk size. For this linux distribution minimum of 8GB storage size is required. Once done select Forward button.
     144
     145Now you have specify the Name of the VM to be created.  You can also unfold the Network Selection to see available network interfaces. Here we will choose bridge interface br0 that we created earlier. Once everything looks good click on Finish to create the VM.
     146
     147Next comes is the Guest operating system installion Wizard. This shouldn't be new to you. You can either choose to install the operating system on the created VM or choose to boot from the live system inside the ISO image. If you select the first option we can use the operating system without installing in the VM.
     148
     149
     150
     151
     152== Create and Manage VMs using Virtual Machine ==
    139153
    140154The 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.