Page 1 of 2

[Solved] Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 12:59
by Vadi2
Hello!

I've got just one Windows 10 VM on a Ubuntu 17.04 host, and it's going a bit rogue with eating up all available space. How can I size it down?

Virtualbox is also a bit inconsistent in reporting the disk use by missing about a 130Gb:
Selection_011.png
Selection_011.png (55.65 KiB) Viewed 17638 times
I'm running out of space and I've already cleared everything else I can. Any help with this will be appreciated!

Re: Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 14:32
by Perryg
The virtual guest has total control over the container that VirtualBox provides. Any bits other than the guest additions come from the OS and user. Also don't forget about the hidden bits the OS has. This can be rather large.

Re: Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 14:55
by Vadi2
Right. So how do I solve my problem of a phantom 130Gb eating up disk space?

Re: Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 16:01
by Perryg
It is not phantom. You have to account for the base and all snapshots. These are not independent and must be considered as aggregate. But this would effect the host storage and not so much the guest and since you do not really show host drive details, I assumed you were talking about the guest.

Re: Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 16:18
by Vadi2
Right, it is the host that is having the disk space issues (see screenshot). The guest has plenty of space - is it possible to size it down?

Re: Disk space issue - VM eating it all up

Posted: 30. Nov 2017, 16:29
by Perryg
Impossible for anyone but you to tell at this point. So far all we know is you have a guest with snapshots and want to reduce the footprint of the guest. You could clone the guest and merge all of the snapshots so you only have a single file this would make managing it easier, but this is going to take a lot of space and time since it is so large. Then replace the original guest with the clone freeing up the original space used. It might be easier to merge the snapshots first if there is enough space and see if this makes the image size to your liking. Personally I don't use snapshots so all I can tell you is to go slow and be sure you do it right. People have lost the guests by making mistakes with snapshots. As always a good backup is never out of the question.

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 11:52
by Vadi2
I don't use snapshots either:
Selection_014.png
Selection_014.png (31.66 KiB) Viewed 17584 times
How come Virtualbox is using 100+Gb for a snapshot I don't have?

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 12:51
by mpack
You are using either snapshots or linked clones (same thing, files managed in a different way). Since you're only providing information piecemeal you need to do some of this diagnosing yourself. I.e. - go look in the folder and see.

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 12:52
by Vadi2
I'm not using snapshots or linked clones as far as I know. What information are you looking for? I'm happy to provide it - just no information has been asked for!

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 13:00
by socratis
Right click on the VM in VirtualBox Manager » Show in Explorer/Finder/<something>. ZIP and post that .vbox file. If you kept the defaults, the file should be named "Vachon.vbox". Also, post the output of the command:
  • ls -alR /home/vadi/VirtualBox\ VMs

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 13:52
by Vadi2
Here it is!

Code: Select all

$ ls -alRh /home/vadi/VirtualBox\ VMs
/home/vadi/VirtualBox VMs:
total 36K
drwxrwxr-x  3 vadi vadi 4,0K jun  3 14:42 .
drwx------ 89 vadi vadi  24K dec  1 11:56 ..
drwxrwxr-x  4 vadi vadi 4,0K dec  1 12:47 Vachon

/home/vadi/VirtualBox VMs/Vachon:
total 239G
drwxrwxr-x 4 vadi vadi 4,0K dec  1 12:47 .
drwxrwxr-x 3 vadi vadi 4,0K jun  3 14:42 ..
drwx------ 2 vadi vadi 4,0K dec  1 11:53 Logs
drwx------ 2 vadi vadi 4,0K dec  1 12:38 Snapshots
-rw------- 1 vadi vadi 8,3K dec  1 12:39 Vachon.vbox
-rw------- 1 vadi vadi 8,9K dec  1 12:39 Vachon.vbox-prev
-rw-r--r-- 1 vadi vadi 2,4K dec  1 12:47 Vachon.vbox.zip
-rwxrwxrwx 1 vadi vadi 239G dec  1 12:38 Vachon.vhd

/home/vadi/VirtualBox VMs/Vachon/Logs:
total 968K
drwx------ 2 vadi vadi 4,0K dec  1 11:53 .
drwxrwxr-x 4 vadi vadi 4,0K dec  1 12:47 ..
-rw------- 1 vadi vadi 231K dec  1 12:39 VBox.log
-rw------- 1 vadi vadi 230K dec  1 11:51 VBox.log.1
-rw------- 1 vadi vadi 229K dec  1 10:50 VBox.log.2
-rw------- 1 vadi vadi 232K dec  1 10:11 VBox.log.3

/home/vadi/VirtualBox VMs/Vachon/Snapshots:
total 109G
drwx------ 2 vadi vadi 4,0K dec  1 12:38 .
drwxrwxr-x 4 vadi vadi 4,0K dec  1 12:47 ..
-rw------- 1 vadi vadi  78G aug  7 09:51 {015d0b38-1ba4-4329-aa0c-d181e57e9d95}.vhd
-rw------- 1 vadi vadi 729M mrt  9  2017 2017-03-09T16-34-08-601002000Z.sav
-rw------- 1 vadi vadi 1,8G mei 29  2017 2017-05-29T17-14-29-201945000Z.sav
-rw------- 1 vadi vadi 1,5G aug  7 09:14 2017-08-07T07-14-40-974243000Z.sav
-rw------- 1 vadi vadi  28M aug 26 14:54 2017-08-26T12-54-30-021069000Z.sav
-rw------- 1 vadi vadi  28G aug  2 10:29 {28d27b22-7bf9-4a66-a121-331585ba83a9}.vhd

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 18:14
by mpack
So I see two differencing images in VHD format (78GB and 28GB), as mentioned these are either snapshots or linked clones - or they were copied over (by you) from some ancestor VM and forgotten (I see that the last mod date seems to be back in August).

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 18:16
by Vadi2
As I've demonstrated, I have no snapshots. How can I check for "linked clones"? First time I hear such thing.

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 18:18
by mpack
Check the evidence of your eyes. Two VHDs are listed in the snapshots subfolder. Those are snapshots, not fairy cakes.

Re: Disk space issue - VM eating it all up

Posted: 1. Dec 2017, 19:31
by socratis
I don't see any references of the snapshots in the .vbox file. So, shutdown the VM completely (not paused, not saved, complete shut down from within the guest) and then delete all the files from the Snapshots sub-directory. Since I see you have no other VMs as well, that should be safe to do.

Why these ended up there? You must have done something in the past. I see 3 .sav files, which are files that are created when saving the VM state while the VM is running. They're up to 6 months old, so try to dig in your memory and see what you did. It doesn't really matter on the other hand, since you're going to delete them in any event.

Just remember that programs don't develop a mind of their own, they do things as requested by the user. VirtualBox is such a program.