FSLogix and OneDrive: how to set it up, and where it breaks

SOLUTION GUIDE

FSLogix keeps each user’s OneDrive cache inside their profile container, so OneDrive survives sign-out on pooled and non-persistent virtual desktops. To make it work, install OneDrive per machine, keep the cache in the container (the default), turn on Files On-Demand, and avoid concurrent sessions. The catch is size: every user’s container holds their own OneDrive cache, and for shared SharePoint libraries that cache multiplies with every user.

What does FSLogix do for OneDrive?

It gives OneDrive somewhere to keep its state between sessions. On a pooled or non-persistent desktop, anything written to the local profile is lost at sign-out. Without FSLogix, the OneDrive sync client would start from scratch at every sign-in and rebuild its cache of every library the user syncs.

FSLogix stores the user’s profile in a virtual disk (a VHD or VHDX file) on a file share, and mounts it at sign-in on whichever host the user lands on. By default, the profile container holds everything, including the OneDrive cache, in a single file. Microsoft calls this the recommended configuration.

How do you set up OneDrive with FSLogix?

  1. Run the latest FSLogix release. Microsoft requires it for OneDrive on non-persistent desktops.
  2. Install OneDrive per machine, not per user. Run OneDriveSetup.exe /allusers in your image, so OneDrive installs under Program Files rather than in each user’s profile. Microsoft requires this for non-persistent environments.
  3. Keep the OneDrive cache in the container. The profile container includes it by default. If you use the separate Office container (ODFC) instead, its IncludeOneDrive setting must stay at 1, which is the default.
  4. Turn on Files On-Demand, so OneDrive downloads file content only when a user opens it, and use silent account configuration so users on Entra ID-joined hosts are signed in to OneDrive automatically.
  5. Size the container. The default maximum (SizeInMBs) is 30,000 MB, about 30 GB, on a dynamic disk that grows as needed up to that cap. Plan for the OneDrive cache on top of everything else in the profile (see below).
  6. Leave VHD Disk Compaction on. It’s on by default, runs at every sign-out, and hands back free space inside dynamic disks. It needs the Optimize Drives service (defragsvc) not to be disabled.
  7. Avoid concurrent sessions. OneDrive doesn’t support the same container being used by two sessions at once (more on that below).

Should you use the profile container or the Office container?

Use the profile container on its own if FSLogix is your only profile solution. That’s Microsoft’s recommended setup: one container holding the profile and the Office data, including OneDrive.

The Office container (ODFC) is optional. It holds just the Microsoft 365 app data: OneDrive, Outlook, Office activation, and SharePoint data. It’s most often used alongside another roaming profile tool, such as Citrix Profile Management, so that the Office data travels in FSLogix while the rest of the profile travels in the other tool.

Which Windows versions does Microsoft support?

Check this before you design around it. Microsoft’s OneDrive VDI support page supports OneDrive on persistent virtual desktops, and on non-persistent desktops in Azure Virtual Desktop. For non-persistent desktops using FSLogix, it lists Windows 11 and Windows Server 2025 or newer. Older Windows Server versions, such as 2019 and 2022, aren’t on that list, which matters if your Citrix or Remote Desktop Services farm still runs them.

What goes wrong with OneDrive in FSLogix?

Containers grow with everything users sync

Files On-Demand keeps file content out of the container until it’s opened, but OneDrive still stores a placeholder and metadata for every file a user can see in File Explorer, plus thumbnails, its sync database, and anything they’ve opened. Our research puts that cache at 2–7% of everything the user reaches in File Explorer. Libraries added with Add shortcut to My files count just the same as synced ones.

For OneDrive itself, that’s manageable. For SharePoint, it multiplies: 100 users who all reach one 100 GB library need 200–700 GB of cache between them, all of it in profile containers on premium storage. Our post on why the cache multiplies with every user explains the arithmetic, and our guide to the OneDrive sync cache cost in VDI shows how to cost it.

Disk compaction doesn’t fix this. It only reclaims empty space inside the disk. A cache that’s in use stays.

Containers fill up

When a container reaches its SizeInMBs cap, there’s no room left for the profile, OneDrive included. Raising the cap costs storage, and every user’s container may need it. Storage Sense can turn files back into online-only placeholders to free space, but it can’t remove the placeholders themselves.

Users can’t have two sessions

Microsoft is blunt about this: OneDrive doesn’t support multiple concurrent connections using the same profile, “under any circumstances”. By default, if a user signs in to a second host while their container is still in use, they get a temporary profile instead. That hits people who open a full desktop and a RemoteApp from different host pools, or who leave a session running in one place and sign in somewhere else.

Sign-ins and sign-outs slow down

Bigger containers take longer to mount, especially when many users sign in to pooled hosts at once. Compaction adds time at sign-out too: Microsoft says it averages 20–30 seconds, shown as “Waiting for FSLogix Apps Services”, and it can take up to five minutes.

Desktop apps still don’t get a drive letter

FSLogix keeps OneDrive working, but OneDrive still presents synced libraries as folders in the user’s profile. Line of business apps, templates and macros that expect a path such as S:\Projects can’t use them. Our guide to why desktop apps need real file paths covers this.

When should you stop syncing SharePoint on virtual desktops?

Keep OneDrive sync, inside FSLogix, for each user’s own OneDrive. That cache grows in proportion to their own files, so it stays predictable. Consider another route for shared SharePoint libraries and Teams when:

  • containers keep growing, or keep hitting their size cap;
  • many users reach the same large libraries;
  • desktop apps need drive letters;
  • you run hosts that aren’t on Microsoft’s supported list.

Cloud Drive Mapper (CDM) maps SharePoint libraries, Teams and OneDrive as drive letters without syncing them. Its cache is small and self-managing: the names of folders and files a user has actually browsed, cleared 72 hours after last use by default, and file content only while a file is open. It doesn’t keep a placeholder for every file in every library, so it doesn’t grow with the size of your SharePoint estate. CDM works best when that small cache persists between sessions, and it stays usable on fully non-persistent desktops.

OneDrive sync in FSLogix Cloud Drive Mapper
Cache per user 2–7% of everything synced or shortcut Browsed folder and file names, plus open files
Shared SharePoint libraries Cache multiplies with every user Doesn’t grow with library size
Drive letters No (folders in the profile) Yes
300,000-item sync limit Applies Doesn’t apply
Set up Per user, with admin policies Centrally, from Iris

You can run both: OneDrive sync for each user’s own files, and CDM for the shared libraries everyone works from.

Frequently asked questions

Does FSLogix store the OneDrive cache by default?

Yes. Unless you configure it otherwise, the profile container holds the whole profile and the Office data, including the OneDrive cache, in one VHD or VHDX file. In the Office container, the IncludeOneDrive setting controls it, and it defaults to on.

Do I need the Office container (ODFC) for OneDrive?

No. The profile container already includes OneDrive. The Office container is optional, and is mainly used when another tool, such as Citrix Profile Management, handles the rest of the profile.

How big is an FSLogix container by default?

The default maximum is 30,000 MB (about 30 GB), on a dynamic disk that only uses the space it needs, up to that cap. You can change the cap with the SizeInMBs setting.

Can a user have two sessions with OneDrive and FSLogix?

Not reliably. Microsoft says OneDrive doesn’t support multiple concurrent connections using the same profile under any circumstances. By default, a second session gets a temporary profile.

Does OneDrive with FSLogix work on Windows Server 2019 or 2022?

Microsoft’s OneDrive VDI support page lists Windows 11 and Windows Server 2025 or newer for non-persistent desktops that use FSLogix. Windows Server 2019 and 2022 aren’t on that list.

Related solutions

← Back to all solutions

Keep shared libraries out of your profile containers

Map SharePoint and Teams as drive letters on your virtual desktops. Try Cloud Drive Mapper free for 30 days.

Look after Microsoft 365 for your customers? See why MSPs and resellers sell Cloud Drive Mapper →