virtu-desk (virtu, IA & cyber...) VIRTU-DESK - Technologies de virtualisation et sécurisation de l'environnement utilisateurs.

Configuration & Optimisation de W7 pour VMware View 5.x

Par Le mardi, 27 mai 2014 0

Dans Virtualisation de postes de travail

Voici un petit arcticle sur la configuration et l'optimisation d'une machine virtuelle Windows 7 en environnement VDI VMware View 5.x

Configuration de la VM avec ESX

  • Hardware version: utiliser la dernière version pour la plateforme vSphere
  • vCPUs: 1
  • vRAM: 2048 MB
  • Disk Size: 40 GB (la volumétrie dépend aussi du nombre d’application installées en local)
  • SCSI Controller: LSI Logic SAS
  • vNIC: VMXNET3
  • Video Card: Do not « Auto detect ». Mettre 2 écrans et 128 MB de mémoire vidéo (voir la KB 1017380 de VMware)
  • Video Card: Activer « 3D support »
  • Désactiver « Virtual Machine logging » (via Edit Settings – Options – Advanced – General)
  • Supprimer le floppy
  • CD-ROM: Mettre à « Client Device » (Passthrough IDE)
  • BIOS: Désactiver les ports séries, parallèles, le contrôleur de floppy. Dans l’ordre de boot, mettre le HDD en premier

Gestion de la licence

Si vous souhaitez affecter manuellement des licences à des machines virtuelles  VMware View, vous pouvez utiliser des clés de licence MAK. Mais pour des déploiements plus importants à l'aide de VMware View composer avec des clones liés, vous devez utiliser le serveur KMS de Microsoft. En effet, VMware View composer ne prend pas en charge les licences MAK pour gérer les clones liés.

La configuration du serveur KMS pour Windows7 et Office 2010 est décrite dans cet article.

Maintenant, si vous devez vraiment utiliser des licences MAK, vous pouvez modifier la base de registre de la VM comme le décrit l'article suivant. Mais rien n'est garanti et c'est à vos risques et périls, Clin d'œil.

Installation et optimisation du système

Installation

  • Installer Windows 7
  • Installer les VMware Tools et redémarrer la VM
  • Installer le SP1 et faire les mises à jour Windows Update
  • Télécharger et installer le correctif « Windows6.1-KB2550978-x64.msu » (Voir ce lien)

Optimisation

  • Exécuter (en tant qu’administrateur) le script d’optimisation « PrepClient.bat » Télécharger le script

 

Détail du script « PrepClient.bat »

rem Use this script for desktops _without_ View Persona Management implemented.
rem  Setting Default HKCU values by loading and modifying the default user registry hive
reg load "hku\temp" "%USERPROFILE%\..\Default User\NTUSER.DAT"
reg ADD "hku\temp\Software\Policies\Microsoft\Windows\Control Panel\Desktop" /v SCRNSAVE.EXE /d "%windir%\system32\scrnsave.scr" /f
reg ADD "hku\temp\Software\Policies\Microsoft\Windows\Control Panel\Desktop" /v ScreenSaveTimeOut /d "600" /f
reg ADD "hku\temp\Software\Policies\Microsoft\Windows\Control Panel\Desktop" /v ScreenSaverIsSecure /d "1" /f
reg ADD "hku\temp\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v Wallpaper /d " " /f
reg ADD "hku\temp\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache" /v Persistent /t REG_DWORD /d 0x0 /f
reg ADD "hku\temp\Software\Microsoft\Feeds" /v SyncStatus /t REG_DWORD /d 0x0 /f
reg ADD "hku\temp\Software\Microsoft\WIndows\CurrentVersion\Policies\Explorer" /v HideSCAHealth /t REG_DWORD /d 0x1 /f
reg unload "hku\temp"

rem Making modifications to the HKLM hive
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v DisableFirstRunCustomize /t REG_DWORD /d 0x1 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnableSuperfetch /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 0x1 /f
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore" /v DisableSR /t REG_DWORD /d 0x1 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Disk" /v TimeOutValue /t REG_DWORD /d 200 /f
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Image" /v Revision /t REG_SZ /d 1.0 /f
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Image" /v Virtual /t REG_SZ /d Yes /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application" /v MaxSize /t REG_DWORD /d 0x100000 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application" /v Retention /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\System" /v MaxSize /t REG_DWORD /d 0x100000 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\System" /v Retention /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Security" /v MaxSize /t REG_DWORD /d 0x100000 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Security" /v Retention /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer" /v NoRecycleFiles /t REG_DWORD /d 0x1 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0x0 /f
reg ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system" /v EnableLUA /t REG_DWORD /d 0x0 /f
reg Add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Sideshow" /v Disabled /t REG_DWORD /d 0x1 /f
reg Add "HKU\.DEFAULT\AppEvents\Schemes" /VE /T REG_SZ /F /D ".NONE"

diskperf -N
reg Add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager” /v DisablePagingExecutive /t REG_DWORD /d 0×100000 /f
reg Delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon” /v LegalNoticeCaption /f
reg Delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon” /v LegalNoticeText /f

rem Using Powershell to perform Windows Services modifications
Powershell Set-Service 'BDESVC' -startuptype "disabled"
Powershell Set-Service 'wbengine' -startuptype "disabled"
Powershell Set-Service 'DPS' -startuptype "disabled"
Powershell Set-Service 'UxSms' -startuptype "disabled"
Powershell Set-Service 'Defragsvc' -startuptype "disabled"
Powershell Set-Service 'HomeGroupListener' -startuptype "disabled"
Powershell Set-Service 'HomeGroupProvider' -startuptype "disabled"
Powershell Set-Service 'iphlpsvc' -startuptype "disabled"
Powershell Set-Service 'MSiSCSI' -startuptype "disabled"
Powershell Set-Service 'swprv' -startuptype "disabled"
Powershell Set-Service 'CscService' -startuptype "disabled"
Powershell Set-Service 'SstpSvc' -startuptype "disabled"
Powershell Set-Service 'wscsvc' -startuptype "disabled"
Powershell Set-Service 'SSDPSRV' -startuptype "disabled"
Powershell Set-Service 'SysMain' -startuptype "disabled"
Powershell Set-Service 'TabletInputService' -startuptype "disabled"
Powershell Set-Service 'Themes' -startuptype "disabled"
Powershell Set-Service 'upnphost' -startuptype "disabled"
Powershell Set-Service 'VSS' -startuptype "disabled"
Powershell Set-Service 'SDRSVC' -startuptype "disabled"
Powershell Set-Service 'WinDefend' -startuptype "disabled"
Powershell Set-Service 'WerSvc' -startuptype "disabled"
Powershell Set-Service 'MpsSvc' -startuptype "disabled"
Powershell Set-Service 'ehRecvr' -startuptype "disabled"
Powershell Set-Service 'ehSched' -startuptype "disabled"
Powershell Set-Service 'WSearch' -startuptype "disabled"
Powershell Set-Service 'wuauserv' -startuptype "disabled"
Powershell Set-Service 'Wlansvc' -startuptype "disabled"
Powershell Set-Service 'WwanSvc' -startuptype "disabled"

rem Making miscellaneous modifications
bcdedit /set BOOTUX disabled
vssadmin delete shadows /All /Quiet
Powershell disable-computerrestore -drive c:\
netsh advfirewall set allprofiles state off
powercfg -H OFF
net stop "sysmain"
fsutil behavior set DisableLastAccess 1

rem Making modifications to Scheduled Tasks
schtasks /change /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /Disable
schtasks /change /TN "\Microsoft\Windows\SystemRestore\SR" /Disable
schtasks /change /TN "\Microsoft\Windows\Registry\RegIdleBackup" /Disable
schtasks /change /TN "\Microsoft\Windows Defender\MPIdleTask" /Disable
schtasks /change /TN "\Microsoft\Windows Defender\MP Scheduled Scan" /Disable
schtasks /change /TN "\Microsoft\Windows\Maintenance\WinSAT" /Disable

 

Il existe chez l'éditeur Quest, un petit produit vWorkspace Desktop Optimizer qui permet d'optimiser l'environnement du poste Windows 7 de manière graphique. Cet utilitaire est gratuit, sans support et à utiliser à vos risques et périls. Voir la fiche produit (en anglais).

Installation des applications

Installer toutes vos applications.

Les applications ci-dessous peuvent être installées en supplément

  • Installer la dernière version d’Adobe Flash Player:
    • Aller sur le site « http://get.adobe.com/flashplayer »
    • Décocher l’option « Oui, je souhaite installer l’utilitaire gratuit McAfee Security Scan Plus… »
    • Méthode de mise à jour : Ne jamais vérifier les mises à jour (voir le document suivant pour les instructions)
  • Installer la dernière version d’Adobe Reader
    • Aller sur le site « http://get.adobe.com/reader »
    • Décocher l’option « Oui, je souhaite installer l’utilitaire gratuit McAfee Security Scan Plus… »
    • Faire manuellement les recherché et installation des mises à jour
    • Activer « Adobe PDF LInk Helper » add-on
    • Supprimer le raccourci et le fichier d’installation sur le bureau
  • Installer la dernière version d’Adobe Shockwave player
    • Aller sur le site « http://get.adobe.com/shockwave »
    • Décocher l’option « Oui, je souhaite installer l’utilitaire gratuit McAfee Security Scan Plus... »

Lancer et tester les applications

Supprimer les clés de registre :

  • « HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Adobe ARM »
  • « HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\SunjavaUpdateShed »

Arrêter et désactiver le service « Adobe Acrobat Update Service »
Arrêter la VM et faire un snapshot

Joindre la machine au domaine

Joindre la VM au domaine Active Directory

Ajouter un groupe Active Directory qui contiendra les utilisateurs et(ou) les groupes qui seront autorisés à ouvrir des connexions Bureau à distance à la machine virtuelle (tous les utilisateurs et(ou) groupes qui seront autorisés à se connecter à un bureau VMware View)

Installer l’agent View 5.x. Attention à bien utiliser la même version que celle de View Connector Server

Nettoyer la machine virtuelle :

  • Ouvrir une commande prompt et exécuter « C:\WINDOWS\Microsoft.NET\Framework\v2.0.50772\ngen.exe executeQueuedItems » (Ca précompile tous les .NET qui pourraient encore être en file d'attente).
  • Supprimer tous les fichiers du dossier « c:\Windows\SoftwareDistribution\Download »
  • Effacer tous les eventlogs en ​​exécutant la commande suivante dans une invite de cmd (Exécuter en tant qu'administrateur)
    • wevtutil el >a.txt
    • for /f %x in (a.txt) do wevtutil cl %x
    • del a.txt
  • Exécuter Disk Cleanup » pour supprimer tous les fichiers temporaires, vider la corbeille et supprimer d’autres fichiers inutiles.
  • Exécutez une défragmentation complète (penser à désactiver la Défragmentation du planificateur de tâches)
  • Réinitialiser l’adresse IP de la VM : ipconfig /release
  • Vider le cache DNS : ipconfig /flushdns

Arrêter la VM et faire un snapshot

 

Télécharger les deux document de VMware sur l'optimisation en environnement View

Télécharger le document d'EMC Déploying Microsoft Windows7 Virtual Destop with VMware View   

  • 1 vote. Moyenne 5 sur 5.
Vous devez être connecté pour poster un commentaire