{"action":"created","issue":{"url":"https://api.github.com/repos/docker/for-win/issues/244","repository_url":"https://api.github.com/repos/docker/for-win","labels_url":"https://api.github.com/repos/docker/for-win/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/docker/for-win/issues/244/comments","events_url":"https://api.github.com/repos/docker/for-win/issues/244/events","html_url":"https://github.com/docker/for-win/issues/244","id":190605787,"number":244,"title":"Windows 10: Docker does not release disk space after deleting all images and containers","user":{"login":"aludin","id":435675,"avatar_url":"https://avatars2.githubusercontent.com/u/435675?v=4","gravatar_id":"","url":"https://api.github.com/users/aludin","html_url":"https://github.com/aludin","followers_url":"https://api.github.com/users/aludin/followers","following_url":"https://api.github.com/users/aludin/following{/other_user}","gists_url":"https://api.github.com/users/aludin/gists{/gist_id}","starred_url":"https://api.github.com/users/aludin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aludin/subscriptions","organizations_url":"https://api.github.com/users/aludin/orgs","repos_url":"https://api.github.com/users/aludin/repos","events_url":"https://api.github.com/users/aludin/events{/privacy}","received_events_url":"https://api.github.com/users/aludin/received_events","type":"User","site_admin":false},"labels":[{"id":415755392,"url":"https://api.github.com/repos/docker/for-win/labels/area/storage","name":"area/storage","color":"fbca04","default":false},{"id":415756438,"url":"https://api.github.com/repos/docker/for-win/labels/kind/feature","name":"kind/feature","color":"aab3ab","default":false},{"id":463834664,"url":"https://api.github.com/repos/docker/for-win/labels/status/4-fix-released-beta","name":"status/4-fix-released-beta","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":45,"created_at":"2016-11-21T02:40:52Z","updated_at":"2018-03-21T10:21:20Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nIf you are reporting a new issue, make sure that we do not have any duplicates\r\nalready open. You can ensure this by searching the issue list for this\r\nrepository. If there is a duplicate, please close your issue and add a comment\r\nto the existing issue instead.\r\n\r\nIf you suspect your issue is a bug, please edit your issue description to\r\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\r\ninformation within 7 days, we cannot debug your issue and will close it. We\r\nwill, however, reopen it if you later provide the information.\r\n\r\nFor more information about reporting issues, see\r\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues\r\n\r\n---------------------------------------------------\r\nGENERAL SUPPORT INFORMATION\r\n---------------------------------------------------\r\n\r\nThe GitHub issue tracker is for bug reports and feature requests.\r\nGeneral support can be found at the following locations:\r\n\r\n- Docker Support Forums - https://forums.docker.com\r\n- IRC - irc.freenode.net #docker channel\r\n- Post a question on StackOverflow, using the Docker tag\r\n\r\n---------------------------------------------------\r\nBUG REPORT INFORMATION\r\n---------------------------------------------------\r\nUse the commands below to provide key information from your environment:\r\nYou do NOT have to include this information if this is a FEATURE REQUEST\r\n-->\r\n\r\n**Description**\r\nWhen running  docker images using Windows 10 professional, the docker virtual disk MobiLinuxVM.vhdx keeps on growing. After having finished with the images/container, and deleting them all, the virtual disk does not shrink in size. Expected behavior: MobiLinuxVM.vhdx should shrink and release the unused space.\r\n\r\n**Steps to reproduce the issue:**\r\n\r\n1. Run various containers and observe that MobiLinux grows (once a container was running, I added my own software, which amounted to about 20GB).\r\n2. Deleted all containers & images using: `docker rm $(docker ps -a -q)` and `docker rmi $(docker images -q)`. \r\n\r\n**Describe the results you received:**\r\nMobiLinuxVM.vhdx still 40+GB in size\r\n\r\n**Describe the results you expected:**\r\n MobiLinuxVM.vhdx should have \"shrunk\" to its original size when initially installing Docker on my Windows 10 box. \r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n**Output of `docker version`:**\r\n```\r\nClient:\r\n Version:      1.12.3\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   6b644ec\r\n Built:        Wed Oct 26 23:26:11 2016\r\n OS/Arch:      windows/amd64\r\n\r\nServer:\r\n Version:      1.12.3\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   6b644ec\r\n Built:        Wed Oct 26 23:26:11 2016\r\n OS/Arch:      linux/amd64\r\n\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 0\r\n Running: 0\r\n Paused: 0\r\n Stopped: 0\r\nImages: 0\r\nServer Version: 1.12.3\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 0\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: null host bridge overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: seccomp\r\nKernel Version: 4.4.27-moby\r\nOperating System: Alpine Linux v3.4\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 1.919 GiB\r\nName: moby\r\nID: IWNC:POO5:TSO4:GIAK:MLHK:C46G:DRJF:IWBM:YSRO:COUL:6TKR:M2ZC\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 12\r\n Goroutines: 22\r\n System Time: 2016-11-20T17:06:20.2301916Z\r\n EventsListeners: 0\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No kernel memory limit support\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nWindows 10 professional. Docker latest install using Hyper-V."},"comment":{"url":"https://api.github.com/repos/docker/for-win/issues/comments/374890486","html_url":"https://github.com/docker/for-win/issues/244#issuecomment-374890486","issue_url":"https://api.github.com/repos/docker/for-win/issues/244","id":374890486,"user":{"login":"marcoreni","id":2797489,"avatar_url":"https://avatars2.githubusercontent.com/u/2797489?v=4","gravatar_id":"","url":"https://api.github.com/users/marcoreni","html_url":"https://github.com/marcoreni","followers_url":"https://api.github.com/users/marcoreni/followers","following_url":"https://api.github.com/users/marcoreni/following{/other_user}","gists_url":"https://api.github.com/users/marcoreni/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoreni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoreni/subscriptions","organizations_url":"https://api.github.com/users/marcoreni/orgs","repos_url":"https://api.github.com/users/marcoreni/repos","events_url":"https://api.github.com/users/marcoreni/events{/privacy}","received_events_url":"https://api.github.com/users/marcoreni/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T10:21:20Z","updated_at":"2018-03-21T10:21:20Z","author_association":"NONE","body":"@krzysztofantczak good find!\r\n\r\nI tried converting my VHDX with a blockSize of 1MB using this Powershell Command (Docker not running):\r\n\r\n`Convert-VHD -Path '.\\MobyLinuxVM.vhdx' -DestinationPath '.\\NewMobyLinuxVM.vhdx' -BlockSizeBytes 1MB`\r\n\r\nSadly, I recovered only about 4GB of space: the VHDX file still occupies 34GB while internally only 15.3GB are occupied (according to `df -h` inside `gbraad/hostenter`).\r\n\r\nI'm wondering: maybe the MobyLinuxVM contains more than what is shown inside `hostenter`?\r\n\r\n```\r\n$ Get-VHD -Path .\\NewMobyLinuxVM.vhdx\r\n\r\nVhdFormat               : VHDX\r\nVhdType                 : Dynamic\r\nFileSize                : 35554066432\r\nSize                    : 64424509440\r\nMinimumSize             : 64424509440\r\nLogicalSectorSize       : 512\r\nPhysicalSectorSize      : 4096\r\nBlockSize               : 1048576\r\nParentPath              :\r\nDiskIdentifier          : D02D151E-566C-473F-BD74-F92996380585\r\nFragmentationPercentage : 0\r\nAlignment               : 1\r\nAttached                : False\r\nDiskNumber              :\r\nIsPMEMCompatible        : False\r\nAddressAbstractionType  : None\r\nNumber                  :\r\n```\r\n```\r\n$ Get-VHD -Path .\\MobyLinuxVM.vhdx\r\n\r\nVhdFormat               : VHDX\r\nVhdType                 : Dynamic\r\nFileSize                : 39095107584\r\nSize                    : 64424509440\r\nMinimumSize             : 64424509440\r\nLogicalSectorSize       : 512\r\nPhysicalSectorSize      : 4096\r\nBlockSize               : 33554432\r\nParentPath              :\r\nDiskIdentifier          : D02D151E-566C-473F-BD74-F92996380585\r\nFragmentationPercentage : 14\r\nAlignment               : 1\r\nAttached                : False\r\nDiskNumber              :\r\nIsPMEMCompatible        : False\r\nAddressAbstractionType  : None\r\nNumber                  :\r\n```\r\n\r\n```\r\n/ # df -h\r\n[...]\r\n/dev/sda1                58.8G     15.3G     40.5G  27% /var/lib/docker\r\n```\r\n"}}
{"actor":{"display_login":"marcoreni"}}