F5F Stay Refreshed Hardware Desktop Extending VirtualBox HDD size issues (no free space)

Extending VirtualBox HDD size issues (no free space)

Extending VirtualBox HDD size issues (no free space)

D
Dana1211
Member
184
04-16-2025, 09:09 PM
#1
Hello everyone, I tried increasing the HDD size in VirtualBox and everything worked fine until now. After finishing the task, the VHD file size matched the new partition size. When I started the VM and checked disk management, there was no free space left for more expansion. Even using gparted at boot didn’t help. Later, I ran a command line to compact the VHD again, but encountered an error: VBoxManage.exe: error: Could not compact medium 'F:\VirtualBox\xxxx' (VERR_INVALID_STATE). The issue also appears when trying to extend the size via the command prompt, and I don’t have any backups. Anyone else faced this problem or know a solution? Thanks!
D
Dana1211
04-16-2025, 09:09 PM #1

Hello everyone, I tried increasing the HDD size in VirtualBox and everything worked fine until now. After finishing the task, the VHD file size matched the new partition size. When I started the VM and checked disk management, there was no free space left for more expansion. Even using gparted at boot didn’t help. Later, I ran a command line to compact the VHD again, but encountered an error: VBoxManage.exe: error: Could not compact medium 'F:\VirtualBox\xxxx' (VERR_INVALID_STATE). The issue also appears when trying to extend the size via the command prompt, and I don’t have any backups. Anyone else faced this problem or know a solution? Thanks!

C
chimpchop123
Member
59
04-17-2025, 02:20 AM
#2
I created a copy of the VM and the new version was functioning properly.
C
chimpchop123
04-17-2025, 02:20 AM #2

I created a copy of the VM and the new version was functioning properly.