Version : 2022.02

Dernière mise-à-jour :

LCF702 - Installation de Machines Virtuelles

Contenu du Module

LCF702 - Installation de Machines Virtuelles

Contenu du Module

LAB #1 - Installation d'une Machine Virtuelle CentOS 8

1.1 - Identification du Short ID

1.2 - Configuration du Stockage des ISOs

1.3 - Installation du Domaine

Format des Images

Convertir le Format de l'Image

1.4 - Configuration de l'Installation de l'OS Invité

Language Settings

Network configuration

Time settings

Root password

Installation source

Software selection

Installation Destination

Démarrer l'Installation

Démarrer la VM

1.5 - Vérification de la VM Invitée

Réseau

Internet

LAB #1 - Installation d'une Machine Virtuelle CentOS 8

1.1 - Identification du Short ID

KVM sait virtualiser un grand nombre de systèmes d'exploitations. Pour consulter la liste complète des systèmes, il convient d'utiliser la commande osinfo-query os :

[root@centos8 ~]# osinfo-query os | more
Short ID | Name | Version | ID
----------------------+----------------------------------------------------+----------+-----------------------------------------
alpinelinux3.10 | Alpine Linux 3.10 | 3.10 | http://alpinelinux.org/alpinelinux/3.10
alpinelinux3.11 | Alpine Linux 3.11 | 3.11 | http://alpinelinux.org/alpinelinux/3.11
alpinelinux3.12 | Alpine Linux 3.12 | 3.12 | http://alpinelinux.org/alpinelinux/3.12
alpinelinux3.13 | Alpine Linux 3.13 | 3.13 | http://alpinelinux.org/alpinelinux/3.13
alpinelinux3.5 | Alpine Linux 3.5 | 3.5 | http://alpinelinux.org/alpinelinux/3.5
alpinelinux3.6 | Alpine Linux 3.6 | 3.6 | http://alpinelinux.org/alpinelinux/3.6
alpinelinux3.7 | Alpine Linux 3.7 | 3.7 | http://alpinelinux.org/alpinelinux/3.7
alpinelinux3.8 | Alpine Linux 3.8 | 3.8 | http://alpinelinux.org/alpinelinux/3.8
alpinelinux3.9 | Alpine Linux 3.9 | 3.9 | http://alpinelinux.org/alpinelinux/3.9
alt.p8 | ALT p8 StarterKits | p8 | http://altlinux.org/alt/p8.starterkits
alt.p9 | ALT p9 StarterKits | p9 | http://altlinux.org/alt/p9.starterkits
alt.sisyphus | ALT regular | sisyphus | http://altlinux.org/alt/sisyphus
alt8.0 | ALT 8 Education | 8.0 | http://altlinux.org/alt/8.0
alt8.1 | ALT 8.1 | 8.1 | http://altlinux.org/alt/8.1
alt8.2 | ALT 8.2 | 8.2 | http://altlinux.org/alt/8.2
alt9.0 | ALT 9.0 | 9.0 | http://altlinux.org/alt/9.0
alt9.1 | ALT 9.1 | 9.1 | http://altlinux.org/alt/9.1
altlinux1.0 | Mandrake RE Spring 2001 | 1.0 | http://altlinux.org/altlinux/1.0
altlinux2.0 | ALT Linux 2.0 | 2.0 | http://altlinux.org/altlinux/2.0
altlinux2.2 | ALT Linux 2.2 | 2.2 | http://altlinux.org/altlinux/2.2
altlinux2.4 | ALT Linux 2.4 | 2.4 | http://altlinux.org/altlinux/2.4
altlinux3.0 | ALT Linux 3.0 | 3.0 | http://altlinux.org/altlinux/3.0
altlinux4.0 | ALT Linux 4.0 | 4.0 | http://altlinux.org/altlinux/4.0
altlinux4.1 | ALT Linux 4.1 | 4.1 | http://altlinux.org/altlinux/4.1
altlinux5.0 | ALT Linux 5.0 | 5.0 | http://altlinux.org/altlinux/5.0
altlinux6.0 | ALT Linux 6.0 | 6.0 | http://altlinux.org/altlinux/6.0
altlinux7.0 | ALT Linux 7.0 | 7.0 | http://altlinux.org/altlinux/7.0
android-x86-8.1 | Android-x86 8.1 | 8.1 | http://android-x86.org/android-x86/8.1
android-x86-9.0 | Android-x86 9.0 | 9.0 | http://android-x86.org/android-x86/9.0
archlinux | Arch Linux | | http://archlinux.org/archlinux/rolling
asianux-unknown | Asianux unknown | unknown | http://asianux.com/asianux/unknown
asianux4.6 | Asianux Server 4 SP6 | | http://asianux.com/asianux/4.6
asianux4.7 | Asianux Server 4 SP7 | | http://asianux.com/asianux/4.7
asianux7.0 | Asianux Server 7 | 7.0 | http://asianux.com/asianux/7.0
asianux7.1 | Asianux Server 7 SP1 | 7.1 | http://asianux.com/asianux/7.1
asianux7.2 | Asianux Server 7 SP2 | 7.2 | http://asianux.com/asianux/7.2
asianux7.3 | Asianux Server 7 SP3 | 7.3 | http://asianux.com/asianux/7.3
asianux8.0 | Asianux Server 8 | 8.0 | http://asianux.com/asianux/8.0
caasp-unknown | SUSE CaaS Platform Unknown | unknown | http://suse.com/caasp/unknown
caasp1.0 | SUSE CaaS Platform 1.0 | 1.0 | http://suse.com/caasp/1.0
caasp2.0 | SUSE CaaS Platform 2.0 | 2.0 | http://suse.com/caasp/2.0
caasp3.0 | SUSE CaaS Platform 3.0 | 3.0 | http://suse.com/caasp/3.0
--More--

La liste des versions de Red Hat peut être consultée en recherchant la chaîne Red Hat dans la sortie de la commande précédente :

[root@centos8 ~]# osinfo-query os | grep "Red Hat"
rhel-atomic-7.0 | Red Hat Enterprise Linux Atomic Host 7.0 | 7.0 | http://redhat.com/rhel-atomic/7.0
rhel-atomic-7.1 | Red Hat Enterprise Linux Atomic Host 7.1 | 7.1 | http://redhat.com/rhel-atomic/7.1
rhel-atomic-7.2 | Red Hat Enterprise Linux Atomic Host 7.2 | 7.2 | http://redhat.com/rhel-atomic/7.2
rhel-atomic-7.3 | Red Hat Enterprise Linux Atomic Host 7.3 | 7.3 | http://redhat.com/rhel-atomic/7.3
rhel-atomic-7.4 | Red Hat Enterprise Linux Atomic Host 7.4 | 7.4 | http://redhat.com/rhel-atomic/7.4
rhel-unknown | Red Hat Enterprise Linux Unknown | unknown | http://redhat.com/rhel/unknown
rhel2.1 | Red Hat Enterprise Linux 2.1 | 2.1 | http://redhat.com/rhel/2.1
rhel2.1.1 | Red Hat Enterprise Linux 2.1 Update 1 | 2.1.1 | http://redhat.com/rhel/2.1.1
rhel2.1.2 | Red Hat Enterprise Linux 2.1 Update 2 | 2.1.2 | http://redhat.com/rhel/2.1.2
rhel2.1.3 | Red Hat Enterprise Linux 2.1 Update 3 | 2.1.3 | http://redhat.com/rhel/2.1.3
rhel2.1.4 | Red Hat Enterprise Linux 2.1 Update 4 | 2.1.4 | http://redhat.com/rhel/2.1.4
rhel2.1.5 | Red Hat Enterprise Linux 2.1 Update 5 | 2.1.5 | http://redhat.com/rhel/2.1.5
rhel2.1.6 | Red Hat Enterprise Linux 2.1 Update 6 | 2.1.6 | http://redhat.com/rhel/2.1.6
rhel2.1.7 | Red Hat Enterprise Linux 2.1 Update 7 | 2.1.7 | http://redhat.com/rhel/2.1.7
rhel3 | Red Hat Enterprise Linux 3 | 3 | http://redhat.com/rhel/3
rhel3.1 | Red Hat Enterprise Linux 3 Update 1 | 3.1 | http://redhat.com/rhel/3.1
rhel3.2 | Red Hat Enterprise Linux 3 Update 2 | 3.2 | http://redhat.com/rhel/3.2
rhel3.3 | Red Hat Enterprise Linux 3 Update 3 | 3.3 | http://redhat.com/rhel/3.3
rhel3.4 | Red Hat Enterprise Linux 3 Update 4 | 3.4 | http://redhat.com/rhel/3.4
rhel3.5 | Red Hat Enterprise Linux 3 Update 5 | 3.5 | http://redhat.com/rhel/3.5
rhel3.6 | Red Hat Enterprise Linux 3 Update 6 | 3.6 | http://redhat.com/rhel/3.6
rhel3.7 | Red Hat Enterprise Linux 3 Update 7 | 3.7 | http://redhat.com/rhel/3.7
rhel3.8 | Red Hat Enterprise Linux 3 Update 8 | 3.8 | http://redhat.com/rhel/3.8
rhel3.9 | Red Hat Enterprise Linux 3 Update 9 | 3.9 | http://redhat.com/rhel/3.9
rhel4.0 | Red Hat Enterprise Linux 4.0 | 4.0 | http://redhat.com/rhel/4.0
rhel4.1 | Red Hat Enterprise Linux 4.1 | 4.1 | http://redhat.com/rhel/4.1
rhel4.2 | Red Hat Enterprise Linux 4.2 | 4.2 | http://redhat.com/rhel/4.2
rhel4.3 | Red Hat Enterprise Linux 4.3 | 4.3 | http://redhat.com/rhel/4.3
rhel4.4 | Red Hat Enterprise Linux 4.4 | 4.4 | http://redhat.com/rhel/4.4
rhel4.5 | Red Hat Enterprise Linux 4.5 | 4.5 | http://redhat.com/rhel/4.5
rhel4.6 | Red Hat Enterprise Linux 4.6 | 4.6 | http://redhat.com/rhel/4.6
rhel4.7 | Red Hat Enterprise Linux 4.7 | 4.7 | http://redhat.com/rhel/4.7
rhel4.8 | Red Hat Enterprise Linux 4.8 | 4.8 | http://redhat.com/rhel/4.8
rhel4.9 | Red Hat Enterprise Linux 4.9 | 4.9 | http://redhat.com/rhel/4.9
rhel5.0 | Red Hat Enterprise Linux 5.0 | 5.0 | http://redhat.com/rhel/5.0
rhel5.1 | Red Hat Enterprise Linux 5.1 | 5.1 | http://redhat.com/rhel/5.1
rhel5.10 | Red Hat Enterprise Linux 5.10 | 5.10 | http://redhat.com/rhel/5.10
rhel5.11 | Red Hat Enterprise Linux 5.11 | 5.11 | http://redhat.com/rhel/5.11
rhel5.2 | Red Hat Enterprise Linux 5.2 | 5.2 | http://redhat.com/rhel/5.2
rhel5.3 | Red Hat Enterprise Linux 5.3 | 5.3 | http://redhat.com/rhel/5.3
rhel5.4 | Red Hat Enterprise Linux 5.4 | 5.4 | http://redhat.com/rhel/5.4
rhel5.5 | Red Hat Enterprise Linux 5.5 | 5.5 | http://redhat.com/rhel/5.5
rhel5.6 | Red Hat Enterprise Linux 5.6 | 5.6 | http://redhat.com/rhel/5.6
rhel5.7 | Red Hat Enterprise Linux 5.7 | 5.7 | http://redhat.com/rhel/5.7
rhel5.8 | Red Hat Enterprise Linux 5.8 | 5.8 | http://redhat.com/rhel/5.8
rhel5.9 | Red Hat Enterprise Linux 5.9 | 5.9 | http://redhat.com/rhel/5.9
rhel6-unknown | Red Hat Enterprise Linux 6 Unknown | 6-unknown | http://redhat.com/rhel/6-unknown
rhel6.0 | Red Hat Enterprise Linux 6.0 | 6.0 | http://redhat.com/rhel/6.0
rhel6.1 | Red Hat Enterprise Linux 6.1 | 6.1 | http://redhat.com/rhel/6.1
rhel6.10 | Red Hat Enterprise Linux 6.10 | 6.10 | http://redhat.com/rhel/6.10
rhel6.2 | Red Hat Enterprise Linux 6.2 | 6.2 | http://redhat.com/rhel/6.2
rhel6.3 | Red Hat Enterprise Linux 6.3 | 6.3 | http://redhat.com/rhel/6.3
rhel6.4 | Red Hat Enterprise Linux 6.4 | 6.4 | http://redhat.com/rhel/6.4
rhel6.5 | Red Hat Enterprise Linux 6.5 | 6.5 | http://redhat.com/rhel/6.5
rhel6.6 | Red Hat Enterprise Linux 6.6 | 6.6 | http://redhat.com/rhel/6.6
rhel6.7 | Red Hat Enterprise Linux 6.7 | 6.7 | http://redhat.com/rhel/6.7
rhel6.8 | Red Hat Enterprise Linux 6.8 | 6.8 | http://redhat.com/rhel/6.8
rhel6.9 | Red Hat Enterprise Linux 6.9 | 6.9 | http://redhat.com/rhel/6.9
rhel7-unknown | Red Hat Enterprise Linux 7 Unknown | 7-unknown | http://redhat.com/rhel/7-unknown
rhel7.0 | Red Hat Enterprise Linux 7.0 | 7.0 | http://redhat.com/rhel/7.0
rhel7.1 | Red Hat Enterprise Linux 7.1 | 7.1 | http://redhat.com/rhel/7.1
rhel7.2 | Red Hat Enterprise Linux 7.2 | 7.2 | http://redhat.com/rhel/7.2
rhel7.3 | Red Hat Enterprise Linux 7.3 | 7.3 | http://redhat.com/rhel/7.3
rhel7.4 | Red Hat Enterprise Linux 7.4 | 7.4 | http://redhat.com/rhel/7.4
rhel7.5 | Red Hat Enterprise Linux 7.5 | 7.5 | http://redhat.com/rhel/7.5
rhel7.6 | Red Hat Enterprise Linux 7.6 | 7.6 | http://redhat.com/rhel/7.6
rhel7.7 | Red Hat Enterprise Linux 7.7 | 7.7 | http://redhat.com/rhel/7.7
rhel7.8 | Red Hat Enterprise Linux 7.8 | 7.8 | http://redhat.com/rhel/7.8
rhel7.9 | Red Hat Enterprise Linux 7.9 | 7.9 | http://redhat.com/rhel/7.9
rhel8-unknown | Red Hat Enterprise Linux 8 Unknown | 8-unknown | http://redhat.com/rhel/8-unknown
rhel8.0 | Red Hat Enterprise Linux 8.0 | 8.0 | http://redhat.com/rhel/8.0
rhel8.1 | Red Hat Enterprise Linux 8.1 | 8.1 | http://redhat.com/rhel/8.1
rhel8.2 | Red Hat Enterprise Linux 8.2 | 8.2 | http://redhat.com/rhel/8.2
rhel8.3 | Red Hat Enterprise Linux 8.3 | 8.3 | http://redhat.com/rhel/8.3
rhel8.4 | Red Hat Enterprise Linux 8.4 | 8.4 | http://redhat.com/rhel/8.4
rhel9-unknown | Red Hat Enterprise Linux 9 Unknown | 9-unknown | http://redhat.com/rhel/9-unknown
rhel9.0 | Red Hat Enterprise Linux 9.0 | 9.0 | http://redhat.com/rhel/9.0
rhl1.0 | Red Hat Linux 1.0 | 1.0 | http://redhat.com/rhl/1.0
rhl1.1 | Red Hat Linux 1.1 | 1.1 | http://redhat.com/rhl/1.1
rhl2.0 | Red Hat Linux 2.0 | 2.0 | http://redhat.com/rhl/2.0
rhl2.1 | Red Hat Linux 2.1 | 2.1 | http://redhat.com/rhl/2.1
rhl3.0.3 | Red Hat Linux 3.0.3 | 3.0.3 | http://redhat.com/rhl/3.0.3
rhl4.0 | Red Hat Linux 4.0 | 4.0 | http://redhat.com/rhl/4.0
rhl4.1 | Red Hat Linux 4.1 | 4.1 | http://redhat.com/rhl/4.1
rhl4.2 | Red Hat Linux 4.2 | 4.2 | http://redhat.com/rhl/4.2
rhl5.0 | Red Hat Linux 5.0 | 5.0 | http://redhat.com/rhl/5.0
rhl5.1 | Red Hat Linux 5.1 | 5.1 | http://redhat.com/rhl/5.1
rhl5.2 | Red Hat Linux 5.2 | 5.2 | http://redhat.com/rhl/5.2
rhl6.0 | Red Hat Linux 6.0 | 6.0 | http://redhat.com/rhl/6.0
rhl6.1 | Red Hat Linux 6.1 | 6.1 | http://redhat.com/rhl/6.1
rhl6.2 | Red Hat Linux 6.2 | 6.2 | http://redhat.com/rhl/6.2
rhl7 | Red Hat Linux 7 | 7 | http://redhat.com/rhl/7
rhl7.1 | Red Hat Linux 7.1 | 7.1 | http://redhat.com/rhl/7.1
rhl7.2 | Red Hat Linux 7.2 | 7.2 | http://redhat.com/rhl/7.2
rhl7.3 | Red Hat Linux 7.3 | 7.3 | http://redhat.com/rhl/7.3
rhl8.0 | Red Hat Linux 8.0 | 8.0 | http://redhat.com/rhl/8.0
rhl9 | Red Hat Linux 9 | 9 | http://redhat.com/rhl/9

Afin d'installer une machine virtuelle nous avons besoin d'identifier le Short ID de la version à installer. Cette information se trouve dans la première colonne de la sortie de la commande. Les trois autres colonnes indiquent :

Colonne 2,

Name,

Le nom officiel du système d'exploitation,

Colonne 3,

Version,

La version du système d'exploitation,

Colonne 4,

ID,

Un URL censé pointer vers la page officielle de la version de la distribution. Attention : ces URLs sont bien souvent inexactes,

Pour rechercher le Short ID de CentOS 8, recherchez centos dans la sortie de la commande osinfo-query os :

[root@centos8 ~]# osinfo-query os | grep centos
centos-stream8 | CentOS Stream 8 | 8 | http://centos.org/centos-stream/8
centos5.0 | CentOS 5.0 | 5.0 | http://centos.org/centos/5.0
centos5.1 | CentOS 5.1 | 5.1 | http://centos.org/centos/5.1
centos5.10 | CentOS 5.10 | 5.10 | http://centos.org/centos/5.10
centos5.11 | CentOS 5.11 | 5.11 | http://centos.org/centos/5.11
centos5.2 | CentOS 5.2 | 5.2 | http://centos.org/centos/5.2
centos5.3 | CentOS 5.3 | 5.3 | http://centos.org/centos/5.3
centos5.4 | CentOS 5.4 | 5.4 | http://centos.org/centos/5.4
centos5.5 | CentOS 5.5 | 5.5 | http://centos.org/centos/5.5
centos5.6 | CentOS 5.6 | 5.6 | http://centos.org/centos/5.6
centos5.7 | CentOS 5.7 | 5.7 | http://centos.org/centos/5.7
centos5.8 | CentOS 5.8 | 5.8 | http://centos.org/centos/5.8
centos5.9 | CentOS 5.9 | 5.9 | http://centos.org/centos/5.9
centos6.0 | CentOS 6.0 | 6.0 | http://centos.org/centos/6.0
centos6.1 | CentOS 6.1 | 6.1 | http://centos.org/centos/6.1
centos6.10 | CentOS 6.10 | 6.10 | http://centos.org/centos/6.10
centos6.2 | CentOS 6.2 | 6.2 | http://centos.org/centos/6.2
centos6.3 | CentOS 6.3 | 6.3 | http://centos.org/centos/6.3
centos6.4 | CentOS 6.4 | 6.4 | http://centos.org/centos/6.4
centos6.5 | CentOS 6.5 | 6.5 | http://centos.org/centos/6.5
centos6.6 | CentOS 6.6 | 6.6 | http://centos.org/centos/6.6
centos6.7 | CentOS 6.7 | 6.7 | http://centos.org/centos/6.7
centos6.8 | CentOS 6.8 | 6.8 | http://centos.org/centos/6.8
centos6.9 | CentOS 6.9 | 6.9 | http://centos.org/centos/6.9
centos7.0 | CentOS 7 | 7 | http://centos.org/centos/7.0
centos8 | CentOS 8 | 8 | http://centos.org/centos/8

Important : Notez que le Short ID de CentOS 8 est actuellement centos8 quelque soit la version.

1.2 - Configuration du Stockage des ISOs

Afin d'installer la machine virtuelle il est nécessaire d'avoir accès à l'ISO de celui-ci. Pour des raisons de performances il est souhaitable que cet ISO soit stocké localement ou bien sur un système de fichiers distant sans latence. Un ISO de CentOS 8 a été préchargé dans le répertoire /root de votre VM. Cet ISO doit être placé dans un en droit accessible par l'utilisateur et le groupe qemu. Créez donc le répertoire /isos, placez l'ISO dans ce répertoire et accordez les permissions adéquates :

[root@centos8 ~]# ls -l | grep CentOS
-rw-r--r--. 1 root root 625999872 Sep 3 04:44 CentOS-8.1.1911-x86_64-boot.iso
[root@centos8 ~]# chmod 755 CentOS-8.1.1911-x86_64-boot.iso
[root@centos8 ~]# mkdir /isos
[root@centos8 ~]# mv CentOS-8.1.1911-x86_64-boot.iso /isos
[root@centos8 ~]# chown -R qemu:qemu /isos

1.3 - Installation du Domain

Démarrez maintenant l'installation d'une machine virtuelle CentOS 8 grâce à la commande virt-install :

[root@centos8 ~]# virt-install --network bridge:virbr0 --name testvm1 --os-variant=centos8 --ram=2048 --vcpus=1 --disk path=/var/lib/libvirt/images/testvm1-os.qcow2,bus=virtio,size=5 --graphics none --location=/isos/CentOS-8.1.1911-x86_64-boot.iso --extra-args="console=tty0 console=ttyS0,115200" --check all=off
Starting install...
Retrieving file vmlinuz... | 7.7 MB 00:00:00
Retrieving file initrd.img... | 59 MB 00:00:00
Allocating 'testvm1-os.qcow2' | 5.0 GB 00:00:00
WARNING Overriding memory to 3072 MiB needed for centos8 network install.
Connected to domain testvm1
Escape character is ^]
[ 0.000000] Linux version 4.18.0-147.el8.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC)) #1 SMP Wed Dec 4 21:51:45 UTC 2019
...

Important : Notez que la quantité de mémoire est automatiquement et provisoirement augmentée à 3072 Mo afin que l'installation se déroule correctement. Notez aussi l'utilisation du mot domain. Un domain sous KVM est un terme utilisé pour décrire une machine virtuelle.

Dans cette commande on peut constater l'utilisation de plusieurs options importantes :

Option	Commentaire
–network bridge:	Fixe la valeur du pont à utiliser par la VM à virbr0
–name	Indique le nom de la VM
–os-variant=	Egal à la valeur du Short ID identifié au-dessus
–ram=	Fixe la quantité de la RAM de la VM en Mo
–vcpus=	Fixe le nombre de vCPUs de la VM
–disk path=	Crée une image pour la VM, au format indiqué et de la taille indiquée en Go, à l'emplacement spécifié
–graphics	La valeur none indique que l'installation aura lieu en mode texte. Notez que dans le cas d'une VM Windows™, la valeur doit être spice
–location=	Indique l'emplacement de l'ISO à utiliser pour l'installation
–extra-args=	Indique les options de la connectivité de la console

Format des Images

Une image est un disque virtuel. KVM reconnait les formats d'image suivants :

[root@centos8 ~]# qemu-img -h | grep Supported
Supported formats: blkdebug blklogwrites blkreplay blkverify copy-on-read file ftp ftps gluster host_cdrom host_device http https iscsi iser luks nbd null-aio null-co nvme qcow2 quorum raw rbd ssh throttle vhdx vmdk vpc

Important : Consultez cette page pour plus d'informations.

Convertir le Format de l'Image

Il est possible de convertir un format d'image existante au format qcow2 avec la commande qemu-img convert, notamment les images au format qed, raw, vdi, vhd et vmdk. Par exemple :

# qemu-img convert -f vmdk -O qcow2 myimage.vmdk mynewimage.qcow2

Dans le cas d'une image au format vdi d'Oracle VirtualBox, il est préférable de créer une image au format raw en utilisant la commande VBoxManage :

# VBoxManage clonehd myimage.vdi myrawimage.img --format raw

Ensuite il convient d'utiliser la commande qemu-img convert pour convertir l'image au format raw en qcow2 :

# qemu-img convert -f raw -O qcow2 myrawimage.img mynewimage.qcow2

1.4 - Configuration de l'Installation de l'OS Invité

Language Settings

Commencez par appuyer sur le choix 1 :

...
Starting installer, one moment...
anaconda 29.19.1.13-1.el8 for CentOS Linux 8 started.
* installation log files are stored in /tmp during the installation
* shell is available on TTY2
* if the graphical installation interface fails to start, try again with the
inst.text bootoption to start text installation
* when reporting a bug add logs from /tmp as separate text/plain attachments
14:08:33 Not asking for VNC because we don't have a network
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(English (United States)) (America/New_York timezone)
3) [!] Installation source 4) [!] Software selection
(Processing...) (Processing...)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [!] Network configuration 8) [!] Root password
(Not connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 1
================================================================================
================================================================================
3) Arabic 29) Hebrew 55) Norwegian Nynorsk
4) Assamese 30) Hindi 56) Northern Sotho
5) Asturian 31) Croatian 57) Odia
6) Belarusian 32) Hungarian 58) Punjabi
7) Bulgarian 33) Interlingua 59) Polish
8) Bangla 34) Indonesian 60) Portuguese
9) Tibetan 35) Icelandic 61) Romanian
10) Bosnian 36) Italian 62) Russian
11) Catalan 37) Japanese 63) Sinhala
12) Czech 38) Georgian 64) Slovak
13) Welsh 39) Kazakh 65) Slovenian
14) Danish 40) Khmer 66) Albanian
15) German 41) Kannada 67) Serbian
16) Greek 42) Korean 68) Swedish
17) English 43) Lithuanian 69) Tamil
18) Spanish 44) Latvian 70) Telugu
19) Estonian 45) Maithili 71) Tajik
20) Basque 46) Macedonian 72) Thai
21) Persian 47) Malayalam 73) Turkish
22) Finnish 48) Marathi 74) Ukrainian
23) Filipino 49) Malay 75) Urdu
24) French 50) Burmese 76) Vietnamese
25) Friulian 51) Norwegian Bokmål 77) Mandarin Chinese
Press ENTER to continue:
26) Irish 52) Low German 78) Zulu

Choisissez l'option 24 puis l'option 1 :

Please select language support to install ['b' to return to language list, 'c'
to continue, 'q' to quit, 'r' to refresh]: 24
================================================================================
================================================================================
Language settings
Available locales
1) French (France) 3) French (Belgium) 5) French (Luxembourg)
2) French (Canada) 4) French (Switzerland)
Please select language support to install ['b' to return to language list, 'c'
to continue, 'q' to quit, 'r' to refresh]: 1
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (America/New_York timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [!] Network configuration 8) [!] Root password
(Not connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:
[anaconda]1:main* 2:shell 3:log 4:storage-log >Switch tab: Alt+Tab | Help: F1

Network configuration

Choisissez maintenant l'option 7 :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (America/New_York timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [!] Network configuration 8) [!] Root password
(Not connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 7
================================================================================
================================================================================
Network configuration
Wired (enp1s0) disconnected
Host Name: localhost.localdomain
Current host name: localhost
1) Set host name
2) Configure device enp1s0

Choisissez ensuite l'option 1 pour définir le nom d'hôte de la VM :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 1
================================================================================
================================================================================
Enter a new value for 'Host Name' and press ENTER: testvm1.ittraining.network
================================================================================
================================================================================
Network configuration
Wired (enp1s0) disconnected
Host Name: testvm1.ittraining.network
Current host name: localhost
1) Set host name
2) Configure device enp1s0

Choisissez l'option 2 pour configurer la connexion réseau :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 2
================================================================================
================================================================================
Device configuration
1) IPv4 address or "dhcp" for DHCP
dhcp
2) IPv4 netmask
3) IPv4 gateway
4) IPv6 address[/prefix] or "auto" for automatic, "dhcp" for DHCP, "ignore" to
turn off
auto
5) IPv6 default gateway
6) Nameservers (comma separated)
7) [ ] Connect automatically after reboot
8) [ ] Apply configuration in installer
Configuring device enp1s0.

Laissez l’option 1 en 192.168.56.50, l'option 2 en 255.255.255.0, l'option 3 en 192.168.56.1 puis choisissez l'option 6 pour définir les serveurs DNS en 8.8.8.8,8.8.4.4 :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 6
================================================================================
================================================================================
Enter a new value for 'Nameservers (comma separated)' and press ENTER: 8.8.8.8,8
.8.4.4
================================================================================
================================================================================
Device configuration
1) IPv4 address or "dhcp" for DHCP
192.168.56.50
2) IPv4 netmask
255.255.255.0
3) IPv4 gateway
192.168.56.1
4) IPv6 address[/prefix] or "auto" for automatic, "dhcp" for DHCP, "ignore" to
turn off
auto
5) IPv6 default gateway
6) Nameservers (comma separated)
8.8.8.8,8.8.4.4
7) [ ] Connect automatically after reboot
8) [ ] Apply configuration in installer
Configuring device enp1s0.

Il est important de configurer la prise en compte automatique de la configuration après le re-démarrage. Choisissez donc l'option 7 :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 7
================================================================================
================================================================================
Device configuration
1) IPv4 address or "dhcp" for DHCP
192.168.56.50
2) IPv4 netmask
255.255.255.0
3) IPv4 gateway
192.168.56.1
4) IPv6 address[/prefix] or "auto" for automatic, "dhcp" for DHCP, "ignore" to
turn off
auto
5) IPv6 default gateway
6) Nameservers (comma separated)
8.8.8.8,8.8.4.4
7) [x] Connect automatically after reboot
8) [ ] Apply configuration in installer
Configuring device enp1s0.

Pour pouvoir installer les paquets logiciels, la configuration réseau doit être appliquée immédiatement. Choisissez donc l'option 8 :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 8
================================================================================
================================================================================
Device configuration
1) IPv4 address or "dhcp" for DHCP
192.168.56.50
2) IPv4 netmask
255.255.255.0
3) IPv4 gateway
192.168.56.1
4) IPv6 address[/prefix] or "auto" for automatic, "dhcp" for DHCP, "ignore" to
turn off
auto
5) IPv6 default gateway
6) Nameservers (comma separated)
8.8.8.8,8.8.4.4
7) [x] Connect automatically after reboot
8) [x] Apply configuration in installer
Configuring device enp1s0.

Validez les configurations actuelles en appuyant sur la touche c :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
================================================================================
================================================================================
Network configuration
Wired (enp1s0) disconnected
Host Name: testvm1.ittraining.network
Current host name: localhost
1) Set host name
2) Configure device enp1s0

Pour retourner au menu principal, appuyez sur la touche c de nouveau :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (America/New_York timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [!] Root password
(Wired (enp1s0) connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:
[anaconda]1:main* 2:shell 3:log 4:storage-log >Switch tab: Alt+Tab | Help: F1

Time settings

Choisissez maintenant l'option 2 pour définir le fuseau d'horaire de la VM :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (America/New_York timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [!] Root password
(Wired (enp1s0) connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 2
================================================================================
================================================================================
Time settings
Timezone: America/New_York
NTP servers:not configured
1) Change timezone
2) Configure NTP servers

Choisissez l'option 1 pour modifier le fuseau d'horaire :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 1
================================================================================
================================================================================
Timezone settings
Available regions
1) Europe 5) Antarctica 9) Indian
2) Asia 6) Pacific 10) Arctic
3) America 7) Australia 11) US
4) Africa 8) Atlantic 12) Etc

Appuyez sur la touche 1 pour choisir Europe :

Please select the timezone. Use numbers or type names directly ['b' back to
region list, 'c' to continue, 'q' to quit, 'r' to refresh]: 1
================================================================================
================================================================================
1) Amsterdam 21) Kaliningrad 41) San_Marino
2) Andorra 22) Kiev 42) Sarajevo
3) Astrakhan 23) Kirov 43) Saratov
4) Athens 24) Lisbon 44) Simferopol
5) Belgrade 25) Ljubljana 45) Skopje
6) Berlin 26) London 46) Sofia
7) Bratislava 27) Luxembourg 47) Stockholm
8) Brussels 28) Madrid 48) Tallinn
9) Bucharest 29) Malta 49) Tirane
10) Budapest 30) Mariehamn 50) Ulyanovsk
11) Busingen 31) Minsk 51) Uzhgorod
12) Chisinau 32) Monaco 52) Vaduz
13) Copenhagen 33) Moscow 53) Vatican
14) Dublin 34) Oslo 54) Vienna
15) Gibraltar 35) Paris 55) Vilnius
16) Guernsey 36) Podgorica 56) Volgograd
17) Helsinki 37) Prague 57) Warsaw
18) Isle_of_Man 38) Riga 58) Zagreb
19) Istanbul 39) Rome 59) Zaporozhye
20) Jersey 40) Samara 60) Zurich

Puis choisissez l'option 35 pour Paris :

Please select the timezone. Use numbers or type names directly ['b' back to
region list, 'c' to continue, 'q' to quit, 'r' to refresh]: 35
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [!] Root password
(Wired (enp1s0) connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:

Root password

Pour définir le mot de passe root de la VM, choisissez l'option 8 et indiquez le mot de passe fenestros :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [!] Root password
(Wired (enp1s0) connected) (Password is not set.)
9) [!] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 8
================================================================================
================================================================================
Root password
Please select new root password. You will have to type it twice.
Password: fenestros
Password (confirm): fenestros
================================================================================
================================================================================
Question
The password you have provided is weak: The password fails the dictionary check
- it is based on a dictionary word
Would you like to use it anyway?
Please respond 'yes' or 'no': yes
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:

Installation source

Choisissez l'option 3 :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Error checking software
source) selection)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 3
================================================================================
================================================================================
Installation source
Choose an installation source type.
1) CD/DVD
2) local ISO file
3) Network

L'ISO utilisé est de type net-install. Choisissez donc l'option 3 :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 3
================================================================================
================================================================================
Installation source
1) Closest mirror
2) http://
3) https://
4) ftp://
5) nfs

Choisissez l'option 3 et indiquez l'URL https://vault.centos.org/8.1.1911/BaseOS/x86_64/os :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 1
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [x] Installation source 4) [!] Software selection
https://vault.centos.org/ (Nothing selected)
8.1.1911/BaseOS/x86_64/os
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:

Software selection

Choisissez l'option 4 puis l'option 3 pour indiquer une installation minimale du système :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [x] Installation source 4) [!] Software selection
https://vault.centos.org/ (Nothing selected)
8.1.1911/BaseOS/x86_64/os
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 4
================================================================================
================================================================================
Software selection
Base environment
1) [ ] Server with GUI 4) [ ] Workstation
2) [ ] Server 5) [ ] Virtualization Host
3) [ ] Minimal Install 6) [ ] Custom Operating System
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 3
================================================================================
================================================================================
Software selection
Base environment
1) [ ] Server with GUI 4) [ ] Workstation
2) [ ] Server 5) [ ] Virtualization Host
3) [x] Minimal Install 6) [ ] Custom Operating System

Appuyez ensuite sur la touche c pour pouvoir éventuellement choisir des installations supplémentaires :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
================================================================================
================================================================================
Software selection
Additional software for selected environment
1) [ ] Guest Agents 8) [ ] Headless Management
2) [ ] Standard 9) [ ] Legacy UNIX Compatibility
3) [ ] Container Management 10) [ ] Network Servers
4) [ ] .NET Core Development 11) [ ] Scientific Support
5) [ ] RPM Development Tools 12) [ ] Security Tools
6) [ ] Development Tools 13) [ ] Smart Card Support
7) [ ] Graphical Administration Tools 14) [ ] System Tools

Ne choisissez rien dans la liste et appuyez simplement sur la touche c pour revenir au menu principal :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [!] Installation source 4) [!] Software selection
(Processing...) (Processing...)
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: r
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [x] Installation source 4) [x] Software selection
https://vault.centos.org/ (Minimal Install)
8.1.1911/BaseOS/x86_64/os
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]:

Installation Destination

Choisissez l'option 5 pour définir l'emplacement de l'installation :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [x] Installation source 4) [x] Software selection
https://vault.centos.org/ (Minimal Install)
8.1.1911/BaseOS/x86_64/os
5) [!] Installation Destination 6) [x] Kdump
(No disks selected) (Kdump is enabled)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: 5
Probing storage...

Séléctionnez le disque vda et appuyez sur la touche c :

================================================================================
================================================================================
Installation Destination
1) [x] : 5 GiB (vda)
1 disk selected; 5 GiB capacity; 5 GiB free ...
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c

A ce stade il vous est possible de choisir l'option 4 et de créer des partitions spécifiques en termes de points de montage en fonction de l'utilisation prévue pour la VM. Dans le cas de ce LAB, appuyez simplement sur le chois 2 puis sur la touche c :

================================================================================
================================================================================
Partitioning Options
1) [ ] Replace Existing Linux system(s)
2) [ ] Use All Space
3) [ ] Use Free Space
4) [ ] Manually assign mount points
Installation requires partitioning of your hard drive. Select what space to use
for the install target or manually assign mount points.
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 2
================================================================================
================================================================================
Partitioning Options
1) [ ] Replace Existing Linux system(s)
2) [x] Use All Space
3) [ ] Use Free Space
4) [ ] Manually assign mount points
Installation requires partitioning of your hard drive. Select what space to use
for the install target or manually assign mount points.
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c

A ce stade il vous est possible de choisir le type d'installation, soit Standard Partition, LVM ou LVM Thin Provisioning. Notez que le choix par défaut proposé est LVM :

================================================================================
================================================================================
Partition Scheme Options
1) [ ] Standard Partition
2) [x] LVM
3) [ ] LVM Thin Provisioning
Select a partition scheme configuration.

Bien que préférable de choisir l'option par défaut pour des VMs en production . Par contre, pour des raisons liées à la suite de ce LAB, choisissez l'option 1 puis sur la touche c :

Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 1
================================================================================
================================================================================
Partition Scheme Options
1) [x] Standard Partition
2) [ ] LVM
3) [ ] LVM Thin Provisioning
Select a partition scheme configuration.
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: c
Generating updated storage configuration
Checking storage configuration...

Démarrer l'Installation

De retour au menu principal, choisissez l'option b pour démarrer l'installation :

================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(French (France)) (Europe/Paris timezone)
3) [x] Installation source 4) [x] Software selection
https://vault.centos.org/ (Minimal Install)
8.1.1911/BaseOS/x86_64/os
5) [x] Installation Destination 6) [x] Kdump
(Automatic partitioning (Kdump is enabled)
selected)
7) [x] Network configuration 8) [x] Root password
(Wired (enp1s0) connected) (Password is set.)
9) [ ] User creation
(No user will be created)
Please make a selection from the above ['b' to begin installation, 'q' to quit,
'r' to refresh]: b

Important : Notez que nous n'avons pas spécifié d'utilisateurs. Cette décision n'est pas bloquante pour la suite de l'installation.

L'installation démarre et se poursuit :

...
Configuring storage
.
Installing boot loader
.
Performing post-installation setup tasks
.
Configuring installed system
..........
Writing network configuration
.
Creating users
....
Configuring addons
Executing com_redhat_kdump addon
Executing org_fedora_oscap addon
.
Generating initramfs
.
Running post-installation scripts
.
Storing configuration files and kickstarts
..

Démarrer la VM

A l'issu de l'installation, appuyez sur la touche [Enter] pour démarrez la VM :

Installation complete. Press ENTER to quit:
...
[ OK ] Started Network Manager.
Starting Network Manager Wait Online...
[ OK ] Reached target Network.
Starting OpenSSH server daemon...
Starting Permit User Sessions...
Starting Dynamic System Tuning Daemon...
Starting Hostname Service...
[ OK ] Started OpenSSH server daemon.
[ OK ] Started Permit User Sessions.
Starting Hold until boot process finishes up...
[ OK ] Started Command Scheduler.
Starting Terminate Plymouth Boot Screen...
[ 18.386454] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready

1.5 - Vérification de la VM Invitée

Au prompt, connectez-vous en tant que root avec le mot de passe fenestros :

CentOS Linux 8
Kernel 4.18.0-305.12.1.el8_4.x86_64 on an x86_64
testvm1 login: root
Mot de passe : fenestros
[root@testvm1 ~]#

Réseau

Vérifiez la prise en compte d'une adresse IPv4 dans le réseau 192.168.56.0/24 :

[root@testvm1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:44:af:a1 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.83/24 brd 192.168.56.255 scope global dynamic noprefixroute enp1s0
valid_lft 3534sec preferred_lft 3534sec
inet6 fe80::6191:6417:8b53:bcb9/64 scope link noprefixroute
valid_lft forever preferred_lft forever

Internet

Vérifiez la connectivité de la VM :

[root@testvm1 ~]# ping www.free.fr
PING www.free.fr (212.27.48.10) 56(84) bytes of data.
64 bytes from www.free.fr (212.27.48.10): icmp_seq=1 ttl=46 time=29.9 ms
64 bytes from www.free.fr (212.27.48.10): icmp_seq=2 ttl=46 time=30.1 ms
--- www.free.fr ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 29.887/29.989/30.091/0.102 ms

Avant de poursuivre, exécutez les deux commandes suivantes pour réparer les dépôts cassés :

[root@centos8 ~]# sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@centos8 ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Détachez-vous de la VM :

[root@testvm1 ~]# [ALT GR]+[CTRL]+[)]
[root@centos8 ~]#

Important : Notez l'utilisation de la séquence de touches [ALT GR]+[CTRL]+[)] sur un clavier français afin de se détacher de la VM. C'est-à-dire, la touche [AltGr] et rester appuyer plus la touche [Ctrl] et rester appuyer plus la touche [)]. Si cela ne fonctionne pas utilisez [CTRL]+[VER MAJ]+[5].

Copyright © 2022 Hugh Norris