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....")
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. processes which run over entire disk. Ideally small disk (max 150GB) should be used. We can always expand / add more disks later.
- Expand the New SCSI controller section.
- In Change Type - Select VMware Paravirtual.
- From the VM Network list, select the appropriate network.
- Expand New Network.
- Select VMXNET3.
- Expand CD/DVD drive1
- Select Datastore ISO File and browse to the Windows ISO file.
- Select Connect. (Tick checkbox)
- Add one more CD/DVD device for VMware tools
- Click on ADD NEW DEVICE.
- Select CD/DVD Drive
- Expand the Video card section.
- Select the maximum Number of Displays that will be used.
- Specify VM Options
- At the top of the page click on VM Options.
- Expand the Advanced section.
- Click Edit Configuration
- Click ADD CONFIGURATION PARAMS
- Name
- devices.hotplug
- Value
- false
- Click OK
- Click NEXT on the wizard page.
- Click FINISH.
OS installation with paravirtual disk drivers
Install Windows OS as:
- Boot with windows OS iso. Click on Install VMWare tools link and mount on popup page.
- In partition creation page, select load driver
- Select Browse option
- Select vmware Tools CD/DVD -> Program files -> VMware -> VMware Tools -> Drivers -> pvscsi -> Win8 -> amd64
- Select the driver, Click Next
- Finish the installation
Install VMWare tools
Install VMware Tools using:
- While installing vmware tools, choose custom option and make following changes;
- Deactivate the Carbon Black Helper component
- Exclude the service Discovery Component
- Exclude the Volume Shadow Copy Component
- Finish the installation
- Restart the server
Machine configuration
- Configure LAN IP on machine
- Enable remote desktop
- Connect to VM via remote desktop
- 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
- In case of Server operating system such as Server 2019, Open Server Manager
- Go to Local server
- Disable Internet Explorer Enhanced Security Configuration
- Change the timezone, if required
- Update the windows
- Restart the server as and when required
- 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.
- Deploy RDS role.
- On the Welcome installation wizard screen, Click on next
- Accept the license agreement, Click on next
- Select RDS Mode, click next
- Click Ok on the warning page
- Click Next
- It takes really long time for this to install*
- Click Finish
- Restart the server
- Install agent
- On the Welcome installation wizard screen, Click on next
- Accept the license agreement, Click on next
- Select IPv4, click next
- 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
- Click next
- Click Ok on USB redirection warning page
- Note: For opting Instant clone, installation doesn't asking connection server settings.
- Click Next
- Select Install
- Restart the windows server
- Note: By using above method, Remote Desktop services automatically enabled.
Install Horizon agent for Windows 2019 Desktops
- Verify that the Remote Desktop Services role is not installed.
- Install Horozon agent.
- On the Welcome installation wizard screen, Click on next
- Accept the license agreement, Click on next
- Select Desktop Mode, click next
- Select IPv4, click next
- In Custom Setup page, Except below choose everything
- VMware virtualization pack for Skype for Business
- Click next
- Click Ok on USB redirection warning page
- Note: For opting Instant clone, installation doesn't asking connection server settings.
- Choose "Do not enable the Remote Desktop capability on this computer", Click Next
- Select Install
- Restart the windows server
Ref:
Installing Horizon agent for Windows 10
- While installing Horizon agent select Desktop Mode/IPv4:
- In Custom Setup page, Except below choose everything
- VMware virtualization pack for Skype for Business settings.
- Choose "Do not enable the Remote Desktop capability on this computer", Click Next
- Select Install
- Restart the windows server
Post installation configuration
- Enable Logon Monitoring
- Start -> Run -> services.msc
- Select "VMware Horizon View Logon Monitor service",
- Right click, Click Properties
- Start Type: Automatic
- start the service
- Apply, Ok
- The logon logs are stored at C:\programdata\VMware\VMware Logon Monitor\Logs on each Horizon Agent
- Download OSOT tool and related files to C:\OSOT folder
- Copy the downloaded files to C:/OSOT/
- Download Secure Delete files from the below link
- Download Local Group Policy Object Utility
- Extract the downloaded files and Copy the same to C:/OSOT/
- (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
- Remove horizon agent setup and WinSCP setup from Downloads folder
- Uninstall Winscp
- Shutdown the VM
- Remove the two CD/DVD drives
- Remove the SATA Controller
- Delete the New USB Controller.
- Start the VM
Running OS Optimizer Tool
Run OS Optimization Tool to Optimize and Finalize the OS Optimization
- Run as administrator
- Accept the license and click next
- Optimize
- From Optimize tab
- Click analyze on bottom right corner
- Click the Common Options
- From Update tab, select
- Disable Windows Update
- Disable Office update
- From Security tab, select
- Disable Firewall
- Disable Antivirus
- From Update tab, select
- Click Ok
- Choose Optimize
- Finalize
- From Finalize tab
- Click Finalize
- The finalize process will take some time.
- After Finalize process completes
- 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
- Delete files from Documents, Downloads, Desktop, if any
- Delete C:\OSOT
- Uninstall any software such as WinSCP
- Shutdown the vm
Exporting and reimporting VM
Export the VM to Adjust Disk Size using:
- Export to OVF. While exporting Advanced options, choose
- Enable advanced options
- Include extra configuration
- 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.
- Import using, deploy the OVF template (Import) to create a new VM for horizon use
- Take VM snapshot as soon as import is completed
Refer:
- https://www.carlstalhood.com/vmware-horizon-8-master-rds-host/
- https://www.carlstalhood.com/vmware-horizon-8-rds-farms-pools/
- https://techzone.vmware.com/manually-creating-optimized-windows-images-vmware-horizon-vms#analyze-and-optimize-the-os-using-customizable-templates
Home > VMWare platform > VMWare Horizon > Creating Golden image for Windows OS