Creating Golden image for Windows OS

From Notes_Wiki
Revision as of 13:02, 21 May 2022 by Saurabh (talk | contribs) (Created page with "Home > VMWare platform > VMWare Horizon > Creating Golden image for Windows OS To create Golden image for Windows OS: =VM Creation= Create VM with following hardware configuration: # Select required no. of CPUs # Select desired memory. #: Expand the Memory section. #: Select Reserve all guest memory (All locked). # Choose appropriately sized hard disk, Choose Thin disk type #: Note that very large hard-disk will take time due to sdelete etc....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > VMWare platform > VMWare Horizon > Creating Golden image for Windows OS

To create Golden image for Windows OS:

VM Creation

Create VM with following hardware configuration:

  1. Select required no. of CPUs
  2. Select desired memory.
    Expand the Memory section.
    Select Reserve all guest memory (All locked).
  3. Choose appropriately sized hard disk, Choose Thin disk type
    Note that very large hard-disk will take time due to sdelete etc. processes which run over entire disk. Ideally small disk (max 150GB) should be used. We can always expand / add more disks later.
  4. Expand the New SCSI controller section.
    In Change Type - Select VMware Paravirtual.
  5. From the VM Network list, select the appropriate network.
    Expand New Network.
    Select VMXNET3.
  6. Expand CD/DVD drive1
    Select Datastore ISO File and browse to the Windows ISO file.
    Select Connect. (Tick checkbox)
  7. Add one more CD/DVD device for VMware tools
    Click on ADD NEW DEVICE.
    Select CD/DVD Drive
  8. Expand the Video card section.
    Select the maximum Number of Displays that will be used.
  9. Specify VM Options
    1. At the top of the page click on VM Options.
    2. Expand the Advanced section.
    3. Click Edit Configuration
    4. Click ADD CONFIGURATION PARAMS
      Name
      devices.hotplug
      Value
      false
      Click OK
  10. Click NEXT on the wizard page.
  11. Click FINISH.


OS installation with paravirtual disk drivers

Install Windows OS as:

  1. Boot with windows OS iso. Click on Install VMWare tools link and mount on popup page.
  2. In partition creation page, select load driver
  3. Select Browse option
  4. Select vmware Tools CD/DVD -> Program files -> VMware -> VMware Tools -> Drivers -> pvscsi -> Win8 -> amd64
  5. Select the driver, Click Next
  6. Finish the installation


Install VMWare tools

Install VMware Tools using:

  1. While installing vmware tools, choose custom option and make following changes;
    1. Deactivate the Carbon Black Helper component
    2. Exclude the service Discovery Component
    3. Exclude the Volume Shadow Copy Component
  2. Finish the installation
  3. Restart the server


Machine configuration

  1. Configure LAN IP on machine
  2. Enable remote desktop
  3. Connect to VM via remote desktop
  4. Install .net Framework 3.5 using:
    Windows OS iso should be mounted the vm.
    Open command prompt as an administrator, run the below command
    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs
  5. In case of Server operating system such as Server 2019, Open Server Manager
    1. Go to Local server
    2. Disable Internet Explorer Enhanced Security Configuration
    3. Change the timezone, if required
  6. Update the windows
    Restart the server as and when required
  7. Temporarily install WinSCP, if required


Installing Horizon agent

Installing Horizon agent on for Windows 2019 RDSH

To install Horozon agent. Use same setup.exe file for enabling RDS role and agent installation.

  1. Deploy RDS role.
    1. On the Welcome installation wizard screen, Click on next
    2. Accept the license agreement, Click on next
    3. Select RDS Mode, click next
    4. Click Ok on the warning page
    5. Click Next
      It takes really long time for this to install*
    6. Click Finish
    7. Restart the server
  2. Install agent
    1. On the Welcome installation wizard screen, Click on next
    2. Accept the license agreement, Click on next
    3. Select IPv4, click next
    4. In Custom Setup page,
      Core
      Yes
      3D RDSH
      No
      USB Redirection
      Yes
      VMWare Virtualization Pack for Business
      No
      Real-time Audio video
      Yes
      VMware Horizon Instant Clone
      Yes
      Client Drive Redirection
      No
      Horizon Monitoring Service Agent
      Yes
      Scanner Redirection
      No
      Serial Port Redirection
      No
      Geolocation redirection
      No
      Horizon Performance Tracker
      Yes
      Hybrid logon
      No
      VMWare integrated printing
      Yes
      Helpdesk plugin for Horizon Agent
      Yes
    5. Click next
    6. Click Ok on USB redirection warning page
      Note: For opting Instant clone, installation doesn't asking connection server settings.
    7. Click Next
    8. Select Install
    9. Restart the windows server
      Note: By using above method, Remote Desktop services automatically enabled.


Install Horizon agent for Windows 2019 Desktops

  1. Verify that the Remote Desktop Services role is not installed.
  2. Install Horozon agent.
    1. On the Welcome installation wizard screen, Click on next
    2. Accept the license agreement, Click on next
    3. Select Desktop Mode, click next
    4. Select IPv4, click next
    5. In Custom Setup page, Except below choose everything
      VMware virtualization pack for Skype for Business
    6. Click next
    7. Click Ok on USB redirection warning page
      Note: For opting Instant clone, installation doesn't asking connection server settings.
    8. Choose "Do not enable the Remote Desktop capability on this computer", Click Next
    9. Select Install
    10. Restart the windows server

Ref:

Installing Horizon agent for Windows 10

  1. While installing Horizon agent select Desktop Mode/IPv4:
  2. In Custom Setup page, Except below choose everything
    VMware virtualization pack for Skype for Business settings.
  3. Choose "Do not enable the Remote Desktop capability on this computer", Click Next
  4. Select Install
  5. Restart the windows server


Post installation configuration

  1. Enable Logon Monitoring
    1. Start -> Run -> services.msc
    2. Select "VMware Horizon View Logon Monitor service",
    3. Right click, Click Properties
    4. Start Type: Automatic
    5. start the service
    6. Apply, Ok
      The logon logs are stored at C:\programdata\VMware\VMware Logon Monitor\Logs on each Horizon Agent
  2. Download OSOT tool and related files to C:\OSOT folder
    Download URL
  3. Copy the downloaded files to C:/OSOT/
  4. Download Secure Delete files from the below link
    https://download.sysinternals.com/files/SDelete.zip
  5. Download Local Group Policy Object Utility
    https://download.microsoft.com/download/8/5/C/85C25433-A1B0-4FFA-9429-7E023E7DA8D8/LGPO.zip
  6. Extract the downloaded files and Copy the same to C:/OSOT/
  7. (Optionally) Right-click each file (sdelete64.exe and lgpo.exe) -> select Properties and in the Properties dialog box, if there is any unblock option, select it and click OK
  8. Remove horizon agent setup and WinSCP setup from Downloads folder
  9. Uninstall Winscp
  10. Shutdown the VM
  11. Remove the two CD/DVD drives
  12. Remove the SATA Controller
  13. Delete the New USB Controller.
  14. Start the VM


Running OS Optimizer Tool

Run OS Optimization Tool to Optimize and Finalize the OS Optimization

  1. Run as administrator
  2. Accept the license and click next
  3. Optimize
    1. From Optimize tab
    2. Click analyze on bottom right corner
    3. Click the Common Options
      1. From Update tab, select
        • Disable Windows Update
        • Disable Office update
      2. From Security tab, select
        • Disable Firewall
        • Disable Antivirus
    4. Click Ok
    5. Choose Optimize
  4. Finalize
    1. From Finalize tab
    2. Click Finalize
      The finalize process will take some time.
    3. After Finalize process completes
    4. Remove static ip configuration and Enable in DHCP in IPv4 settings.
      Dont try to do this remotely. This should be done via VMRC/Web Console
  5. Delete files from Documents, Downloads, Desktop, if any
  6. Delete C:\OSOT
  7. Uninstall any software such as WinSCP
  8. Shutdown the vm


Exporting and reimporting VM

Export the VM to Adjust Disk Size using:

  1. Export to OVF. While exporting Advanced options, choose
    1. Enable advanced options
    2. Include extra configuration
  2. Three files will start downloading, the vmdk will take really long time.
    Finally at end one .mf file will be available for download. That indicates successful download.
  3. Import using, deploy the OVF template (Import) to create a new VM for horizon use
  4. Take VM snapshot as soon as import is completed


Refer:


Home > VMWare platform > VMWare Horizon > Creating Golden image for Windows OS