I got an alert that I was running out of disk space (less than 1GB available), but the Virtual Machine reports I have ~21 GB of unused space on the disk:
After a few weeks of regular backups I’m again getting the alert that I’m running out of disk space. VirtualBox reports a Virtual Size of the disk as 32 GB, but Actual Size of ~11 GB:
My understanding is the disk should expand as necessary (up to the 32 GB max), but this doesn’t seem to be working as I keep getting warnings that I’m running out of disk space.
I’d be happy to just make the Actual Size the full Virtual Size (I have plenty of disk space on this machine), but I have no idea how to do that either.
Enables the auto-discard feature for a virtual hard disks. This specifies that a VDI image will be shrunk in response to the trim command from the guest OS.
The problem seems to be that virtual disk won’t expand when needed? I’m happy to have VirtualBox take the full allocated size for that disk (32 GB) so Home Assistant has plenty of disk space. But keep in mind I know nothing about this stuff. But I just ran that command you suggested to apply the --discard option to the VDI (seems like a good thing to have on regardless).
I just checked the size of the virtual disk in VirtualBox and it’s the same value as back in March (11.01 GB), which seems oddly similar if it’s supposed to be expanding and contracting. And Home Assistant says 91.2% of the disk space is being used. I got another notification recently that I was running out of disk space and had to manually delete some backups, so whatever is happening seems to have persisted.
I tried increasing the size of the virtual disk via the VBoxManage modifymedium command, as detailed here, but Home Assistant still shows 91.2% of disk space used.
Hmm… really odd. What version of VirtualBox are you running ?
I’m using the windows version and the only difference I can see is in the type of storage you’ve enabled. This is my storage screenshot:
I’m running VirtualBox 7.0.10, on a Mac (just updated to 7.0.10, but generally keep it fairly up to date).
Yeah, I’m not entirely sure what “differencing storage” is either.
The other thing I’ve noticed while poking around with this is that my HD controller is IDE, whereas yours (and a lot of examples I’m seeing) are SATA. According to this SATA is basically newer and better. Not sure if this matters here, but it’s one of the only things I can see that is different.
What does your HA install say you have when you go to system → storage ? Whats the used and total ?
It just says Used Space: 90.9% – doesn’t show me a total:
But Home Assistant doesn’t seem to see that extra space… I doubled the size of the disk and Home Assistant still says it’s using ~91% of available space.
At this point my best bet might be to create a new SATA disk in VirtualBox, install HAOS fresh and restore my current Home Assistant to that from a backup.
I tried creating a new SATA disk controller and attaching the existing .vdi to that instead of the IDE one. Home Assistant stopped automatically booting – trying to start the VM brought up a UEFI shell.
I rolled that back and tried creating an entirely new SATA controller that I installed a fresh copy of HAOS on to, then I did a restore of a recent Home Assistant backup (which took forever and had no indication of if it was still progressing or not). Again, it wouldn’t auto-boot.
Finally ended up creating a new VM in VirtualBox with the same settings – it created a SATA controller automatically this time – and used the existing .vdi for the new VM.
My suggestion: if you’re having a similar issue with an IDE disk controller than won’t expand, try creating a new VM in VirtualBox with similar settings, making sure the new VM is using a SATA controller for the hard drive, and select your existing .vdi file when you set up the new VM.