0

I've just installed a fresh Kali version on Oracle Virtual Box. To do so, I created a VM with 250Gb disk space, then ran the .iso : hence, the .vdi file size is 250Gb. But when logged in, when I try - let's say - to unrar a file, the system claims that I don't have enough free space.

I checked in Virtual Box interface, and my actual and virtual sizes are almost the same : 250 Gb.

Besides, gparted shows a 250Gb allocated space (almost no free space). enter image description here

Here you can see the result of lsblk.

enter image description here

And here you can see df -h result.

213Gb seem to be available (however, they are not shown in gparted !!)

During the Kali installation, I chose the disk encryption option (and the installer took a long time to write arbitrary bytes to prevent meta data leaks). But I remember having done this before, without having the problem I'm experiencing right now.

How can I get my space back ?

Any help appreciated !

2
  • shrinking a machine on Virtual Box is a mess...you have to fill free space with 0 and so on...
    – Fafanellu
    Commented Oct 14, 2023 at 13:07
  • I assigned 250Gb space knowing that the VM is on a 1Tb HDD, with 500Gb free. Thanks I'll try this out, though that doesn't explain how to get the df -h 213Gb back ...
    – Fafanellu
    Commented Oct 14, 2023 at 13:10

1 Answer 1

0

The best explanation here is that your virtualizer (Virtual Box) created a sparse file of 250 GB of size, which only actually occupies the space that's actually been touched by data.

Now, your system actually tries to modify data, and because your host (not the guest) has run out of space on the volume that you store the disk image on has run out of free space, file operations fail.

11
  • Maybe, but why df -h shows available space ? I thought my problem came because of some kind of LUKS mechanism that shows my drive as full when I call gparted
    – Fafanellu
    Commented Oct 14, 2023 at 13:31
  • again, different levels. The VM has no idea of whether the virtualizer has space to write. That has, intentionally, been abstracted away. Commented Oct 14, 2023 at 13:35
  • ok I see what you mean. But what bothers me is that Kali shows 2 different things. I mean, it's aware of this amount of free space. When I click on properties for any file, I get : 30.9 GiB used (13%), 212.6 GiB free (87%).
    – Fafanellu
    Commented Oct 14, 2023 at 13:46
  • again, no, Kali is not aware. To kali, the file on your host operating system looks like a disk that it can use just as if it was an actual disk. (please don't make me repeat this another time.) Commented Oct 14, 2023 at 13:49
  • @john that won't work with encryption, as the virtualizer intentionally can't see "inside" to see what blocks are all zero. Commented Oct 14, 2023 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .