VirtualBox

10 年 前 建立

8 年 前 結束

#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)

VirtualBox issue after expanding and compacting .vdi file without starting vm in between.png (200.4 KB ) - 10 年 前, 由 AlexanderN 新增
VirtualBox issue after expanding and compacting .vdi file without starting vm in between

下載所有附檔: .zip

更動歷史 (3)

10 年 前AlexanderN 編輯

VirtualBox issue after expanding and compacting .vdi file without starting vm in between

comment:1 10 年 前Frank Mehnert 編輯

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 年 前aeichner 編輯

狀態: newclosed
處理結果: 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.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette