VMware Horizon Community
ginadaly
VMware Employee
VMware Employee

Asset Published: Manually Creating Optimized Windows Images for VMware Horizon VMs

Do you have feedback or questions regarding this Tech Zone Operational Tutorial?

If so, use this post to provide your feedback and questions, and access all the answers and tips in one handy location.

 

Manually Creating Optimized Windows Images for VMware Horizon VMs | VMware sWORDsarakelian

Labels (1)
Tags (1)
Reply
0 Kudos
20 Replies
vJoeG
Hot Shot
Hot Shot

Gina,

My feedback is that this asset has gotten many, many hits from my customers as well as colleagues and team in our efforts to build Master images for projects and labs.

I'd be interested to see how many hits this gets, 'Daily'

Top marks for sure!

------------------
Joe Graziano
Senior Solution Engineer - EUC Federal
VCP7-DTM, VCP6-DM, VCP6-DCV
vExpert, vExpertPro
jgraziano@vmware.com
Reply
0 Kudos
sjesse
Leadership
Leadership

Maybe add something about why certain choices are made, I know when I refer people to it and they ask questions there are some choices I don't know how to explain every time. Its probably general image management best practices but I keep getting asked why are we generalizing when it works fine when you don't.

Reply
0 Kudos
sWORDs
VMware Employee
VMware Employee

9-12.6K hits per month in the last 12 months and we had somewhere around 20 remarks/questions on the guide. A large portion of those are praises, and we had 9 people that couldn’t get it working.

7 of those deviated from the guide (and had no issues when following it to the letter) 2 didn’t respond to follow up questions. The others where textual changes which we adjusted.

Reply
0 Kudos
sWORDs
VMware Employee
VMware Employee

Which choices would you like to see explained?

Reply
0 Kudos
ap_idb
Enthusiast
Enthusiast

The VM Tools section is either new, or I totally overlooked it.

Does installing tools without those custom options have any known performance impact?

Reply
0 Kudos
sWORDs
VMware Employee
VMware Employee

It was in there before, but from the UI. The video driver is done to ease updates (no sequence dependency between Horizon Agent and VMware Tools), the other removed features came from earlier recommendation, but I haven’t measured it.

Reply
0 Kudos
ap_idb
Enthusiast
Enthusiast

That makes a lot of sense, my other question was about updated VMtools as I saw later in this documentation where they just update with no regard for sequence! Back to the base image for those changes.

Reply
0 Kudos
sjesse
Leadership
Leadership

Why are is it suggested to export the VM, I'm assuming its to recover the space savings. Why not instead run the vmktools command to recover the space like in the below kb. I'm assuming its because its easier, but I'm seeing people here and there have issues with the export and import of ovf files through the webclient like in Re: Invalid response code: 500 so I'm wondering if the vmkfstools command is better.

https://kb.vmware.com/s/article/

  1. Ensure that the disk has no Snapshots.
  2. In a Windows virtual machine, run the SDelete command (or a tool with similar functionality) to zero out all unused space. The syntax for the SDelete command is SDelete -z driveletter. If you use SDelete, ensure that you use version 1.6 or later.

    Note: Zeroing all unused blocks inflates the disk to its full size as if it was an eagerzeroed disk. Ensure that there is sufficient space on the datastore to allow the disk to grow to its full size. For more information, see Determining if a VMDK is zeroedthick or eagerzeroedthick (1011170).
  3. Shut down the virtual machine or temporarily remove the virtual disk from the virtual machine to ensure that it is not in use.
  4. Erase all unused blocks by running the command:

    vmkfstools -K /path/to/disk-name.vmdk
ggordon
VMware Employee
VMware Employee

Both methods will work to reclaim unused space. Using Export to OVF also helps if you need to copy and use the VM in a different vCenter environment.

sWORDs
VMware Employee
VMware Employee

vmkfstools only works on VMFS storage, plus not everyone has SSH access.

Reply
0 Kudos
Dizzion_Stewie
Contributor
Contributor

There is a step missing after 

9.6. Select the Driver

It is necessary to cancel the tools installer so that the windows ISO becomes available otherwise you won't be able to select next to install to the newly discovered unallocated space.

Reply
0 Kudos
Mickeybyte
Hot Shot
Hot Shot

@Dizzion_Stewie 

This should not be necessary if you used 2 CD/DVD-Drives (Step 8). The first one is connected to your Windows ISO. Once you click "Install VMware tools" it will be attached to the second CD/DVD drive and the Windows ISO will still be available. 

If you didn't add a second CD/DVD drive, then the Windows ISO would be disconnected and replaced by the VMware tools ISO indeed.

 


Regards,
Mickeybyte (ITPro blog)

If you found this comment useful or an answer to your question, please mark as 'Solved' and/or click the 'Kudos' button, please ask follow-up questions if you have any.
Reply
0 Kudos
rgb99
Enthusiast
Enthusiast

The section under "Deactivate the Local Administrator User Account" mentions creating the policy in "Computer Configuration." That will work, but only if there is another local administrator present.

Since I don't want any local admins, we defined the policy under User Configuration instead. The policy was applied correctly and the built-in Administrator account was successfully disabled.

Reply
0 Kudos
almostIT
Enthusiast
Enthusiast

Can you elaborate on the state a VM template should be in when prepared for use in an instant-clone scenario? Should it be generalized and syspreped? 

Reply
0 Kudos
rgb99
Enthusiast
Enthusiast

@almostIT , the Tech Zone article goes into it quite well. Yes, it should be generalized and syspreped. The system should not be in template form but as a VM instead. You create snapshots from the golden image VM and instant clones are created from the snapshots.

https://techzone.vmware.com/resource/windows-os-optimization-tool-vmware-horizon-guide

Tags (1)
Reply
0 Kudos
almostIT
Enthusiast
Enthusiast

Of course, the "template" machines are not actual VM templates. I was referring to them incorrectly. They are VMs, turned on an in a prepared state, but not published.

I never take snapshots of them either, and they work every time. I was under the impression, after watching a few VMware published videos, that it wasn't necessary to take snapshots for use with instant clones (anymore), due to changes in how they prepared and processed them. I could be wrong about that too. 

Tags (1)
Reply
0 Kudos
sjesse
Leadership
Leadership

Your mistaking the cp-template files, with the image described in the doc I think. You absolutely need to take snapshots of the vm your working on, once you push it a cp-template is created and depending on the pool you might get parent images on each host or you will just get clones of the templates. They are not actual vm template which are different. The instaclone process has will determine what type to use based on the size of the pool to help speed up the process.

Reply
0 Kudos
rgb99
Enthusiast
Enthusiast

I have never heard of using instant clones without snapshots. At least in my build of the Connection Server (8.4.1 build - 20741546), snapshots are absolutely necessary.

rgb99_0-1690315247192.png

 

Reply
0 Kudos
almostIT
Enthusiast
Enthusiast

I'm using DaaS - aka Horizon Cloud on premise. 😞 

 

Tags (1)
Reply
0 Kudos