VirtualBox

Opened 10 years ago

Closed 8 years ago

#14041 closed defect (invalid)

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

Reported by: AlexanderN Owned by:
Component: virtual disk Version: VirtualBox 4.3.26
Keywords: Cc:
Guest type: Windows Host type: Linux

Description

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.

Attachments (1)

VirtualBox issue after expanding and compacting .vdi file without starting vm in between.png (200.4 KB ) - added by AlexanderN 10 years ago.
VirtualBox issue after expanding and compacting .vdi file without starting vm in between

Download all attachments as: .zip

Change History (3)

by AlexanderN, 10 years ago

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

comment:1 by Frank Mehnert, 9 years ago

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 by aeichner, 8 years ago

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.

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