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 | ||
| sysadmin:linux:virtualisation:kvm:installation_invite:creation-vm-windows-7-pro [2025/12/07 11:46] – Modification sections yoann | sysadmin:linux:virtualisation:kvm:installation_invite:creation-vm-windows-7-pro [2026/09/21 22:16] (Version actuelle) – yoann | ||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| ====== KVM : Création d'une VM Windows 7 Pro ====== | ====== KVM : Création d'une VM Windows 7 Pro ====== | ||
| + | : | ||
| * [[sysadmin: | * [[sysadmin: | ||
| - | ===== Création du fichier disque | + | ===== Environnement hôte ===== |
| - | On crée un fichier disque de 20 Go | ||
| + | ^ Système hôte | Ubuntu 25.10 (questing) | | ||
| + | ^ Architecture | x86_64 | ||
| + | ^ Kernel | ||
| + | ^ libvirt | ||
| + | ^ QEMU | 10.1.0 | ||
| + | ^ Date | 2026-09 | ||
| - | < | + | ===== Procédure ===== |
| - | **A propos des formats RAW et QCOW2** : | + | |
| - | Le format **RAW** offrira de meilleures performances alors que **QCOW2** permettra de bénéficier de fonctionnalités plus avancées comme le Copy on Write ou le Live snapshots. | ||
| - | </ | ||
| + | ==== Analyse du média d' | ||
| + | ^ Fichier | ||
| + | ^ Type | ISO 9660 CD-ROM filesystem data ' | ||
| + | ^ SHA256 | ||
| - | <code bash> | + | DVD ISO bootable pour un système BIOS hérité (legacy BIOS). |
| - | newgrp kvm | + | |
| - | cd ~ | + | |
| - | mkdir -p ~/KVM/ | + | Les spécifications/paramètres de la VM sont automatiquement déterminés par la commande '' |
| - | chmod ug+rwx,o-rwx ~/ | + | |
| - | qemu-img create -f qcow2 ~/ | ||
| - | chmod ug+rw,o-rwx ~/ | ||
| - | </ | ||
| + | < | ||
| + | Pour obtenir de meilleures performances notamment pour les accès disque et le réseau, on s' | ||
| + | \\ | ||
| + | \\ | ||
| + | Les versions 64-bit de Windows Vista et supérieur (Windows Server 2008, Windows 7, Windows 8, Windows Server 2008 R2 et Windows Server 2012 etc) requirent que les pilotes soient signés numériquement. | ||
| + | </ | ||
| - | ===== Création de la VM ===== | ||
| - | |||
| - | Les spécifications/ | ||
| <code bash> | <code bash> | ||
| - | virt-install --virt-type=kvm --name | + | virt-install --connect=qemu:/// |
| + | --name | ||
| --metadata title=" | --metadata title=" | ||
| - | --memory 2048 --vcpus=2 \ | + | --virt-type=kvm \ |
| - | --boot cdrom,hd \ | + | --vcpus=2 |
| - | --disk path=/ | + | --boot uefi=off --osinfo win7 \ |
| + | --boot cdrom,hd, | ||
| + | --disk | ||
| + | --cdrom / | ||
| --graphics spice \ | --graphics spice \ | ||
| - | --sound ich9 \ | + | --network |
| - | --cdrom / | + | |
| - | --network | + | |
| </ | </ | ||
| + | A propos des options utilisées ici : | ||
| + | * '' | ||
| + | * '' | ||
| - | ===== Optimisations via virtIO | + | |
| + | La VM est créée et démarre sur le DVD d' | ||
| + | |||
| + | <code bash> | ||
| + | virsh change-media win7pro sda --eject | ||
| + | virsh change-media win7pro sda / | ||
| + | </ | ||
| + | |||
| + | Une fois les pilotes chargés, monter à nouveau le DVD d' | ||
| + | <code bash> | ||
| + | virsh change-media win7pro sda --eject | ||
| + | virsh change-media win7pro sda / | ||
| + | </ | ||
| + | |||
| + | Sélectionner le disque et cliquer sur < | ||
| + | |||
| + | Depuis l'ISO version 0.1.302, le programme virtio-win-guest-tools ne s' | ||
| + | |||
| + | * Pour le Contrôleur Ethernet : '' | ||
| + | * Pour le Contrôleur PCI de communications simplifiées : '' | ||
| + | * Pour le Périphérique PCI : '' | ||
| + | |||
| + | A ce stade tous les périphériques sont correctement détectés par Windows 7 et fonctionnent. | ||
| + | |||
| + | ^ Périphérique | ||
| + | | Contrôleur de stockage | Red Hat VirtIO SCSI controller | 61.77.104.17200 | ||
| + | | Contrôleur réseau | Red Hat Ethernet Adapter | ||
| + | | Contrôleur port série | ||
| + | | | VirtIO Balloon Driver | ||
| + | |||
| + | |||
| + | L' | ||
| + | ===== Installation BIOS UEFI et GPT ===== | ||
| + | |||
| + | < | ||
| + | Impossible de lancer les installateurs sur les ISO DVD avec le BIOS UEFI. A tester avec création d'un média usb | ||
| + | </ | ||
| : | : | ||
| - | Pour obtenir de meilleures performances il faudra utiliser les pér | ||
| <code bash> | <code bash> | ||
| - | virt-install --virt-type=kvm --name | + | virt-install --connect=qemu:/// |
| - | --metadata title=" | + | --name |
| + | --metadata title=" | ||
| + | --virt-type=kvm | ||
| --memory 2048 --vcpus=2 \ | --memory 2048 --vcpus=2 \ | ||
| - | --boot | + | --boot |
| - | --disk path=/ | + | --boot |
| + | --disk | ||
| + | --cdrom / | ||
| --graphics spice \ | --graphics spice \ | ||
| - | --sound ac97 \ | + | --network |
| - | --cdrom / | + | |
| - | --network | + | |
| </ | </ | ||
| - | ===== Démarrage ===== | + | * Configure UEFI sans secure boot |
| + | Après l' | ||
| + | |||
| + | Créer le partitionnement GPT : | ||
| + | |||
| + | Appuyer sur < | ||
| + | |||
| + | invoquer '' | ||
| + | |||
| + | < | ||
| + | list disk | ||
| + | select disk n (Where n is the number of the disk you want to install Windows 7) | ||
| + | clean | ||
| + | convert gpt | ||
| + | create partition primary size=X (Where X is the amount of partition size in MBs) | ||
| + | format fs=ntfs quick | ||
| + | exit (Exit diskpart) | ||
| + | exit (Exit CMD) | ||
| + | </ | ||
| + | |||
| + | |||
| + | Pour les systèmes “Microsoft Windows 7” utiliser la version des pilotes VirtIO 0.1.173-9 (23-03-2020) | ||
| <code bash> | <code bash> | ||
| - | virsh start win7pro | + | wget " |
| - | virt-viewer | + | |
| </ | </ | ||
| - | Après l' | ||
| + | ===== Démarrage ===== | ||
| + | <code bash> | ||
| + | virsh start win7pro && virt-viewer --wait win7pro | ||
| + | </ | ||
| Ligne 89: | Ligne 158: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * [[https:// | ||
| + | * https:// | ||