The-Virtual-Desktop-Team / Virtual-Desktop-Optimization-Tool

The script and configuration files in this repository provide an easy method to customize and apply performance related settings to virtual desktop environments.
688 stars 174 forks source link

Horizon on Azure sysprep issue #120

Closed VirtualizedCaffeine closed 2 years ago

VirtualizedCaffeine commented 2 years ago

I am trying to use this tool to optimize a Win 10 21H2 MultiSession VM used by Horizon on Azure. (In place of the VMware OSOT tool) When I have my image loaded with apps, and am logged on as a local/only Admin user, I run the ps1 as I have done so in the past, reboot and all is well. When I go to convert the image to a published image that can be used (Sysprep is run at this step by the Horizon solution on Azure), the Vms all get stuck after 20 minutes with an error ""Power off virtual machine 'TEST01' - Timeout Error Waited 20 minutes for virtual machine 'TEST01' to power off."" The local Sysprep log in c:\Panther doesn't give me much to go on. I'm curious if anyone else is using this script with Horizon on Azure, and if they have any pointers on this error. VM and Msft seem to point to issues with apps being removed from the profile being used to syprep https://docs.microsoft.com/en-us/troubleshoot/windows-client/deployment/sysprep-fails-remove-or-update-store-apps

I do not think the script is broken, just not sure where else to ask this honestly.

VirtualizedCaffeine commented 2 years ago

So I created an Admin2 account and made it a local admin. Logged in as Admin2, and deleted the Administrator profile. I then ran the VDOT as this Admin2 and rebooted and logged in as the original administrator. I then publish the image and used the Administrator account credentials to perform the Sysprep as part of the process, and it seemed to work. I believe the article above was correct, that a previously created account (prior to removal of appx packages) caused the issue for me in my case.

VirtualizedCaffeine commented 2 years ago

Loks like a Msft/Horizon bug is to blame for this https://kb.vmware.com/s/article/88343

tmmuessig commented 2 years ago

Closing this issue as it looks like the issue is not with the VDOT tool itself. If this is not the cause, please feel free to re-open it.