Skip to content

Commit 79222db

Browse files
Fix Dev Drive docs: VHD copy explanation, WSL metadata note, NuGet recommendation, backup FAQ
- #5357: Expand VHD copy warning with explanation (per-machine trust/filter policies) - #4680: Add WSL metadata mount limitation note (ReFS doesn't support xattrs) - #5236: Reorder NuGet options to recommend nuget.config over NUGET_PACKAGES env var - #4723: Add new FAQ entry on how to back up a Dev Drive Co-authored-by: Copilot <[email protected]>
1 parent da58add commit 79222db

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

hub/dev-drive/index.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ A package cache is the global folder location used by applications to store file
141141

142142
- **NuGet global-packages folder**: The NuGet global-packages folder is used by dotnet, MSBuild, and Visual Studio. Create a user specific NuGet directory in your CopyOnWrite (CoW) filesystem. For example: `D:\<username>\.nuget\packages`. Use one of the following ways to change the global-packages folder from the default location to your newly created folder (to manage the globally installed packages):
143143

144-
- Set a global environment variable `NUGET_PACKAGES` to that path. For example: `setx /M NUGET_PACKAGES D:\<username>\.nuget\packages`.
145-
- Set `globalPackagesFolder`, when using `PackageReference`, or `repositoryPath`, when using `packages.config`, to that path in configuration settings.
144+
- Set `globalPackagesFolder`, when using `PackageReference`, or `repositoryPath`, when using `packages.config`, to that path in a [NuGet configuration file](/nuget/consume-packages/configuring-nuget-behavior). This is the recommended approach because the setting is scoped to the configuration file and won't override repository-specific settings the way an environment variable would.
146145
- Set the `RestorePackagesPath` MSBuild property (MSBuild only) to that path.
146+
- Set a global environment variable `NUGET_PACKAGES` to that path. For example: `setx /M NUGET_PACKAGES D:\<username>\.nuget\packages`. Note: this environment variable overrides any `globalPackagesFolder` setting in NuGet configuration files, including repository-specific settings.
147147

148148
To verify the global-packages folder, run the dotnet nuget locals command: `dotnet nuget locals global-packages --list`. The restore will install and download packages into the new path. The default NuGet global-packages folder can be deleted. Learn more in the [NuGet docs: Managing the global packages, cache, and temp folders](/nuget/consume-packages/managing-the-global-packages-and-cache-folders).
149149

@@ -310,7 +310,7 @@ Beginning in Windows 11 24H2 & Windows Server 2025, Block cloning is now support
310310
There are a few scenarios in which we do not recommend using a Dev Drive. These include:
311311

312312
- Reformatting an existing storage volume to be a "Dev Drive" will destroy any content stored in that volume. Reformatting an existing volume while preserving the content stored there is not supported.
313-
- When you create a Virtual Hard Disk (VHD) hosted on a fixed disk (HDD or SSD), it is not recommended to copy the VHD, move it to a different machine, and then continue using it as a Dev Drive.
313+
- When you create a Virtual Hard Disk (VHD) hosted on a fixed disk (HDD or SSD), it is not recommended to copy the VHD, move it to a different machine, and then continue using it as a Dev Drive. The Dev Drive designation (including trust status and filter policies) is stored per-machine and does not transfer with the VHD file. If you move a VHD to a new machine, you will need to re-mount it and [re-designate it as a Dev Drive](#create-dev-drive-using-existing-virtual-hard-disk-vhd-or-vhdx) and reconfigure any custom filter policies.
314314
- A volume stored on a removable or hot-pluggable disk (such as a USB, HDD, or SSD external drive) does not support designation as a Dev Drive.
315315
- A volume in a VHD hosted by a removable or hot-pluggable disk does not support designation as a Dev Drive.
316316
- The C: drive on your machine cannot be designated as a Dev Drive.
@@ -366,6 +366,9 @@ For more information, see the blog post: [Dev Drive for Performance Improvements
366366

367367
You can access Dev Drive project files, which run on the Windows file system, from a Linux distribution running via WSL. However, WSL runs in a VHD and for the best performance files should be stored on the Linux file system. WSL is out of the scope of Windows file system so you should not expect to see any performance improvement when accessing project files in Dev Drive from a Linux distribution running via WSL.
368368

369+
> [!NOTE]
370+
> The WSL `metadata` mount option, which uses extended attributes to store Linux file permissions and ownership on Windows-hosted files, is not supported on ReFS volumes (the filesystem used by Dev Drive). If your workflow depends on preserving Linux file permissions for files stored on the Windows filesystem, store those files on an NTFS volume or within the WSL virtual disk instead.
371+
369372
### What method is used to format a Windows storage volume?
370373

371374
See [`MSFT_Volume class`](/windows-hardware/drivers/storage/format-msft-volume) in the Windows Driver docs.
@@ -382,6 +385,16 @@ fsutil devdrv setfiltersallowed PrjFlt
382385

383386
Yes, the Dev Drive VHD will be included in the BitLocker encryption of the hosting volume. It is not necessary to enable BitLocker on the mounted VHD.
384387

388+
### How do I back up a Dev Drive?
389+
390+
The best backup approach depends on how your Dev Drive is set up:
391+
392+
- **VHD-based Dev Drive**: The VHD file (`.vhd` or `.vhdx`) can be backed up like any regular file. Copy it to an external drive, network share, or cloud storage. Note that the Dev Drive designation and filter policies are per-machine and won't transfer automatically — if you restore to a new machine, you'll need to [re-mount the VHD and re-designate it as a Dev Drive](#create-dev-drive-using-existing-virtual-hard-disk-vhd-or-vhdx).
393+
394+
- **Partition-based Dev Drive**: Use standard Windows backup tools such as [File History](https://support.microsoft.com/windows/back-up-your-windows-pc-87a81f8a-78fa-456e-b521-ac0560e32338) or [robocopy](/windows-server/administration/windows-commands/robocopy) to back up the contents. Cloud sync tools (OneDrive, etc.) can also back up individual files, though they may not preserve all Dev Drive-specific settings.
395+
396+
In both cases, the package caches stored on Dev Drive (npm, NuGet, pip, etc.) can typically be regenerated and do not need to be included in backups.
397+
385398
### Can Dev Drive make Java development faster on Windows?
386399

387400
Yes, using a Dev Drive can enhance efficiency and reduce build times when working on a Java development project. See the blog post ["Speed up your Java Development on Windows with Dev Drive"](https://devblogs.microsoft.com/java/speed-up-your-java-development-on-windows-with-microsoft-dev-drive/).

0 commit comments

Comments
 (0)