VDI Onedrive Windows 10
/ May 28, 2019/ VMware Horizon
Onedrive and VDI. Can we manage Onedrive to make it accessible for VDI users without performance degradation? That was a question from my product owner. For physical desktops users are familiar with Onedrive so the wish was there to make it available within VDI.
By default Onedrive will be installed on user base within the local folder “%localappdata%\Microsoft\OneDrive” On each user login the process onedrivesetup.exe will be launched and consumes a lot of cpu resources for a while. The process installed and copied all the Onedrive files and folders to the local folder in the user profile.
The source file of this process has been placed by default in the sysWow64 folder C:\Windows\SysWOW64\OneDriveSetup.exe
To prevent that the onedrivesetup.exe process will be started at each user login. the following registry key must be deleted in the default profile.
- reg load “hku\virtual” “c:\users\Default User\NTUSER.DAT”
- reg DELETE “hku\virtual\Software\Microsoft\Windows\CurrentVersion\Run” /v OneDriveSetup /f
- reg UNLOAD “hku\virtual”
Install Onedrive per machine (preview)
to install onedrive per machine while making the parent vm or golden image you must install Onedrive with the following parameter “C:\Windows\SysWOW64\OneDriveSetup.exe /allusers” check after completing the install wizard if the folder “C:\Program Files (x86)\Microsoft OneDrive\19.043 or higher” exist
There is one requirement, you must use the sync client build 19.043.0304.0003 or later.
Prevent auto update Onedrive client
During setup, Onedrive will install a scheduled task and a Windows service, which are used to perform the updates silently without user intervention.
The following scheduled task and windows services can be disabled to prevent auto updates.
- Service “Onedrive Updater Service”
- “OneDrive Per-Machine Standalone Update Task”
PropertiesHive HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive
Value name SilentAccountConfig
Value type REG_DWORD
Value data 0x1 (1)
I hope that this blog post will help you while doing the configuration of the Onedrive client within a virtual desktop. Without the tools like fslogix or writable volumes, i think this is the best solution.
FAQ OneDrive
Most frequent questions and answers
Only Onedrive with the function “Files on demand” is acceptable for VDI environments
The OneDrive Sync Client is not supported in a VDI nor RDSH environment as per following Microsoft support article. VMware has tested the sync client’s File On-Demand feature along with Horizon 7 Instant Clone Technology using Windows 10 Fall Creators update. The results were found to be acceptable for use with Windows 10-based VDI pools.
C:\Windows\SysWOW64\OneDriveSetup.exe /allusers
You must use the sync client build 19.043.0304.0003 or later.
There is a small chance that the Onedrive version you are using is lower then the required version
To following scheduled task and windows services can be disabled to prevent auto updates.
- Service “Onedrive Updater Service”
- “OneDrive Per-Machine Standalone Update Task”
Nice post! I think this post will save a lot of people a great amount of time!
Hi.
I’m having a trouble, when we re-log on our VDI machine OneDrive deletes the files we didn’t used last sesion. Do you know any solution for this? on the internet I saw many people with that issue but not any solution.
Hello Lince,
It sounds like the same behavior while testing it for my environment
Make sure that the hidden file under the folder C:\Users\%username%\OneDrive – vmware\.* has been excluded.
The best thing should be to exclude all files within the folder.
When you don’t exclude the files under the root folder, a process within Onedrive would think that there is a problem with the user content an deletes all the files.
Good Luck! and please let me know if this helps.
Greetz Kevin
Pingback: OneDrive w/non-persistent VDI |VMware Communities | For servers
we do want users to use one-drive. I would like to understand then should we install one-drive per machine and disable auto update service.
By the way, excellent blog.
Hello, In case you’re planning to use Onedrive in combination with VDI or RDS, it is better to install Onedrive per-machine based. Make note that the feature “On-demand” only works in combination with the giving version of Onedrive or later.
so grab the installer and run the Onedrivesetup.exe with the additional parameter 😉
Greetz,
Kevin
I cant install VDI on my Hp laptop . Installation is kept on failing can you help
Hello Nagma,
how do you mean “I cant install VDI on my Hp laptop” a VDI environment has several core servers in combination with the vCenter. Would you like to run a virtual machine on your laptop? VMware workstation suits the best