#14041 closed defect (invalid)
VirtualBox issue after expanding and compacting .vdi file without starting vm in between
回報者: | AlexanderN | 負責人: | |
---|---|---|---|
元件: | virtual disk | 版本: | VirtualBox 4.3.26 |
關鍵字: | 副本: | ||
Guest type: | Windows | Host type: | Linux |
描述
I used Usiung VBoxManager modifyhd <file> --resize to expand a vd image and mistakenly resized at to size which couldn't handled by the disk the file is stored on. So I decided to compact the file without starting the vm (Windows 2008 R2 Server). After compacting the Disk Manager shows me and end size of nearly one TB and a used size of ~24GB. Windows itself says the disk is at the same size ~50GB as before.
I wanted to have 100 GB for the VDI and either cannot compact it nor resize tp it desired size.
附加檔案 (1)
更動歷史 (3)
10 年 前 由 編輯
comment:1 10 年 前 由 編輯
Sorry, I don't see the problem. What is the size you actually set your VDI? Is that ~1005GB? The disk manager shows the final size of the disk as 1005,86 GB. Currently there are 22,34GB used. Windows shows 49,90 GB - 7,63 GB = 42,27 GB of allocated disk space. I'm not 100% sure but I think it's possible that after you compacted the disk, some space is freed from the virtual disk because this space contains only zeros. Windows will still report this space as allocated. Once Windows would alter at least one bit of such a section, the complete unit (1 MB with VDI) is allocated and the current disk size in the disk manager will increase but the size of this unit.
comment:2 8 年 前 由 編輯
狀態: | new → closed |
---|---|
處理結果: | → invalid |
Not a bug, compacting an image doesn't change the virtual size but as Frank pointed searches for blocks containing only 0s and frees them on the host. There is currently no way to decrease the reported size of a disk image but as long as you don't change the size of the partitions in the guest the disk image will not grow.
VirtualBox issue after expanding and compacting .vdi file without starting vm in between