Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:centos:8:avance:l105 [2021/09/14 04:49] – admin | elearning:workbooks:centos:8:avance:l105 [2022/02/22 15:15] (Version actuelle) – created admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
~~PDF: | ~~PDF: | ||
+ | |||
+ | Version : **2022.01** | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======LCF605 - Présentation, | + | ======LCF605 - Installation de Machines Virtuelles |
=====Contenu du Module===== | =====Contenu du Module===== | ||
- | * **LCF605 - Présentation, | + | * **LCF605 - Installation de Machines Virtuelles |
* Contenu du Module | * Contenu du Module | ||
- | | + | * LAB #1 - Installation |
- | | + | * 1.1 - Identification du Short ID |
- | * 1.1 - Installation des Paquets Requis | + | * 1.2 - Configuration |
- | * 1.2 - Activation et Démarrage | + | * 1.3 - Installation |
- | * 1.3 - Modules | + | * Format des Images |
- | * LAB #2 - Configuration | + | * Convertir le Format |
- | * 2.1 - Configuration | + | * 1.4 - Configuration |
- | * 2.2 - Configuration du Réseau | + | * Language Settings |
- | * 2.3 - Configuration du Stockage | + | * Network configuration |
+ | * Time settings | ||
+ | * Root password | ||
+ | * Installation source | ||
+ | * Software selection | ||
+ | * Installation Destination | ||
+ | * Démarrer l' | ||
+ | * Démarrer la VM | ||
+ | * 1.5 - Vérification de la VM Invitée | ||
+ | * Réseau | ||
+ | * Internet | ||
- | =====Présentation===== | + | =====LAB #1 - Installation d'une Machine Virtuelle CentOS 8===== |
- | ====La Virtualisation==== | + | ====1.1 - Identification du Short ID==== |
- | Le système | + | KVM sait virtualiser un grand nombre |
- | Il existe différentes méthodes de virtualisation | + | < |
+ | [root@centos8 ~]# osinfo-query os | more | ||
+ | Short ID | Name | Version | ||
+ | ----------------------+----------------------------------------------------+----------+----------------------------------------- | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | --More-- | ||
+ | </ | ||
- | * **Virtualisation au niveau du système d' | + | La liste des versions |
- | * **Description** : Les systèmes invités utilisent le même noyau et une partie du système | + | |
- | * **L' | + | |
- | * **L' | + | |
- | | + | |
- | {{ :elearning:workbooks:centos:6:senior:inheritedpackageszones.png? | + | < |
+ | [root@centos8 ~]# osinfo-query os | grep "Red Hat" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
- | * **Paravirtualisation ou // | + | Afin d' |
- | * **Description** : Le système hôte met à disposition | + | |
- | | + | |
- | * **L' | + | |
- | * **Logiciels concernés** | + | |
- | {{ :elearning:workbooks:centos:6:senior:hyperviseur1.png? | + | * Colonne 2, |
+ | * **Name**, | ||
+ | * Le nom officiel du système d' | ||
+ | * Colonne 3, | ||
+ | * **Version**, | ||
+ | * La version du système d' | ||
+ | * Colonne 4, | ||
+ | * **ID**, | ||
+ | * Un URL censé pointer vers la page officielle de la version de la distribution. Attention | ||
+ | |||
+ | 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 | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
- | * **Virtualisation complète ou // | + | <WRAP center round important 60%> |
- | * **Description** : Le programme simule du matériel virtuel qui apparaît du point de vue de l' | + | **Important** : Notez que le Short ID de CentOS 8 est actuellement |
- | * **L' | + | </WRAP> |
- | * **L' | + | |
- | * **Logiciels concernés** : VMWare(tm) Fusion, VMWare(tm) Player, VMWare(tm) Server, VMWare(tm) Fusion, Parallels Desktop, Parallels Server, Sun/Oracle %%VirtualBox%%, | + | |
- | {{ : | + | ====1.2 - Configuration du Stockage des ISOs==== |
- | * **Paravirtualisation avec prise en charge | + | Afin d' |
- | * **Description** : Les processeurs Intel-VT et AMD-V contiennent des instructions matérielles pour faciliter la virtualisation. Pour déterminer si le processeur dispose | + | |
- | | + | |
- | | + | |
- | * **Logiciels concernés** : Xen, KVM | + | |
- | {{ :elearning:workbooks: | + | < |
+ | [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 | ||
- | ====Xen==== | + | [root@centos8 ~]# chmod 755 CentOS-8.1.1911-x86_64-boot.iso |
- | * **[[http:// | + | [root@centos8 ~]# mkdir /isos |
- | * Xen est un produit en licence GPL, | + | |
- | * Il existe des systèmes de virtualisation commerciaux à base de Xen dont le plus connu est actuellement **Citrix %%XenServer%%**, | + | |
- | * Xen est un système de virtualisation principalement destiné à la virtualisation de serveurs, | + | |
- | * Xen est un système de **paravirtualisation** qui nécessite un noyau Linux modifié, | + | |
- | * Xen ne peut pas lancé donc un système non-modifié tel Windows(tm) en mode paravirtualisation, | + | |
- | * Xen peut lancer des systèmes non modifiés dans des **HVM** ( //Hardware Virtual Machine// ) depuis sa version 3 en utilisant une partie du code de QEMU combinée avec l' | + | |
- | ====KVM==== | + | [root@centos8 ~]# mv CentOS-8.1.1911-x86_64-boot.iso /isos |
- | **[[http://www.linux-kvm.org|KVM]]** ou **K**ernel based **V**irtual **M**achine : | + | [root@centos8 ~]# chown -R qemu:qemu /isos |
+ | </code> | ||
- | * est un hyperviseur libre sous Linux, | + | ====1.3 |
- | * ne fonctionne que sur les architectures x86 disposant des extensions Intel-VT ou AMD-V, | + | |
- | * est un projet issu de QEMU. | + | |
- | <WRAP center round important> | + | Démarrez maintenant l' |
- | Important : Le module KVM est intégré dans le noyau Linux depuis | + | |
+ | < | ||
+ | [root@centos8 ~]# virt-install --network bridge: | ||
+ | |||
+ | Starting install... | ||
+ | Retrieving file vmlinuz... | ||
+ | Retrieving file initrd.img... | ||
+ | Allocating ' | ||
+ | WARNING | ||
+ | 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 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important | ||
+ | **Important** : Notez que la quantité de mémoire est automatiquement | ||
</ | </ | ||
- | **KVM** appartient à la société **Red Hat**. | + | Dans cette commande on peut constater l' |
- | KVM permet de virtualiser | + | ^ Option ^ Commentaire ^ |
+ | | --network bridge: | Fixe la valeur du pont à utiliser par la VM à virbr0 | | ||
+ | | --name | ||
+ | | --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' | ||
+ | | --graphics | La valeur **none** indique que l' | ||
+ | | --location= | Indique l' | ||
+ | | --extra-args= | Indique les options de la connectivité de la console | | ||
- | * Windows(tm) à partir de Windows(tm) 2000, | + | ===Format |
- | * Toutes les distributions Linux, | + | |
- | * La majorité | + | |
- | * Solaris(tm) et openSolaris, | + | |
- | * Minux, Hurd, QNX, | + | |
- | * MSDOS. | + | |
- | KVM offre un support du matériel suivant | + | Une image est un disque virtuel. KVM reconnait les formats d' |
- | * USB, | + | < |
- | * Ethernet, | + | [root@centos8 ~]# qemu-img -h | grep Supported |
- | * PCI Hotplug, | + | 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 |
- | * Carte Son, | + | </ |
- | * **VirtIO** | + | |
- | Les avantages de KVM par rapport à Xen sont : | + | <WRAP center round important 60%> |
+ | **Important** | ||
+ | </ | ||
- | * l’utilisation | + | ===Convertir le Format |
- | * l'intégration direct dans le noyau Linux. | + | |
- | =====LAB #1 - Installation | + | Il est possible |
- | ====1.1 | + | < |
+ | # qemu-img convert -f vmdk -O qcow2 myimage.vmdk mynewimage.qcow2 | ||
+ | </ | ||
- | Avant d'installer KVM, il convient | + | Dans le cas d'une image au format **vdi** d' |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# egrep ' | + | |
- | 8 | + | |
- | </ | + | |
- | La majorité des paquets nécessaires pour la virtualisation sous KVM ont été regroupés dans un **module** dénommé **virt**. Il convient donc de l' | + | < |
+ | # VBoxManage clonehd myimage.vdi myrawimage.img --format raw | ||
+ | </ | ||
- | < | + | Ensuite il convient d' |
- | [root@centos8 ~]# dnf module install virt -y | + | |
- | </ | + | |
- | Si vous souhaitez utiliser l' | + | < |
+ | # qemu-img convert | ||
+ | </ | ||
- | < | + | ====1.4 |
- | [root@centos8 ~]# dnf install virt-install virt-viewer -y | + | |
- | </ | + | |
- | Le paquet | + | ===Language Settings=== |
+ | |||
+ | Commencez par appuyer sur le choix **1** : | ||
< | < | ||
- | [root@centos8 ~]# dnf install epel-release -y | + | ... |
- | [root@centos8 ~]# dnf install bridge-utils -y | + | Starting installer, one moment... |
- | </code> | + | 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 | ||
+ | | ||
+ | * 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 | ||
- | Dernièrement, | + | 1) [x] Language settings |
+ | | ||
+ | 3) [!] Installation source | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [!] Network configuration | ||
+ | (Not connected) | ||
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
- | < | + | Please make a selection from the above [' |
- | [root@centos8 ~]# dnf install virt-top libguestfs-tools -y | + | ' |
- | </ | + | ================================================================================ |
+ | ================================================================================ | ||
- | ====1.2 - Activation et Démarrage du Service libvirtd==== | + | 3) Arabic |
+ | 4) Assamese | ||
+ | 5) Asturian | ||
+ | 6) Belarusian | ||
+ | 7) Bulgarian | ||
+ | 8) Bangla | ||
+ | 9) Tibetan | ||
+ | 10) Bosnian | ||
+ | 11) Catalan | ||
+ | 12) Czech 38) Georgian | ||
+ | 13) Welsh 39) Kazakh | ||
+ | 14) Danish | ||
+ | 15) German | ||
+ | 16) Greek 42) Korean | ||
+ | 17) English | ||
+ | 18) Spanish | ||
+ | 19) Estonian | ||
+ | 20) Basque | ||
+ | 21) Persian | ||
+ | 22) Finnish | ||
+ | 23) Filipino | ||
+ | 24) French | ||
+ | 25) Friulian | ||
- | Activez et démarrez le service **libvirtd** pour démarrer KVM. Notez l' | + | Press ENTER to continue: |
- | + | 26) Irish 52) Low German | |
- | < | + | |
- | [root@centos8 ~]# systemctl enable --now libvirtd | + | |
</ | </ | ||
- | Vérifiez le statut du service avant de poursuivre | + | Choisissez l' |
< | < | ||
- | [root@centos8 ~]# systemctl status libvirtd | + | Please select language support to install |
- | ● libvirtd.service - Virtualization daemon | + | to continue, ' |
- | | + | ================================================================================ |
- | Active: active (running) since Wed 2021-09-01 10:19:05 EDT; 11s ago | + | ================================================================================ |
- | Docs: man: | + | Language settings |
- | | + | |
- | Main PID: 7502 (libvirtd) | + | |
- | Tasks: 19 (limit: 32768) | + | |
- | | + | |
- | | + | |
- | | + | |
- | ├─1943 / | + | |
- | └─7502 / | + | |
- | Sep 01 10:19:05 centos8.ittraining.loc systemd[1]: Starting Virtualization daemon... | + | Available locales |
- | Sep 01 10:19:05 centos8.ittraining.loc systemd[1]: Started Virtualization daemon. | + | 1) French (France) |
- | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq[1942]: | + | 2) French (Canada) |
- | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq[1942]: | + | |
- | Sep 01 10:19:06 centos8.ittraining.loc dnsmasq-dhcp[1942]: | + | |
- | </ | + | |
- | ====1.3 - Modules du Noyau==== | + | Please select language support to install [' |
+ | to continue, ' | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Installation | ||
- | Votre VM présente aux système hôte un processeur de type Intel(tm). Pour que KVM puisse fonctionner dans cet environnement il a besoin que deux modules soient chargés : | + | 1) [x] Language settings |
+ | (French (France)) (America/ | ||
+ | 3) [!] Installation source | ||
+ | | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [!] Network configuration | ||
+ | (Not connected) | ||
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
- | * **kvm** | + | Please make a selection from the above [' |
- | * **kvm-intel** | + | ' |
- | + | [anaconda]1:main* 2:shell 3:log | |
- | Vérifiez donc le bon chargement des modules concernés | + | |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# modinfo kvm | + | |
- | filename: | + | |
- | license: GPL | + | |
- | author: Qumranet | + | |
- | rhelversion: 8.4 | + | |
- | srcversion: 0B52FB25C4DD9865FC4FABA | + | |
- | depends: | + | |
- | intree: | + | |
- | name: kvm | + | |
- | vermagic: | + | |
- | sig_id: PKCS#7 | + | |
- | signer: | + | |
- | sig_key: | + | |
- | sig_hashalgo: | + | |
- | signature: | + | |
- | 8D: | + | |
- | 16: | + | |
- | B1: | + | |
- | FF: | + | |
- | BD: | + | |
- | CF: | + | |
- | A9: | + | |
- | CD: | + | |
- | FB: | + | |
- | 19: | + | |
- | 90: | + | |
- | D9: | + | |
- | 50:F1: | + | |
- | FE: | + | |
- | 40: | + | |
- | 60: | + | |
- | D0: | + | |
- | EC: | + | |
- | 7F: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
</ | </ | ||
+ | |||
+ | ===Network configuration=== | ||
+ | |||
+ | Choisissez maintenant l' | ||
< | < | ||
- | [root@centos8 ~]# modinfo kvm_intel | + | ================================================================================ |
- | filename: | + | ================================================================================ |
- | license: | + | Installation |
- | author: | + | |
- | rhelversion: | + | |
- | srcversion: | + | |
- | alias: | + | |
- | depends: | + | |
- | intree: | + | |
- | name: | + | |
- | vermagic: | + | |
- | sig_id: | + | |
- | signer: | + | |
- | sig_key: | + | |
- | sig_hashalgo: | + | |
- | signature: | + | |
- | 11: | + | |
- | 91: | + | |
- | BB: | + | |
- | E4: | + | |
- | 2B: | + | |
- | 56: | + | |
- | 3B: | + | |
- | 6C: | + | |
- | 51: | + | |
- | D0: | + | |
- | 25: | + | |
- | 97: | + | |
- | 7D: | + | |
- | AC: | + | |
- | 2E: | + | |
- | 8D: | + | |
- | D7: | + | |
- | A3: | + | |
- | E6: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | parm: | + | |
- | </ | + | |
- | =====LAB #2 - Configuration de KVM====== | + | 1) [x] Language settings |
+ | | ||
+ | 3) [!] Installation source | ||
+ | | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [!] Network configuration | ||
+ | (Not connected) | ||
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
- | ====2.1 - Configuration du Pare-feu==== | + | Please make a selection from the above [' |
+ | ' | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Network configuration | ||
- | Si vous souhaitez vous connecter aux machines virtuelles créées sous KVM en utilisant le protocole VNC, vous devez ouvrir le port **5900/ | + | Wired (enp1s0) disconnected |
+ | Host Name: localhost.localdomain | ||
+ | |||
+ | Current host name: localhost | ||
+ | |||
+ | 1) Set host name | ||
+ | 2) Configure device enp1s0 | ||
< | < | ||
- | [root@centos8 ~]# firewall-cmd --permanent --add-port=5901/ | ||
- | success | ||
- | [root@centos8 ~]# firewall-cmd --reload | + | Choisissez ensuite l' |
- | success | + | |
- | </ | + | |
- | ====2.2 - Configuration du Réseau des VMs==== | + | < |
+ | Please make a selection from the above [' | ||
+ | refresh]: 1 | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Enter a new value for 'Host Name' and press ENTER: testvm1.ittraining.network | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Network configuration | ||
- | Lors de l' | + | Wired (enp1s0) disconnected |
- | * La plage des adresses IP disponible pour les machines virtuelles KVM va de **192.168.122.2/24** à **192.168.122.254/ | + | Host Name: testvm1.ittraining.network |
- | * Ce pont met en place une connectivité de type **NAT** pour les machines virtuelles, | + | |
- | * Une interface réseau fictive, **virbr0-nic** et appelée une esclave, a été ajoutée à ce pont principalement pour fournir une adresse MAC stable, | + | |
- | * Normalement au fur et au mesure que d' | + | |
- | + | ||
- | Les configurations ci-dessus peuvent être visualisées grâce à la commande **ip a ** : | + | |
- | < | + | Current host name: localhost |
- | [root@centos8 ~]# ip a | + | |
- | ... | + | |
- | 4: virbr0: < | + | |
- | link/ether 52: | + | |
- | inet 192.168.122.1/ | + | |
- | | + | |
- | 5: virbr0-nic: < | + | |
- | link/ether 52: | + | |
- | </ | + | |
- | + | ||
- | Dans le cas où on ne souhaite pas ou on ne peut pas utiliser le pont créé par défaut, il convient de créer un autre pont. Dans notre cas, l' | + | |
+ | 1) Set host name | ||
+ | 2) Configure device enp1s0 | ||
< | < | ||
- | [root@centos8 ~]# ip a show ens19 | ||
- | 3: ens19: < | ||
- | link/ether 46: | ||
- | </ | ||
- | Elle n'est pas visible dans la sortie de la commande | + | Choisissez l'option |
- | + | ||
- | < | + | |
- | [root@centos8 ~]# nmcli c show | + | |
- | NAME | + | |
- | ip_fixe | + | |
- | virbr0 | + | |
- | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | + | |
- | </ | + | |
- | Créez donc une adresse IP de 192.168.56.2/ | + | < |
+ | Please make a selection from the above ['c' to continue, ' | ||
+ | refresh]: 2 | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Device configuration | ||
+ | |||
+ | 1) IPv4 address or " | ||
+ | | ||
+ | 2) IPv4 netmask | ||
+ | 3) IPv4 gateway | ||
+ | 4) IPv6 address[/ | ||
+ | turn off | ||
+ | | ||
+ | 5) IPv6 default gateway | ||
+ | 6) Nameservers (comma separated) | ||
+ | 7) [ ] Connect automatically after reboot | ||
+ | 8) [ ] Apply configuration in installer | ||
+ | Configuring device enp1s0. | ||
< | < | ||
- | [root@centos8 ~]# nmcli connection add con-name ip_kvm ifname ens19 type ethernet ip4 192.168.56.2/ | ||
- | Connection ' | ||
- | [root@centos8 ~]# nmcli c show | ||
- | NAME | ||
- | ip_fixe | ||
- | ip_kvm | ||
- | virbr0 | ||
- | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | ||
- | </ | ||
- | Utilisez la commande | + | Laissez l’option |
< | < | ||
- | [root@centos8 ~]# ip a show ens19 | + | Please make a selection from the above [' |
- | 3: ens19: < | + | refresh]: 6 |
- | | + | ================================================================================ |
- | inet 192.168.56.2/24 brd 192.168.56.255 scope global noprefixroute ens19 | + | ================================================================================ |
- | valid_lft forever preferred_lft forever | + | Enter a new value for ' |
- | inet6 fe80:: | + | .8.4.4 |
- | valid_lft forever preferred_lft forever | + | ================================================================================ |
+ | ================================================================================ | ||
+ | Device configuration | ||
+ | |||
+ | 1) IPv4 address or " | ||
+ | | ||
+ | 2) IPv4 netmask | ||
+ | 3) IPv4 gateway | ||
+ | 4) IPv6 address[/ | ||
+ | turn off | ||
+ | | ||
+ | 5) IPv6 default | ||
+ | 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. | ||
</ | </ | ||
- | Notez que cette configuration | + | Il est important de configurer la prise en compte automatique de la configuration |
< | < | ||
- | [root@centos8 ~]# cat / | + | Please make a selection from the above [' |
- | TYPE=Ethernet | + | refresh]: 7 |
- | PROXY_METHOD=none | + | ================================================================================ |
- | BROWSER_ONLY=no | + | ================================================================================ |
- | BOOTPROTO=none | + | Device configuration |
- | IPADDR=192.168.56.2 | + | |
- | PREFIX=24 | + | 1) IPv4 address or " |
- | GATEWAY=192.168.56.1 | + | dhcp |
- | DEFROUTE=yes | + | 2) IPv4 netmask |
- | IPV4_FAILURE_FATAL=no | + | 3) IPv4 gateway |
- | IPV6INIT=yes | + | 4) IPv6 address[/ |
- | IPV6_AUTOCONF=yes | + | turn off |
- | IPV6_DEFROUTE=yes | + | auto |
- | IPV6_FAILURE_FATAL=no | + | 5) IPv6 default gateway |
- | IPV6_ADDR_GEN_MODE=stable-privacy | + | 6) Nameservers (comma separated) |
- | NAME=ip_kvm | + | 8.8.8.8, |
- | UUID=afc8b175-f2cb-47b2-baca-66454058c36f | + | 7) [x] Connect automatically after reboot |
- | DEVICE=ens19 | + | 8) [ ] Apply configuration in installer |
- | ONBOOT=yes | + | |
+ | Configuring device enp1s0. | ||
</ | </ | ||
- | Vérifiez maintenant que vous pouvez communiquer avec la passerelle par défaut | + | Pour pouvoir installer les paquets logiciels, |
< | < | ||
- | [root@centos8 ~]# ping 192.168.56.1 | + | Please make a selection from the above [' |
- | PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data. | + | refresh]: 8 |
- | 64 bytes from 192.168.56.1: icmp_seq=1 ttl=64 time=14.6 ms | + | ================================================================================ |
- | 64 bytes from 192.168.56.1: | + | ================================================================================ |
- | 64 bytes from 192.168.56.1: | + | Device configuration |
- | ^C | + | |
- | --- 192.168.56.1 ping statistics --- | + | 1) IPv4 address or " |
- | 3 packets transmitted, 3 received, 0% packet loss, time 2002ms | + | |
- | rtt min/ | + | 2) IPv4 netmask |
+ | 3) IPv4 gateway | ||
+ | 4) IPv6 address[/ | ||
+ | turn off | ||
+ | | ||
+ | 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. | ||
</ | </ | ||
- | Pour pouvoir gérer l' | + | Validez les configurations actuelles en appuyant sur la touche |
< | < | ||
- | [root@centos8 ~]# vi / | + | Please make a selection from the above [' |
- | [root@centos8 ~]# cat / | + | refresh]: c |
- | TYPE=Ethernet | + | ================================================================================ |
- | BOOTPROTO=none | + | ================================================================================ |
- | NAME=ip_kvm | + | Network configuration |
- | UUID=afc8b175-f2cb-47b2-baca-66454058c36f | + | |
- | DEVICE=ens19 | + | Wired (enp1s0) disconnected |
- | ONBOOT=yes | + | |
- | BRIDGE=virbr0 | + | Host Name: testvm1.ittraining.network |
+ | |||
+ | Current host name: localhost | ||
+ | |||
+ | 1) Set host name | ||
+ | 2) Configure device enp1s0 | ||
</ | </ | ||
- | Pour créer le pont, il convient de créer le fichier | + | Pour retourner au menu principal, appuyez sur la touche |
< | < | ||
- | [root@centos8 ~]# ls -l / | + | Please make a selection from the above ['c' |
- | ls: cannot access | + | refresh]: c |
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Installation | ||
- | [root@centos8 ~]# vi / | + | 1) [x] Language settings |
- | [root@centos8 ~]# cat / | + | |
- | TYPE=BRIDGE | + | 3) [!] Installation source |
- | DEVICE=virbr0 | + | (Error setting up software |
- | BOOTPROTO=non | + | source) |
- | ONBOOT=yes | + | 5) [!] Installation Destination |
- | IPADDR=192.168.56.2 | + | (No disks selected) |
- | NETMASK=255.255.255.0 | + | 7) [x] Network configuration |
- | GATEWAY=192.168.56.1 | + | (Wired (enp1s0) connected) |
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
+ | |||
+ | Please make a selection from the above [' | ||
+ | ' | ||
+ | [anaconda]1:main* 2: | ||
</ | </ | ||
- | <WRAP center round important | + | <WRAP center round important> |
- | **Important** | + | Important : **Important** |
</ | </ | ||
- | Pour que la configuration puisse fonctionner, | + | ===Time settings=== |
+ | |||
+ | Choisissez maintenant l'option **2** pour définir | ||
< | < | ||
- | [root@centos8 ~]# echo net.ipv4.ip_forward | + | ================================================================================ |
- | [root@centos8 ~]# cat / | + | ================================================================================ |
- | # The kernel allocates aio memory on demand, and this number limits the | + | Installation |
- | # number of parallel aio requests; the only drawback of a larger limit is | + | |
- | # that a malicious guest could issue parallel requests to cause the kernel | + | |
- | # to set aside memory. | + | |
- | # 128 * (number of virtual disks on the host) | + | |
- | # Libvirt uses a default of 1M requests to allow 8k disks, with at most | + | |
- | # 64M of kernel memory if all disks hit an aio request at the same time. | + | |
- | fs.aio-max-nr | + | |
- | net.ipv4.ip_forward | + | |
- | </ | + | |
- | En utilisant la commande **sysctl**, appliquez la nouvelle | + | 1) [x] Language settings |
+ | | ||
+ | 3) [!] Installation source | ||
+ | | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network | ||
+ | | ||
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
- | < | + | Please make a selection from the above [' |
- | [root@centos8 ~]# / | + | ' |
- | fs.aio-max-nr | + | ================================================================================ |
- | net.ipv4.ip_forward | + | ================================================================================ |
- | </ | + | Time settings |
- | Dernièrement, | + | Timezone: America/ |
- | < | + | NTP servers:not configured |
- | [root@centos8 ~]# firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -o virbr0 -j ACCEPT | + | |
- | success | + | |
- | [root@centos8 ~]# firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -i virbr0 -j ACCEPT | + | |
- | success | + | |
- | </ | + | |
- | < | + | 1) Change timezone |
- | [root@centos8 ~]# firewall-cmd --reload | + | 2) Configure NTP servers |
- | success | + | |
</ | </ | ||
- | La configuration faite, vérifiez la prise en charge en utilisant la commande | + | Choisissez l' |
< | < | ||
- | [root@centos8 ~]# ip a | + | Please make a selection from the above [' |
- | 1: lo: < | + | refresh]: 1 |
- | | + | ================================================================================ |
- | inet 127.0.0.1/8 scope host lo | + | ================================================================================ |
- | valid_lft forever preferred_lft forever | + | Timezone settings |
- | inet6 ::1/128 scope host | + | |
- | | + | |
- | 2: ens18: < | + | |
- | link/ether 4e: | + | |
- | inet 10.0.2.46/ | + | |
- | | + | |
- | inet 192.168.1.2/ | + | |
- | | + | |
- | inet6 fe80:: | + | |
- | | + | |
- | 3: ens19: < | + | |
- | link/ether 46: | + | |
- | inet 192.168.56.2/ | + | |
- | | + | |
- | inet6 fe80:: | + | |
- | | + | |
- | 4: virbr0: < | + | |
- | link/ether 52: | + | |
- | inet 192.168.122.1/ | + | |
- | | + | |
- | 5: virbr0-nic: < | + | |
- | link/ether 52: | + | |
- | </ | + | |
- | <WRAP center round important 60%> | + | Available regions |
- | **Important** : Notez que la configuration n'as **pas** été prise en compte. En effet, l' | + | 1) Europe |
- | </WRAP> | + | 2) Asia 6) Pacific |
+ | 3) America | ||
+ | 4) Africa | ||
+ | <code> | ||
- | Consultez maintenant | + | Appuyez sur la touche **1** pour choisir **Europe** |
< | < | ||
- | [root@centos8 ~]# virsh net-list | + | Please select the timezone. Use numbers or type names directly |
- | Name State Autostart | + | region |
- | -------------------------------------------- | + | ================================================================================ |
- | default | + | ================================================================================ |
+ | |||
+ | 1) Amsterdam | ||
+ | 2) Andorra | ||
+ | 3) Astrakhan | ||
+ | 4) Athens | ||
+ | 5) Belgrade | ||
+ | 6) Berlin | ||
+ | 7) Bratislava | ||
+ | 8) Brussels | ||
+ | 9) Bucharest | ||
+ | 10) Budapest | ||
+ | 11) Busingen | ||
+ | 12) Chisinau | ||
+ | 13) Copenhagen | ||
+ | 14) Dublin | ||
+ | 15) Gibraltar | ||
+ | 16) Guernsey | ||
+ | 17) Helsinki | ||
+ | 18) Isle_of_Man | ||
+ | 19) Istanbul | ||
+ | 20) Jersey | ||
</ | </ | ||
- | En utilisant la commande | + | Puis choisissez l' |
< | < | ||
- | [root@centos8 ~]# virsh net-dumpxml default | + | Please select the timezone. Use numbers or type names directly |
- | < | + | region list, 'c' |
- | < | + | ================================================================================ |
- | < | + | ================================================================================ |
- | <forward mode='nat'> | + | Installation |
- | < | + | |
- | <port start='1024' | + | 1) [x] Language settings |
- | </ | + | |
- | </ | + | 3) [!] Installation source |
- | <bridge name='virbr0' | + | |
- | < | + | |
- | < | + | 5) [!] Installation Destination |
- | < | + | (No disks selected) |
- | < | + | 7) [x] Network configuration |
- | </ | + | |
- | </ | + | 9) [!] User creation |
- | </ | + | (No user will be created) |
+ | |||
+ | Please make a selection from the above ['b' | ||
+ | ' | ||
</ | </ | ||
- | Il est donc nécessaire d' | + | ===Root password=== |
+ | |||
+ | Pour définir le mot de passe root de la VM, choisissez l' | ||
< | < | ||
- | [root@centos8 ~]# virsh net-edit default | + | ================================================================================ |
- | </ | + | ================================================================================ |
+ | Installation | ||
- | A l'issu de votre édition, votre fichier doit correspondre à l' | + | 1) [x] Language settings |
+ | | ||
+ | 3) [!] Installation source | ||
+ | | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [!] User creation | ||
+ | (No user will be created) | ||
- | < | + | Please make a selection from the above ['b' |
- | < | + | 'r' to refresh]: 8 |
- | < | + | ================================================================================ |
- | < | + | ================================================================================ |
- | <forward mode='nat'/> | + | Root password |
- | <bridge name='virbr0' | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | <range start=' | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | Sortez du mode édition. Vous noterez que la commande vous indique que le fichier a été modifié : | + | Please select new root password. You will have to type it twice. |
- | < | + | Password: fenestros |
- | [ESC]:q | + | Password (confirm): fenestros |
- | [root@centos8 ~]# virsh net-edit default | + | ================================================================================ |
- | Network default XML configuration edited. | + | ================================================================================ |
- | </ | + | Question |
- | Par contre, la simple édition du fichier n'a pas modifiée la configuration en cours : | + | 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 ' |
- | [root@centos8 ~]# virsh net-dumpxml default | + | ================================================================================ |
- | < | + | ================================================================================ |
- | < | + | Installation |
- | < | + | |
- | < | + | 1) [x] Language settings |
- | < | + | (French (France)) |
- | < | + | 3) [!] Installation source |
- | </ | + | (Error setting up software |
- | </ | + | source) |
- | < | + | 5) [!] Installation Destination |
- | < | + | (No disks selected) |
- | < | + | 7) [x] Network configuration |
- | < | + | (Wired (enp1s0) connected) |
- | < | + | 9) [ ] User creation |
- | </ | + | (No user will be created) |
- | </ | + | |
- | </ | + | Please make a selection from the above ['b' |
+ | ' | ||
</ | </ | ||
- | Notez que même en cas de re-démarrage du service, la configuration actuelle est persistante | + | ===Installation source=== |
+ | |||
+ | Choisissez l' | ||
< | < | ||
- | [root@centos8 ~]# systemctl restart libvirtd | + | ================================================================================ |
- | [root@centos8 ~]# systemctl status libvirtd | + | ================================================================================ |
- | ● libvirtd.service - Virtualization daemon | + | Installation |
- | | + | |
- | | + | |
- | Docs: man: | + | |
- | | + | |
- | Main PID: 4037 (libvirtd) | + | |
- | Tasks: 19 (limit: 32768) | + | |
- | | + | |
- | | + | |
- | | + | |
- | ├─1951 / | + | |
- | └─4037 / | + | |
- | Sep 02 10:27:41 centos8.ittraining.loc systemd[1]: Starting Virtualization daemon... | + | 1) [x] Language settings |
- | Sep 02 10:27:41 centos8.ittraining.loc systemd[1]: Started Virtualization daemon. | + | (French (France)) |
- | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq[1950]: read /etc/hosts - 2 addresses | + | 3) [!] Installation source |
- | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq[1950]: read / | + | |
- | Sep 02 10:27:41 centos8.ittraining.loc dnsmasq-dhcp[1950]: read / | + | |
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
- | [root@centos8 ~]# virsh net-dumpxml default | + | Please make a selection from the above ['b' |
- | < | + | 'r' |
- | < | + | ================================================================================ |
- | < | + | ================================================================================ |
- | <forward mode='nat'> | + | Installation source |
- | < | + | |
- | <port start='1024' | + | Choose an installation source type. |
- | </ | + | 1) CD/DVD |
- | </ | + | 2) local ISO file |
- | <bridge name=' | + | 3) Network |
- | <mac address=' | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </dhcp> | + | |
- | </ | + | |
- | </ | + | |
</ | </ | ||
- | Re-démarrez | + | L'ISO utilisé est de type **net-install**. Choisissez |
< | < | ||
- | [root@centos8 ~]# reboot | + | Please make a selection from the above [' |
+ | refresh]: 3 | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Installation source | ||
+ | |||
+ | 1) Closest mirror | ||
+ | 2) http:// | ||
+ | 3) https:// | ||
+ | 4) ftp:// | ||
+ | 5) nfs | ||
</ | </ | ||
- | Connectez-vous de nouveau à votre VM et contrôler la sortie de la commande | + | Choisissez l' |
< | < | ||
- | [root@centos8 ~]# nmcli c show | + | Please make a selection from the above ['c' to continue, ' |
- | NAME | + | refresh]: 1 |
- | ip_fixe | + | ================================================================================ |
- | virbr0 | + | ================================================================================ |
- | ip_kvm | + | Installation |
- | ens18 fc4a4d23-b15e-47a7-bcfa-b2e08f49553e | + | |
- | </ | + | |
- | Utilisez ensuite la commande **ip** pour vérifier l' | + | 1) [x] Language settings |
+ | | ||
+ | 3) [x] Installation source | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
- | < | + | Please make a selection from the above [' |
- | [root@centos8 ~]# ip a | + | ' |
- | 1: lo: < | + | |
- | | + | |
- | inet 127.0.0.1/8 scope host lo | + | |
- | | + | |
- | inet6 ::1/128 scope host | + | |
- | | + | |
- | 2: ens18: < | + | |
- | link/ether 4e: | + | |
- | inet 10.0.2.46/ | + | |
- | | + | |
- | inet 192.168.1.2/ | + | |
- | | + | |
- | inet6 fe80:: | + | |
- | | + | |
- | 3: ens19: < | + | |
- | link/ether 46: | + | |
- | 4: virbr0: < | + | |
- | link/ether 52: | + | |
- | inet 192.168.56.10/ | + | |
- | | + | |
- | 5: virbr0-nic: < | + | |
- | link/ether 52: | + | |
</ | </ | ||
- | Dernièrement, | + | ===Software selection=== |
+ | |||
+ | Choisissez l' | ||
< | < | ||
- | [root@centos8 ~]# ping 192.168.56.1 | + | ================================================================================ |
- | PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data. | + | ================================================================================ |
- | 64 bytes from 192.168.56.1: | + | Installation |
- | 64 bytes from 192.168.56.1: | + | |
- | 64 bytes from 192.168.56.1: | + | |
- | ^C | + | |
- | --- 192.168.56.1 ping statistics --- | + | |
- | 3 packets transmitted, | + | |
- | rtt min/ | + | |
- | </ | + | |
- | ====2.3 - Configuration du Stockage==== | + | 1) [x] Language settings |
+ | | ||
+ | 3) [x] Installation source | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
- | KVM a besoin d'un emplacement pour stocker les VMs créées. L'hôte KVM a été configuré avec un disque supplémentaire **sdd** d'une taille de **32 Go** à cet effet : | + | Please make a selection from the above ['b' |
+ | 'r' | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Software selection | ||
- | < | + | Base environment |
- | [root@centos8 ~]# lsblk | + | |
- | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | + | |
- | sda | + | |
- | ├─sda1 | + | |
- | └─sda2 | + | |
- | ├─cl_centos8-root 253:0 0 27.8G 0 lvm / | + | |
- | └─cl_centos8-swap 253:1 0 3.2G 0 lvm [SWAP] | + | |
- | sdb | + | |
- | sdc | + | |
- | └─sdc1 | + | |
- | sdd | + | |
- | sr0 11:0 1 1024M 0 rom | + | |
- | </ | + | |
- | Créez donc sur **/ | + | 1) [ ] Server with GUI 4) [ ] Workstation |
+ | 2) [ ] Server | ||
+ | 3) [ ] Minimal Install | ||
- | < | + | Please make a selection from the above [' |
- | [root@centos8 ~]# pvcreate /dev/sdd | + | refresh]: 3 |
- | | + | ================================================================================ |
- | [root@centos8 ~]# vgcreate kvm_storage /dev/sdd | + | ================================================================================ |
- | | + | Software selection |
+ | |||
+ | Base environment | ||
+ | |||
+ | 1) [ ] Server with GUI 4) [ ] Workstation | ||
+ | 2) [ ] Server | ||
+ | 3) [x] Minimal Install | ||
</ | </ | ||
+ | |||
+ | Appuyez ensuite sur la touche **c** pour pouvoir éventuellement choisir des installations supplémentaires : | ||
< | < | ||
- | [root@centos8 ~]# vgs | + | Please make a selection from the above [' |
- | | + | refresh]: c |
- | | + | ================================================================================ |
- | | + | ================================================================================ |
+ | Software selection | ||
+ | |||
+ | Additional software for selected environment | ||
+ | |||
+ | 1) [ ] Guest Agents | ||
+ | 2) [ ] Standard | ||
+ | 3) [ ] Container Management | ||
+ | 4) [ ] .NET Core Development | ||
+ | 5) [ ] RPM Development Tools 12) [ ] Security Tools | ||
+ | 6) [ ] Development Tools 13) [ ] Smart Card Support | ||
+ | 7) [ ] Graphical Administration Tools | ||
</ | </ | ||
- | Créez ensuite un volume logique, dénommé | + | Ne choisissez rien dans la liste et appuyez simplement sur la touche |
< | < | ||
- | [root@centos8 ~]# lvcreate -l +100%FREE -n kvm_lv kvm_storage | + | Please make a selection from the above [' |
- | | + | refresh]: c |
- | + | ================================================================================ | |
- | [root@centos8 ~]# lvs | + | ================================================================================ |
- | | + | Installation |
- | | + | |
- | | + | 1) [x] Language settings |
- | | + | (French (France)) |
+ | 3) [!] Installation source | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
+ | |||
+ | Please make a selection from the above [' | ||
+ | ' | ||
+ | ================================================================================ | ||
+ | ================================================================================ | ||
+ | Installation | ||
+ | |||
+ | 1) [x] Language settings | ||
+ | | ||
+ | 3) [x] Installation source | ||
+ | | ||
+ | 5) [!] Installation Destination | ||
+ | (No disks selected) | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
+ | |||
+ | Please make a selection from the above [' | ||
+ | ' | ||
</ | </ | ||
- | Créez ensuite un système de fichiers de type **xfs** sur le volume logique **kvm_lv** : | + | ===Installation Destination=== |
- | + | ||
+ | Choisissez l' | ||
< | < | ||
- | [root@centos8 ~]# mkfs.xfs / | + | ================================================================================ |
- | meta-data=/ | + | ================================================================================ |
- | = sectsz=512 attr=2, projid32bit=1 | + | Installation |
- | = crc=1 finobt=1, sparse=1, rmapbt=0 | + | |
- | = reflink=1 | + | 1) [x] Language settings |
- | data = bsize=4096 | + | |
- | = sunit=0 swidth=0 blks | + | 3) [x] Installation source |
- | naming | + | |
- | log | + | 5) [!] Installation Destination |
- | = sectsz=512 sunit=0 blks, lazy-count=1 | + | (No disks selected) |
- | realtime | + | 7) [x] Network configuration |
- | Discarding blocks...Done. | + | |
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
+ | |||
+ | Please make a selection from the above [' | ||
+ | ' | ||
+ | Probing storage... | ||
</ | </ | ||
- | Editez ensuite | + | Séléctionnez |
< | < | ||
- | [root@centos8 ~]# vi /etc/fstab | + | ================================================================================ |
- | [root@centos8 ~]# cat /etc/fstab | + | ================================================================================ |
+ | Installation Destination | ||
- | # | + | 1) [x] : 5 GiB (vda) |
- | # / | + | |
- | # Created by anaconda on Wed Jun 16 06:21:32 2021 | + | |
- | # | + | |
- | # Accessible filesystems, | + | |
- | # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. | + | |
- | # | + | |
- | # After editing this file, run ' | + | |
- | # units generated from this file. | + | |
- | # | + | |
- | / | + | |
- | UUID=1c04981e-5317-4b73-9695-3ce25246835d /boot | + | |
- | / | + | |
- | UUID=f76d6b66-985b-4a91-af9c-4987e8c1443c /home | + | |
- | ## KVM Guest Image Store | + | 1 disk selected; 5 GiB capacity; 5 GiB free ... |
- | / | + | |
+ | Please make a selection from the above [' | ||
+ | refresh]: c | ||
</ | </ | ||
- | Montez ensuite | + | A ce stade il vous est possible de choisir l' |
< | < | ||
- | [root@centos8 ~]# df -h | + | ================================================================================ |
- | Filesystem | + | ================================================================================ |
- | devtmpfs | + | Partitioning Options |
- | tmpfs 1.9G | + | |
- | tmpfs 1.9G 9.5M 1.9G 1% /run | + | |
- | tmpfs 1.9G | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | tmpfs 374M | + | |
- | tmpfs 374M 1.2M 373M 1% / | + | |
- | [root@centos8 ~]# mount -a | + | 1) [ ] Replace Existing Linux system(s) |
+ | 2) [ ] Use All Space | ||
+ | 3) [ ] Use Free Space | ||
+ | 4) [ ] Manually assign | ||
- | [root@centos8 ~]# df -h | + | Installation requires partitioning of your hard drive. Select what space to use |
- | Filesystem | + | for the install target or manually assign mount points. |
- | devtmpfs | + | |
- | tmpfs 1.9G | + | |
- | tmpfs | + | |
- | tmpfs | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | tmpfs | + | |
- | tmpfs | + | |
- | / | + | |
- | </ | + | |
- | Notez que ce volume est actuellement vide : | + | Please make a selection from the above [' |
+ | 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 [' | ||
+ | refresh]: c | ||
+ | </ | ||
+ | |||
+ | A ce stade il vous est possible de choisir le type d' | ||
+ | |||
< | < | ||
- | [root@centos8 ~]# ls -l / | + | ================================================================================ |
- | total 0 | + | ================================================================================ |
+ | Partition Scheme Options | ||
+ | |||
+ | 1) [ ] Standard Partition | ||
+ | 2) [x] LVM | ||
+ | 3) [ ] LVM Thin Provisioning | ||
+ | |||
+ | Select a partition scheme configuration. | ||
</ | </ | ||
- | Utilisez | + | Bien que préférable de choisir l' |
< | < | ||
- | [root@centos8 ~]# virsh pool-list | + | Please make a selection from the above [' |
- | Name | + | 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 [' | ||
+ | refresh]: c | ||
+ | Generating updated storage configuration | ||
+ | Checking storage configuration... | ||
</ | </ | ||
- | Définissez le pool de stockage | + | ===Démarrer l' |
+ | |||
+ | De retour au menu principal, choisissez l' | ||
< | < | ||
- | [root@centos8 ~]# virsh pool-define-as kvm-storagepool --type=dir --target / | + | ================================================================================ |
- | Pool kvm-storagepool defined | + | ================================================================================ |
+ | Installation | ||
+ | |||
+ | 1) [x] Language settings | ||
+ | | ||
+ | 3) [x] Installation source | ||
+ | | ||
+ | 5) [x] Installation Destination | ||
+ | | ||
+ | | ||
+ | 7) [x] Network configuration | ||
+ | | ||
+ | 9) [ ] User creation | ||
+ | (No user will be created) | ||
+ | |||
+ | Please make a selection from the above [' | ||
+ | ' | ||
</ | </ | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
- | **Important** : Consultez **[[https:// | + | **Important** : Notez que nous n' |
</ | </ | ||
- | Consultez **[[https:// | + | L' |
- | + | ||
- | Démarrez maintenant le pool **kvm-storagepool** | + | |
< | < | ||
- | [root@centos8 ~]# virsh pool-start kvm-storagepool | + | ... |
- | Pool kvm-storagepool started | + | 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 | ||
+ | .. | ||
</ | </ | ||
- | Contrôlez | + | ===Démarrer la VM=== |
+ | |||
+ | A l'issu de l' | ||
< | < | ||
- | [root@centos8 ~]# virsh pool-list | + | Installation complete. Press ENTER to quit: |
- | Name State Autostart | + | ... |
- | --------------------------------------- | + | [ |
- | kvm-storagepool | + | Starting Network Manager Wait Online... |
+ | [ OK ] Reached target Network. | ||
+ | Starting OpenSSH server daemon... | ||
+ | | ||
+ | | ||
+ | | ||
+ | [ OK ] Started OpenSSH server daemon. | ||
+ | [ OK ] Started Permit User Sessions. | ||
+ | | ||
+ | [ OK ] Started Command Scheduler. | ||
+ | | ||
+ | [ | ||
</ | </ | ||
- | <WRAP center round important 60%> | + | ====1.5 - Vérification de la VM Invitée==== |
- | **Important** : Notez que le pool ne sera pas démarré automatiquement parce que la valeur d**' | + | |
- | </ | + | |
- | Fixez la valeur d' | + | Au prompt, connectez-vous en tant que **root** avec le mot de passe **fenestros** : |
< | < | ||
- | [root@centos8 ~]# virsh pool-autostart kvm-storagepool | + | CentOS Linux 8 |
- | Pool kvm-storagepool marked as autostarted | + | Kernel 4.18.0-305.12.1.el8_4.x86_64 on an x86_64 |
- | [root@centos8 | + | testvm1 login: root |
- | | + | Mot de passe : fenestros |
- | --------------------------------------- | + | [root@testvm1 |
- | | + | |
</ | </ | ||
- | Dernièrement, | + | ===Réseau=== |
+ | |||
+ | Vérifiez la prise en compte d'une adresse IPv4 dans le réseau 192.168.56.0/ | ||
< | < | ||
- | [root@centos8 | + | [root@testvm1 |
- | Name State | + | 1: lo: < |
- | ------------------------------------------------------------------------------------------ | + | |
- | kvm-storagepool | + | inet 127.0.0.1/8 scope host lo |
+ | valid_lft forever preferred_lft forever | ||
+ | inet6 ::1/128 scope host | ||
+ | | ||
+ | 2: enp1s0: < | ||
+ | link/ether 52: | ||
+ | inet 192.168.56.83/24 brd 192.168.56.255 scope global dynamic noprefixroute enp1s0 | ||
+ | | ||
+ | inet6 fe80:: | ||
+ | | ||
</ | </ | ||
+ | |||
+ | ===Internet=== | ||
+ | |||
+ | Vérifiez la connectivité de la VM : | ||
< | < | ||
- | [root@centos8 | + | [root@testvm1 |
- | Filesystem | + | PING www.free.fr (212.27.48.10) 56(84) bytes of data. |
- | /dev/mapper/kvm_storage-kvm_lv | + | 64 bytes from www.free.fr (212.27.48.10): |
+ | 64 bytes from www.free.fr (212.27.48.10): | ||
+ | |||
+ | --- www.free.fr ping statistics --- | ||
+ | 2 packets transmitted, | ||
+ | rtt min/avg/max/mdev = 29.887/29.989/30.091/0.102 ms | ||
+ | [root@testvm1 ~]# [ALT GR]+[CTRL]+[)] | ||
+ | [root@centos8 ~]# | ||
</ | </ | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | **Important** : Notez l' | ||
+ | </ | ||
----- | ----- | ||
- | < | + | Copyright © 2022 Hugh Norris |
- | <div align=" | + | |
- | Copyright © 2021 Hugh Norris. | + | |
- | </ | + |