Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:centos:8:avance:l106 [2021/09/09 11:01] – created adminelearning:workbooks:centos:8:avance:l106 [2022/02/22 15:15] (Version actuelle) – created admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
 +
 +Version : **2022.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LCF606 - Installation de Machines Virtuelles KVM======+======LCF606 - Gestion des Clones, des Snapshots et des Sauvegardes sous KVM======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LCF606 - Installation de Machines Virtuelles KVM**+  * **LCF606 - Gestion des Clones, des Snapshots et des Sauvegardes sous KVM**
     * Contenu du Module     * Contenu du Module
-    * LAB #1 - Installation d'une Machine Virtuelle CentOS 8 +    * LAB #1 - Gestion des Clones 
-      * 1.1 - Identification du Short ID +      * 1.1 - Création d'une VM à partir d'un Clone 
-      1.2 - Configuration du Stockage des ISOs +    LAB #2 - Gestion des Snapshots 
-      * 1.Installation du Domaine +      * 2.Création d'un Snapshot - VM Arrêté 
-        Format des Images +      2.2 - Création d'un Snapshot - VM en Cours d'Exécution 
-        Convertir le Format de l'Image +      2.3 - Restauration d'un Snapshot 
-      * 1.4 - Configuration de l'Installation de l'OS Invité +      * 2.4 - Suppression de Snapshots 
-        Language Settings +    LAB #3 - Gestion des Sauvegardes 
-        Network configuration +      3.1 - Création d'une Copie du Disque de la VM 
-        * Time settings +      * 3.Création d'une Copie de la Configuration de la VM 
-        * Root password +      3.3 - Sauvegarder les Copies 
-        * Installation source +             
-        * Software selection +=====LAB #1 - Gestion des Clones=====
-        * Installation Destination +
-        * Démarrer l'Installation +
-        * Démarrer la VM +
-      * 1.Vérification de la VM Invitée +
-        Réseau +
-        * Internet+
  
-=====LAB #1 - Installation d'une Machine Virtuelle CentOS 8=====+La création de clones offre une méthode rapide de création de VMs basées sur des configurations déjà existantes.
  
-====1.1 - Identification du Short ID====+====1.1 - Création d'une VM à partir d'un Clone====
  
-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** :+Commencez par vérifier l'état de la machine virtuelle **testvm1** en utilisant la commande **virsh list** :
  
 <code> <code>
-[root@centos8 ~]# osinfo-query os | more +[root@centos8 ~]# virsh list 
- Short ID             Name                                               | Version  | ID                                       + Id   Name      State 
-----------------------+----------------------------------------------------+----------+----------------------------------------- +------------------------- 
- alpinelinux3.10      | Alpine Linux 3.10                                  | 3.10     | http://alpinelinux.org/alpinelinux/3.10  +    testvm1   running
- 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--+
 </code> </code>
- 
-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 : 
- 
-<code> 
-[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/                
- 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/                 
- 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/ 
-</code> 
- 
-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** : 
-  
-<code> 
-[root@centos8 ~]# osinfo-query os | grep centos 
- centos-stream8       | CentOS Stream 8                                    | 8        | http://centos.org/centos-stream/       
- 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/ 
- </code> 
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**Important** : Notez que le Short ID de CentOS 8 est actuellement **centos8** quelque soit la version.+**Important** : Notez que la VM est dans un état de **running** et que son **Id** est de **3**.
 </WRAP> </WRAP>
  
-====1.2 - Configuration du Stockage des ISOs==== +Afin de procéder à la création d'un clone, arrêtez la VM avec la commande **virsh shutdown**. Cette commande peut prendre en argument l'**Id** de la VM, le **nom** de la VM ou bien l'**UUID** de la VM :
- +
-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 VMCet 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 :+
  
 <code> <code>
-[root@centos8 ~]# ls -l | grep CentOS +[root@centos8 ~]# virsh shutdown 3 
--rw-r--r--. 1 root root 625999872 Sep  04:44 CentOS-8.1.1911-x86_64-boot.iso+Domain is being shutdown 
 +</code>
  
-[root@centos8 ~]# chmod 755 CentOS-8.1.1911-x86_64-boot.iso +Vérifiez ensuite que la VM est arrêtée :
  
-[root@centos8 ~]# mkdir /isos+<code> 
 +[root@centos8 ~]# virsh list 
 + Id   Name   State 
 +--------------------
  
-[root@centos8 ~]# mv CentOS-8.1.1911-x86_64-boot.iso /isos 
- 
-[root@centos8 ~]# chown -R qemu:qemu /isos 
 </code> </code>
  
-====1.3 Installation du Domain====+Utilisez la commande **virsh-clone** pour créer une deuxième VM dénommée **testvm2** ayant une image au format qcow2 stockée dans le répertoire **/var/lib/libvirt/images/** :
  
-Démarrez maintenant l'installation d'une machine virtuelle **CentOS 8** grâce à la commande **virt-install** : 
-       
 <code> <code>
-[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=--graphics none --location=/isos/CentOS-8.1.1911-x86_64-boot.iso --extra-args="console=tty0 console=ttyS0,115200" --check all=off+[root@centos8 ~]# virt-clone --original testvm1 --name testvm2 -/var/lib/libvirt/images/testvm2.qcow2 
 +Allocating 'testvm2.qcow2'                                                                                                                        | 5.0 GB  00:00:18     
  
-Starting install... +Clone 'testvm2created successfully.
-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 +
-...+
 </code> </code>
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-**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+**Important** : Notez la rapidité de la création du clone par rapport à la lenteur de la création d'une VM à partir d'une image ISO.
 </WRAP> </WRAP>
  
-Dans cette commande on peut constater l'utilisation de plusieurs options : +La sortie de la commande **virsh list** ne montre pas les VMs en état d'arrêt :
- +
-^ 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(tm), 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 | +
-| --check all= | Fixe la valeur du pont à utiliser par la VM à virbr0 | +
- +
-===Format des Images=== +
- +
-Une image est un disque virtuel. KVM reconnait les formats d'image suivants :+
  
 <code> <code>
-[root@centos8 ~]# qemu-img -h | grep Supported +[root@centos8 ~]# virsh list 
-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 + Id   Name   State 
-</code> +--------------------
- +
-<WRAP center round important 60%> +
-**Important** : Consultez **[[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-using_qemu_img-supported_qemu_img_formats|cette page]]** pour plus d'informations. +
-</WRAP>   +
- +
-===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 : +
- +
-<file> +
-# qemu-img convert -f vmdk -O qcow2 myimage.vmdk mynewimage.qcow2 +
-</file> +
- +
-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** : +
- +
-<file> +
-# VBoxManage clonehd myimage.vdi myrawimage.img --format raw +
-</file> +
- +
-Ensuite il convient d'utiliser la commande **qemu-img convert** pour convertir l'image au format raw en qcow2 : +
- +
-<file> +
-# qemu-img convert -f raw -O qcow2 myrawimage.img mynewimage.qcow2 +
-</file> +
- +
-====1.4 Configuration de l'Installation de l'OS Invité==== +
- +
-===Language Settings=== +
- +
-Commencez par appuyer sur le choix **1** : +
- +
-<code> +
-... +
-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 
 </code> </code>
  
-Choisissez l'option **24** puis l'option **1** :+Pour voir la liste des VMs, peu importe leurs états, utilisez l'option **--all** de la commande **virsh list** :
  
 <code> <code>
-Please select language support to install ['b' to return to language list, 'c' +[root@centos8 ~]# virsh list --all 
-to continue, 'q' to quit, 'r' to refresh]: 24 + Id   Name      State 
-================================================================================ +-------------------------- 
-================================================================================ + -    testvm1   shut off 
-Language settings+ -    testvm2   shut off 
 + </code> 
 +  
 +Le **State** peut être une des valeurs suivantes :
  
-Available locales +  * **running** - la machine virtuelle est active, 
-1) French (France)         3) French (Belgium)        5) French (Luxembourg) +  * **blocked** ou **blocking** - la machine virtuelle est en attente d'E/S ou l'hyperviseur, 
-2) French (Canada)         4) French (Switzerland)+  * **paused** - la machine virtuelle est suspendue, 
 +  * **shutdown** - la machine virtuelle est en cours d'arrêt, 
 +  * **shut off** - la machine virtuelle est éteinte et elle n'utilise **aucune** ressource système, 
 +  * **crashed** - la machine virtuelle a crashée et est arrêtée. 
 +  
 +=====LAB #- Gestion des Snapshots=====
  
-Please select language support to install ['b' to return to language list, 'c' +La création de snapshots offre une méthode rapide de sauvegarde des VMs.
-to continue, 'q' to quit, 'r' to refresh]: 1 +
-================================================================================ +
-================================================================================ +
-Installation+
  
-1) [x] Language settings                 2) [x] Time settings +Il existe deux types de snapshots :
-       (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+  * **Internal**, 
-'r' to refresh]:  +    * uniquement possibles avec les images qcow2
-[anaconda]1:main2:shell  3:log  4:storage-log >Switch tab: Alt+Tab | Help: F1  +    * la VM est mise en pause pendant la création du snapshot, 
-</code>+    ne fonctionne pas avec des pools de stockage de type LVM. 
 +  * **External**, 
 +    * sont basés sur le concept COW (**C**opy **O**n **W**rite), 
 +    * l'image de base est mise en mode lecture seule, 
 +    * une image de type overlay en mode lecture/écriture et obligatoirement au format qcow2 est créée pour les écritures suivantes, 
 +    * est compatible avec n’importe lequel des formats de l'image de base.
  
-===Network configuration===+====2.1 - Création d'un Snapshot - VM Arrêté====
  
-Choisissez maintenant l'option **7** :+Utilisez la commande **virsh snapshot-list** pour consulter la liste des snapshots déjà présents pour la VM **testvm1** :
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# virsh snapshot-list testvm1 
-================================================================================ + Name   Creation Time   State 
-Installation+-------------------------------
  
-1) [x] Language settings                 2) [x] Time settings +</code>
-       (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 ['bto begin installation, 'q' to quit, +La création d'un snapshot se fait grâce à l'utilisation de la commande **virsh snapshot-create-as**. Les arguments obligatoires de cette commande sont :
-'r' to refresh]+
-================================================================================ +
-================================================================================ +
-Network configuration+
  
-Wired (enp1s0) disconnected+  * **--domain**, 
 +    * le domaine à l'origine du snapshot, 
 +  * **--name**, 
 +    * le nom attribué au snapshot.
  
-Host Name: localhost.localdomain 
- 
-Current host name: localhost 
- 
-1) Set host name 
-2) Configure device enp1s0 
 <code> <code>
 +[root@centos8 ~]# virsh snapshot-create-as --domain testvm1 --name "testvm1-snap-03092021"
 +Domain snapshot testvm1-snap-03092021 created
 +</code>
  
-Choisissez ensuite l'option **1** pour définir le nom d'hôte de la VM :+Vérifiez que le snapshot a bien été pris en compte :
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh snapshot-list testvm1 
-refresh]: 1 + Name                    Creation Time               State 
-================================================================================ +-------------------------------------------------------------- 
-================================================================================ + testvm1-snap-03092021   2021-09-03 11:27:10 -0400   shutoff 
-Enter a new value for 'Host Name' and press ENTERtestvm1.ittraining.network +</code>
-================================================================================ +
-================================================================================ +
-Network configuration+
  
-Wired (enp1s0) disconnected+<WRAP center round important 60%> 
 +**Important** : Notez que l'état est **shutoff**. 
 +</WRAP>
  
-Host Nametestvm1.ittraining.network+Pour obtenir des informations concernant le snapshot, il convient d'utiliser la commande **virsh snapshot-info**. L'utilisation de l'option **--current** permet d'obtenir de l'information sur le dernier snapshot effectué pour le domaine en question :
  
-Current host name: localhost 
- 
-1) Set host name 
-2) Configure device enp1s0 
 <code> <code>
- +[root@centos8 ~]# virsh snapshot-info --domain testvm1 --current 
-Choisissez l'option **2** pour configurer la connexion réseau +Name          testvm1-snap-03092021 
- +Domain:         testvm1 
-<code> +Current:        yes 
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +State:          shutoff 
-refresh]2 +Location      internal 
-================================================================================ +Parent:         - 
-================================================================================ +Children      0 
-Device configuration +Descendants   0 
- +Metadata      yes
-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. +
-<code> +
- +
-Laissez l’option **1** en **dhcp** puis choisissez l'option **6** pour définir les serveurs DNS en **8.8.8.8,8.8.4.4** +
- +
-<code> +
-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 ENTER8.8.8.8,8 +
-.8.4.4 +
-================================================================================ +
-================================================================================ +
-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) +
-   8.8.8.8,8.8.4.4 +
-7) [ ] Connect automatically after reboot +
-8) [ ] Apply configuration in installer +
- +
-Configuring device enp1s0.+
 </code> </code>
  
-Il est important de configurer la prise en compte automatique de la configuration après le re-démarrageChoisissez donc l'option **7** :+====2.2 - Création d'un Snapshot - VM en Cours d'Exécution====
  
-<code> +Il est aussi possible de prendre des snapshot d'une VM en cours d'exécution. Cependantdans le cas de beaucoup d'activité E/Sil est toutefois recommandée d'arrêter la VM.
-Please make a selection from the above ['cto continue, 'q' to quit, 'r' to +
-refresh]: 7 +
-================================================================================ +
-================================================================================ +
-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) +
-   8.8.8.8,8.8.4.4 +
-7) [x] Connect automatically after reboot +
-8) [ ] Apply configuration in installer +
- +
-Configuring device enp1s0. +
-</code>+
  
-Pour pouvoir installer les paquets logiciels, la configuration réseau doit être appliquée immédiatement. Choisissez donc l'option **8** :+Démarrez donc la VM **testvm2** avec la commande **virsh start** :
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh start testvm2 
-refresh]: 8 +Domain testvm2 started
-================================================================================ +
-================================================================================ +
-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) 
-   8.8.8.8,8.8.4.4 
-7) [x] Connect automatically after reboot 
-8) [x] Apply configuration in installer 
- 
-Configuring device enp1s0. 
 </code> </code>
  
-Validez les configurations actuelles en appuyant sur la touche **c** :+Vérifiez ensuite l'état de la VM :
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh list --all 
-refresh]: c + Id   Name      State 
-================================================================================ +-------------------------- 
-================================================================================ + 4    testvm2   running 
-Network configuration+ -    testvm1   shut off
  
-Wired (enp1s0) disconnected 
- 
-Host Name: testvm1.ittraining.network 
- 
-Current host name: localhost 
- 
-1) Set host name 
-2) Configure device enp1s0 
 </code> </code>
  
-Pour retourner au menu principal, appuyez sur la touche **c** de nouveau :+Créez un snapshot de **testvm2** :
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh snapshot-create-as --domain testvm2 --name "testvm2-snap-03092021" 
-refresh]: c +Domain snapshot testvm2-snap-03092021 created
-================================================================================ +
-================================================================================ +
-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 +
 </code> </code>
  
-===Time settings=== +Consultez la liste des snapshots pour le domaine **testvm2** :
- +
-Choisissez maintenant l'option **2** pour définir le fuseau d'horaire de la VM :+
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# virsh snapshot-list testvm2 
-================================================================================ + Name                    Creation Time               State 
-Installation +-------------------------------------------------------------- 
- + testvm2-snap-03092021   2021-09-03 11:29:49 -0400   running
-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]+
-================================================================================ +
-================================================================================ +
-Time settings +
- +
-TimezoneAmerica/New_York +
- +
-NTP servers:not configured +
- +
-1) Change timezone +
-2) Configure NTP servers+
 </code> </code>
  
-Choisissez l'option **1** pour modifier le fuseau d'horaire :+Pour obtenir des informations concernant le dernier snapshot effectué pour le domaine **testvm2**, utilisez la commande suivante :
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh snapshot-info --domain testvm2 --current 
-refresh]: 1 +Name          testvm2-snap-03092021 
-================================================================================ +Domain:         testvm2 
-================================================================================ +Current:        yes 
-Timezone settings +State:          running 
- +Location:       internal 
-Available regions +Parent:         - 
-1) Europe                  5) Antarctica              9) Indian +Children:       0 
-2) Asia                    6) Pacific                 10) Arctic +Descendants   0 
-3) America                 7) Australia               11) US +Metadata      yes
-4) Africa                  8) Atlantic                12) Etc +
-<code> +
- +
-Appuyez sur la touche **1** pour choisir **Europe** +
- +
-<code> +
-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) 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+
 </code> </code>
  
-Puis choisissez l'option **35** pour Paris :+<WRAP center round important 60%> 
 +**Important** : Notez que le **State** est **running** par rapport au snapshot précédent qui avait rapporté un **State** de **shutoff**. 
 +</WRAP>
  
-<code> +====2.3 - Restauration d'un Snapshot====
-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 +Pour restaurer un snapshot la commande virsh fournit la sous-commande **snapshot-revert**. Commencez donc par arrêter la VM :
-       (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]:  +
-</code> +
- +
-===Root password=== +
- +
-Pour définir le mot de passe root de la VM, choisissez l'option **8** et indiquez le mot de passe **fenestros** :+
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# virsh shutdown testvm2 
-================================================================================ +Domain testvm2 is being shutdown
-Installation+
  
-1) [xLanguage settings                 2) [x] Time settings +[root@centos8 ~]# virsh list --all 
-       (French (France))                        (Europe/Paris timezone) + Id   Name      State 
-3) [!] Installation source               4) [!] Software selection +-------------------------- 
-       (Error setting up software               (Error checking software + -    testvm1   shut off 
-       source)                                  selection) +    testvm2   shut off
-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]: +
 </code> </code>
  
-===Installation source=== +Restaurez ensuite le snapshot :
- +
-Choisissez l'option **3** :+
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# virsh snapshot-revert --domain testvm2 --snapshotname testvm2-snap-03092021 --running
-================================================================================ +
-Installation +
- +
-1) [xLanguage 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. +[root@centos8 ~]# virsh list --all 
-1) CD/DVD + Id   Name      State 
-2) local ISO file +-------------------------- 
-3) Network+ 5    testvm2   running 
 +    testvm1   shut off
 </code> </code>
  
-L'ISO utilisé est de type **net-install**. Choisissez donc l'option **3** :+<WRAP center round important 60%> 
 +**Important** : Notez que le **State** est **running** après la restauration du snapshot. 
 +</WRAP>
  
-<code> +Connectez-vous à la VM grâce à la commande **virsh console** et vérifiez que celle-ci ne présente pas d’anomalies de fonctionnement :
-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 +
-</code> +
- +
-Choisissez l'option **1** pour utiliser le miroir le plus proche :+
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh console 5 
-refresh]: 1 +Connected to domain testvm2 
-================================================================================ +Escape character is ^]
-================================================================================ +
-Installation+
  
-1) [x] Language settings                 2) [x] Time settings +CentOS Linux 8 
-       (French (France))                        (Europe/Paris timezone) +Kernel 4.18.0-305.12.1.el8_4.x86_64 on an x86_64
-3) [x] Installation source               4) [!] Software selection +
-       (Closest mirror)                         (Nothing selected) +
-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, +testvm1 login: root 
-'r' to refresh]+Mot de passe : fenestros 
 +Dernière connexion : Fri Sep  3 16:45:59 sur ttyS0 
 +[root@testvm1 ~]#  
 +... 
 +[root@testvm1 ~]# [ALT GR]+[CTRL]+[)] 
 +[root@centos8 ~]# 
 </code> </code>
  
-===Software selection===+====2.4 - Suppression de Snapshots====
  
-Choisissez l'option **4** puis l'option **3** pour indiquer une installation minimale du système +Les snapshots peuvent être supprimés grâce à l'utilisation de la commande **virsh snapshot-delete** :
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# virsh snapshot-delete --domain testvm1 --snapshotname testvm1-snap-03092021 
-================================================================================ +Domain snapshot testvm1-snap-03092021 deleted
-Installation+
  
-1) [xLanguage settings                 2) [x] Time settings +[root@centos8 ~]# virsh snapshot-delete --domain testvm2 --snapshotname testvm2-snap-03092021 
-       (French (France))                        (Europe/Paris timezone) +Domain snapshot testvm2-snap-03092021 deleted
-3) [x] Installation source               4) [!] Software selection +
-       (Closest mirror)                         (Nothing selected) +
-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, +[root@centos8 ~]# virsh snapshot-list testvm1 
-'r' to refresh]: 4 + Name   Creation Time   State 
-================================================================================ +-------------------------------
-================================================================================ +
-Software selection+
  
-Base environment +[root@centos8 ~]# virsh snapshot-list testvm2 
- + Name   Creation Time   State 
-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+
 </code> </code>
  
-Appuyez ensuite sur la touche **c** pour pouvoir éventuellement choisir des installations supplémentaires :+=====LAB #3 - Gestion des Sauvegardes=====
  
-<code> +Pour effectuer une sauvegarde d'une VM en utilisant les outils classiquesil convient simplement de copier le fichier d'image ainsi que le fichier de configuration de la VM à un endroit ailleurs sur le systèmevoire sur un support externe.
-Please make a selection from the above ['c' to continue, 'q' to quit'r' to +
-refresh]: c +
-================================================================================ +
-================================================================================ +
-Software selection+
  
-Additional software for selected environment+====3.1 - Création d'une Sauvegarde du Disque de la VM====
  
-1) [ ] Guest Agents                     8) [ ] Headless Management +Actuellement seule la VM **testvm2** est en cours d'exécution :
-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 +
-</code> +
- +
-Ne choisissez rien dans la liste et appuyez simplement sur la touche **c** pour revenir au menu principal :+
  
 <code> <code>
-Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to +[root@centos8 ~]# virsh list 
-refresh]: c + Id   Name      State 
-================================================================================ +------------------------- 
-================================================================================ + 5    testvm2   running 
-Installation + </code> 
- +  
-1) [x] Language settings                 2) [x] Time settings +Créez donc un répertoire destiné à contenir les copies créées 
-       (French (France))                        (Europe/Paris timezone) +  
-3) [!] Installation source               4) [!] Software selection +<code>  
-       (Processing...)                          (Processing...) +[root@centos8 ~]# mkdir /vm-backups
-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) [xLanguage settings                 2) [x] Time settings +
-       (French (France))                        (Europe/Paris timezone) +
-3) [x] Installation source               4) [x] Software selection +
-       (Closest mirror)                         (Minimal Install) +
-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]:+
 </code> </code>
  
-===Installation Destination=== +Placez-vous dans le répertoire des images **/var/lib/libvirt/images/** :
- +
-Choisissez l'option **5** pour définir l'emplacement de l'installation :+
  
 <code> <code>
-================================================================================ +[root@centos8 ~]# cd /var/lib/libvirt/images
-================================================================================ +[root@centos8 images]# ls -l 
-Installation +total 4029008 
- +-rw-------1 root root 5369757696 Sep  3 11:42 testvm1-os.qcow2 
-1) [xLanguage settings                 2) [x] Time settings +-rw-------1 qemu qemu 2261123072 Sep  4 02:25 testvm2.qcow2
-       (French (France))                        (Europe/Paris timezone) +
-3) [xInstallation source               4) [x] Software selection +
-       (Closest mirror)                         (Minimal Install) +
-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...+
 </code> </code>
  
-Séléctionnez le disque **vda** et appuyez sur la touche **c** :+Copiez ensuite l'image vers le répertoire **/vm-backups** :
  
 <code> <code>
-================================================================================ +[root@centos8 images]# cp -p testvm1-os.qcow2 /vm-backups/testvm1-os.qcow2-04092021 &
-================================================================================ +
-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+
 </code> </code>
  
-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 VMDans le cas de ce LAB, appuyez simplement sur le chois **2** puis sur la touche **c** :+<WRAP center round important 60%> 
 +**Important** : Notez que cette copie est effectuée en arrière plan afin de libérer le prompt en avant plan du terminal. 
 +</WRAP>
  
-<code> +====3.2 - Création d'une Sauvegarde de la Configuration de la VM====
-================================================================================ +
-================================================================================ +
-Partitioning Options+
  
-1) [ ] Replace Existing Linux system(s) +La configuration de chaque VM est contenue dans un fichier au format XML dans le répertoire **/etc/libvirt/qemu/** :
-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 
-</code> 
- 
-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** : 
-  
 <code> <code>
-================================================================================ +[root@centos8 images]# cd /etc/libvirt/qemu/ 
-================================================================================ +[root@centos8 qemu]# ls -lR 
-Partition Scheme Options+.: 
 +total 16 
 +drwx------. 3 root root   42 Sep  2 10:22 networks 
 +-rw-------. 1 root root 4936 Sep  3 10:07 testvm1.xml 
 +-rw-------. 1 root root 4933 Sep  3 11:35 testvm2.xml
  
-1) [ ] Standard Partition +./networks: 
-2) [x] LVM +total 4 
-3) [ ] LVM Thin Provisioning+drwx------. root root  25 Aug 10 17:00 autostart 
 +-rw-------. 1 root root 575 Sep  2 10:22 default.xml
  
-Select a partition scheme configuration.+./networks/autostart: 
 +total 0 
 +lrwxrwxrwx. 1 root root 14 Jun 16 06:28 default.xml -> ../default.xml
 </code> </code>
  
-Bien que préférable de choisir l'option par défaut pour des VMs en production . Par contrepour des raisons liées à la suite de ce LAB, choisissez l'option **1** puis sur la touche **c** :+Si vous consultez le contenu du fichier **testvm1.xml**, vous vous apercevrez des balises contenant la configuration actuelle de la VM. Par exempleles deux lignes suivantes démontrent que la VM a 2 Go de RAM et vCPU :
  
-<code+<file
-Please make a selection from the above ['cto continue, 'q' to quit, 'r' to +... 
-refresh]: 1 +  <currentMemory unit='KiB'>2097152</currentMemory> 
-================================================================================ +  <vcpu placement='static'>1</vcpu> 
-================================================================================ +... 
-Partition Scheme Options +</file>
- +
-1) [x] Standard Partition +
-2) [ ] LVM +
-3) [ ] LVM Thin Provisioning +
- +
-Select a partition scheme configuration. +
- +
-Please make a selection from the above ['cto continue, 'q' to quit, 'r' to +
-refresh]: c +
-Generating updated storage configuration +
-Checking storage configuration... +
-</code> +
- +
-===Démarrer l'Installation=== +
- +
-De retour au menu principal, choisissez l'option **b** pour démarrer l'installation :+
  
 <code> <code>
-================================================================================ +[root@centos8 qemu]# cat testvm1.xml 
-================================================================================ +<!-- 
-Installation+WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE 
 +OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: 
 +  virsh edit testvm1 
 +or other application using the libvirt API. 
 +-->
  
-1) [x] Language settings                 2) [x] Time settings +<domain type='kvm'> 
-       (French (France))                        (Europe/Paris timezone) +  <name>testvm1</name> 
-3) [x] Installation source               4) [x] Software selection +  <uuid>d436a2df-78b0-474c-833b-3f7af8681052</uuid> 
-       (Closest mirror)                         (Minimal Install) +  <metadata> 
-5) [x] Installation Destination          6) [x] Kdump +    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> 
-       (Automatic partitioning                  (Kdump is enabled) +      <libosinfo:os id="http://centos.org/centos/8"/> 
-       selected) +    </libosinfo:libosinfo> 
-7) [x] Network configuration             8) [x] Root password +  </metadata> 
-       (Wired (enp1s0) connected)               (Password is set.) +  <memory unit='KiB'>2097152</memory> 
-9) [ ] User creation +  <currentMemory unit='KiB'>2097152</currentMemory> 
-       (No user will be created)+  <vcpu placement='static'>1</vcpu> 
 +  <os> 
 +    <type arch='x86_64' machine='pc-q35-rhel8.2.0'>hvm</type> 
 +    <boot dev='hd'/> 
 +  </os> 
 +  <features> 
 +    <acpi/> 
 +    <apic/> 
 +  </features> 
 +  <cpu mode='host-model' check='partial'/> 
 +  <clock offset='utc'> 
 +    <timer name='rtc' tickpolicy='catchup'/> 
 +    <timer name='pit' tickpolicy='delay'/> 
 +    <timer name='hpet' present='no'/> 
 +  </clock> 
 +  <on_poweroff>destroy</on_poweroff> 
 +  <on_reboot>restart</on_reboot> 
 +  <on_crash>destroy</on_crash> 
 +  <pm> 
 +    <suspend-to-mem enabled='no'/> 
 +    <suspend-to-disk enabled='no'/> 
 +  </pm> 
 +  <devices> 
 +    <emulator>/usr/libexec/qemu-kvm</emulator> 
 +    <disk type='file' device='disk'> 
 +      <driver name='qemu' type='qcow2'/> 
 +      <source file='/var/lib/libvirt/images/testvm1-os.qcow2'/> 
 +      <target dev='vda' bus='virtio'/> 
 +      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> 
 +    </disk> 
 +    <disk type='file' device='cdrom'> 
 +      <driver name='qemu' type='raw'/> 
 +      <target dev='sda' bus='sata'/> 
 +      <readonly/> 
 +      <address type='drive' controller='0' bus='0' target='0' unit='0'/> 
 +    </disk> 
 +    <controller type='usb' index='0' model='qemu-xhci' ports='15'> 
 +      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> 
 +    </controller> 
 +    <controller type='sata' index='0'> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> 
 +    </controller> 
 +    <controller type='pci' index='0' model='pcie-root'/> 
 +    <controller type='virtio-serial' index='0'> 
 +      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> 
 +    </controller> 
 +    <controller type='pci' index='1' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='1' port='0x8'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> 
 +    </controller> 
 +    <controller type='pci' index='2' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='2' port='0x9'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> 
 +    </controller> 
 +    <controller type='pci' index='3' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='3' port='0xa'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> 
 +    </controller> 
 +    <controller type='pci' index='4' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='4' port='0xb'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> 
 +    </controller> 
 +    <controller type='pci' index='5' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='5' port='0xc'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/> 
 +    </controller> 
 +    <controller type='pci' index='6' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='6' port='0xd'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/> 
 +    </controller> 
 +    <controller type='pci' index='7' model='pcie-root-port'> 
 +      <model name='pcie-root-port'/> 
 +      <target chassis='7' port='0xe'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/> 
 +    </controller> 
 +    <interface type='bridge'> 
 +      <mac address='52:54:00:44:af:a1'/> 
 +      <source bridge='virbr0'/> 
 +      <model type='virtio'/> 
 +      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> 
 +    </interface> 
 +    <serial type='pty'> 
 +      <target type='isa-serial' port='0'> 
 +        <model name='isa-serial'/> 
 +      </target> 
 +    </serial> 
 +    <console type='pty'> 
 +      <target type='serial' port='0'/> 
 +    </console> 
 +    <channel type='unix'> 
 +      <target type='virtio' name='org.qemu.guest_agent.0'/> 
 +      <address type='virtio-serial' controller='0' bus='0' port='1'/> 
 +    </channel> 
 +    <input type='mouse' bus='ps2'/> 
 +    <input type='keyboard' bus='ps2'/> 
 +    <memballoon model='virtio'> 
 +      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> 
 +    </memballoon> 
 +    <rng model='virtio'> 
 +      <backend model='random'>/dev/urandom</backend> 
 +      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> 
 +    </rng> 
 +  </devices> 
 +</domain>
  
-Please make a selection from the above ['b' to begin installation, 'q' to quit, 
-'r' to refresh]: b 
 </code> </code>
  
-<WRAP center round important 60%> +Ce fichier doit donc être copié vers le répertoire **/vm-backups/** :
-**Important** : Notez que nous n'avons pas spécifié d'utilisateurs. Cette décision n'est pas bloquante pour la suite de l'installation. +
-</WRAP> +
- +
-L'installation démarre et se poursuit :+
  
 <code> <code>
-... +[root@centos8 qemu]# cp -p testvm1.xml /vm-backups/testvm1.xml-backup-04092021
-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 +
-..+
 </code> </code>
  
-===Démarrer la VM=== +Une fois le processus en arrière plan terminévous pouvez constater la présence des deux fichiers dans le répertoire 
- +
-A l'issu de l'installationappuyez sur la touche [Enter] pour démarrez la VM :+
  
 <code> <code>
-Installation complete. Press ENTER to quit:  +[root@centos8 vm-backups]# ls -l 
-... +total 3992904 
- OK  Started Network Manager. +-rw-------1 root root 5369757696 Sep  3 11:42 testvm1-os.qcow2-04092021 
-         Starting Network Manager Wait Online... +-rw-------1 root root       4936 Sep  3 10:07 testvm1.xml-backup-04092021
-[  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+
 </code> </code>
  
-====1.5 - Vérification de la VM Invitée==== +Notez que la taille de l'image de testvm1 est de 5 Go malgré le fait qu'il n'y ait que 1,7 Go alloué :
- +
-Au prompt, connectez-vous en tant que **root** avec le mot de passe **fenestros** :+
  
 <code> <code>
-CentOS Linux 8 +[root@centos8 ~]# virsh vol-info /var/lib/libvirt/images/testvm1-os.qcow2  
-Kernel 4.18.0-305.12.1.el8_4.x86_64 on an x86_64 +Name:           testvm1-os.qcow2 
- +Type          file 
-testvm1 loginroot +Capacity      5.00 GiB 
-Mot de passe fenestros +Allocation:     1.70 GiB
-[root@testvm1 ~]# +
 </code> </code>
  
-===Réseau===+====3.3 - Sauvegarder les Copies des Fichiers====
  
-Vérifiez la prise en compte d'une adresse IPv4 dans le réseau 192.168.56.0/24 :+Ayant effectué les copies, il est maintenant possible de sauvegarder les fichiers à l'aide d'un outil classique tel **tar** 
  
 <code> <code>
-[root@testvm1 ~]# ip a +[root@centos8 vm-backups]# mkdir testvm1 
-1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 +[root@centos8 vm-backups]# mv *04* testvm1 
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +[root@centos8 vm-backups]# ls 
-    inet 127.0.0.1/8 scope host lo +testvm1
-       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 +
-</code>+
  
-===Internet===+[root@centos8 vm-backups]# tar cvzf testvm1-backup-04092021.tar.gz testvm1/ 
 +testvm1/ 
 +testvm1/testvm1-os.qcow2-04092021 
 +testvm1/testvm1.xml-backup-04092021
  
-Vérifiez la connectivité de la VM : +[root@centos8 vm-backups]# ls -l 
- +total 846724 
-<code> +drwxr-xr-x2 root root        74 Sep  4 03:19 testvm1 
-[root@testvm1 ~]# ping www.free.fr +-rw-r--r--. 1 root root 867042697 Sep  4 03:24 testvm1-backup-04092021.tar.gz
-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 +
-[root@testvm1 ~]# [CTRL]+[VER MAJ]+[ALT GR]+[)] +
-[root@centos8 ~]#+
 </code> </code>
  
-<WRAP center round important 60%> 
-**Important** : Notez l'utilisation de la séquence de touches [CTRL]+[VER MAJ]+[ALT GR]+[)] sur un clavier français afin de se détacher de la VM. 
-</WRAP> 
- 
------ 
-<html> 
-<div align="center"> 
-Copyright © 2021 Hugh Norris 
-</div> 
-</html> 
 ----- -----
 +Copyright © 2022 Hugh Norris
Menu