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

This is for discussing general topics about how to use VirtualBox.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

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

Post 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 16696 times
I'm running out of space and I've already cleared everything else I can. Any help with this will be appreciated!
Last edited by socratis on 4. Dec 2017, 14:43, edited 1 time in total.
Reason: Marked as [Solved].
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Disk space issue - VM eating it all up

Post 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.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post by Vadi2 »

Right. So how do I solve my problem of a phantom 130Gb eating up disk space?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Disk space issue - VM eating it all up

Post 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.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Disk space issue - VM eating it all up

Post 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.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post by Vadi2 »

I don't use snapshots either:
Selection_014.png
Selection_014.png (31.66 KiB) Viewed 16642 times
How come Virtualbox is using 100+Gb for a snapshot I don't have?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk space issue - VM eating it all up

Post 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.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post 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!
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Disk space issue - VM eating it all up

Post 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
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post 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
Attachments
Vachon.vbox.zip
(2.31 KiB) Downloaded 35 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk space issue - VM eating it all up

Post 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).
Vadi2
Posts: 28
Joined: 4. Aug 2014, 22:30

Re: Disk space issue - VM eating it all up

Post by Vadi2 »

As I've demonstrated, I have no snapshots. How can I check for "linked clones"? First time I hear such thing.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk space issue - VM eating it all up

Post by mpack »

Check the evidence of your eyes. Two VHDs are listed in the snapshots subfolder. Those are snapshots, not fairy cakes.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Disk space issue - VM eating it all up

Post 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.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply