About 13,600 results
Open links in new tab
  1. Powershell Resize-VHD is not recognized as the name of a cmdlet

    Mar 24, 2018 · PS> Resize-VHD -Path "C:\Container.vhd" -SizeBytes 20GB Error: Resize-VHD : The term 'Resize-VHD' is not recognized as the name of a cmdlet, function, script file, or operable …

  2. How do I get back unused disk space from Ubuntu on WSL2?

    Nov 30, 2020 · This is required to activate optimize-vhd command. Open windows powershell as admin: First, press Windows+R to open Run, and then type “powershell” in the text box.

  3. Optimize .vhdx WSL2 Distro File for Docker Desktop v4.37.x on …

    Jan 15, 2025 · Unfortunately .vhdx files are always growing. In the past I used to solve this issue by running the following sequence of commands: wsl --manage docker-desktop-data --set-sparse false …

  4. Reclaim WSL2 disk space after setting it to sparse - Super User

    Jan 29, 2024 · 17 You can revert the sparse mode, run the optimize-vhd command, and then set it back to sparse. something along this lines. not sure what's the implication of this, at least it works in my …

  5. powershell - Getting an access denied trying to Optimize-VHD a VHDX ...

    Apr 1, 2025 · I use WSL in Windows 11. I dont use Docker Desktop, only docker service in WSL I created a powershell script for reduce VHDX size running the following commands: wsl --shutdown …

  6. Optimize .vhdx WSL2 Distro File for Docker Desktop v4.37.x on …

    Unfortunately .vhdx files are always growing. In the past I used the following commands to compress vhdx files: wsl --manage docker-desktop-data --set-sparse false optimize-vhd -Path C:\Users\<u...

  7. windows - How to properly compact Hyper-V dynamic sized ... - Super …

    Oct 11, 2019 · compact the VHDX with Optimize-VHD '.\ubuntu 18.04 lts.vhdx' -Mode Full unmount the VHDX with Dismount-VHD '.\ubuntu 18.04 lts.vhdx' It sorta works as the size of the VHDX was …

  8. windows subsystem for linux - Wsl distro occupying too much space ...

    Jun 9, 2023 · I think this happens because windows allocates some space to the disk image of wsl. Even after clearing deleting the files, the disk space remains occupied as it has been allocated to the …

  9. wsl2 - Reclaim space of pruned images docker WSL - Super User

    Aug 21, 2023 · deleted: sha256:somehash ... Total reclaimed space: 0B I've tried several solutions from this question: Docker desktop restart. Does nothing. Shrinking the ext4.vhdx file with diskpart and …

  10. linux - WSL Virtual Hard Disk not reclaiming space - Super User

    Nov 7, 2022 · I attempted to use Optimize-VHD to reclaim space but none of the provided modes worked. I attempted to use DISKPART to compact the virtual disk, which gave me only ~20MB of …