Author Topic: Disk space occupation of an OS in virtualbox..[Solved]  (Read 1440 times)

Offline OleWilly

  • Hero Member
  • *****
  • Posts: 911
  • Nothing endures but change.
Disk space occupation of an OS in virtualbox..[Solved]
« on: June 21, 2012, 01:37:34 AM »
Hi

Will an OS installed in a virtualbox occupy as much disk space as it would in an ordinary install  ???

OW  :)
« Last Edit: July 03, 2012, 04:10:35 PM by OleWilly »
Avoid the Gates of Hell. Use Linux.

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: Disk space occupation of an OS in virtualbox..
« Reply #1 on: June 21, 2012, 03:22:23 AM »
I would expect so ......  or close enough
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15304
  • ┌∩┐(◕_◕)┌∩┐
Re: Disk space occupation of an OS in virtualbox..
« Reply #2 on: June 21, 2012, 04:10:20 AM »
Mebbe useful - I just did a fresh Virtualbox install of KDE 4.8.3 Test5, fully updated and with Guest Additions installed, the VDI hard drive came to 3GB
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Online Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10649
  • MLUs Forever!
Re: Disk space occupation of an OS in virtualbox..
« Reply #3 on: June 21, 2012, 06:23:25 AM »
Mebbe useful - I just did a fresh Virtualbox install of KDE 4.8.3 Test5, fully updated and with Guest Additions installed, the VDI hard drive came to 3GB

.....  and what space does it use on a physical HDD? .....  about the same?

I have an install with added apps etc and it is 3.9GB on physical HDD.
« Last Edit: June 21, 2012, 06:25:49 AM by Just18 »
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online pags

  • Hero Member
  • *****
  • Posts: 2518
  • Keep it clean.
Re: Disk space occupation of an OS in virtualbox..
« Reply #4 on: June 21, 2012, 09:00:28 AM »
Assuming a Dynamically allocated VDI (virtual hard disk), since a staticly allocated VDI will consume as much space as is allocated to the drive (not stored on it), the storage requirements will be close to the data inside the VM, with the caveat that if you do a lot of deleting inside the VM, the host requirements will increase (that space isn't automatically freed).

You can "compact" the VDI back down, but it is a multi-step process (that may vary, depending on the guest OS).
1) In the guest, you need to "zero" all the empty space (because deleted files are still there, just flagged as "empty").  You might want to "defrag" first, if running Windows.
2) (might not be required, i.e., in Windows, depending on the tool used to "zero" the space.) Remove the "zeroes" space, so it is treated as empty, again.
3) Shut down the VM
4) Compact the VDI from the host.  Something like:
Code: [Select]
VBoxManage modifyhd /path/to/virtual/guest/harddive.vdi --compact

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15304
  • ┌∩┐(◕_◕)┌∩┐
Re: Disk space occupation of an OS in virtualbox..
« Reply #5 on: June 21, 2012, 12:16:30 PM »
Quote
.....  and what space does it use on a physical HDD? .....  about the same?

That is the HDD space

I setup the Virtual HDD as 12GB pre-install and post install the 3GB is space used on host system.

on a side note - VirtualBox 4.1.18 has been released!

Changelog

This is a maintenance release. The following items were fixed and/or added:

    VMM: fixed VERR_REM_VIRTUAL_CPU_ERROR under rare conditions after the guest has been reset (bug #5164 and others)

    VMM: fixed host freezes with 64-bit guests on 32-bit Linux hosts (bug #10528)

    VRDP: added a workaround for rdesktop clients not properly updating the screen size when minimized

    AHCI: fixed a rare bug which can cause a guest memory corruption after the guest storage controler has been reset

    NAT: another attempt to fix crashes under rare conditions (Windows hosts only; bug #10513)

    Mac OS X hosts: addressed issues running Leopard / Snow Leopard (bug #10631)

    Linux hosts / Bridged Networking: fixed the problem with device driver unloading on kernels
3.2.18 and newer due to an invalid reference counter (bug #10624)


    Linux hosts / guests: Linux 3.5-rc1 fixes

    Linux Additions: the guest content was sometimes not properly updated (bug #9887)

    Solaris Additions: installer fix for X.org Server 1.11 and 1.12
« Last Edit: June 21, 2012, 12:33:03 PM by menotu »
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline OleWilly

  • Hero Member
  • *****
  • Posts: 911
  • Nothing endures but change.
Re: Disk space occupation of an OS in virtualbox..
« Reply #6 on: July 03, 2012, 12:26:25 PM »
Hi

Thanks a lot for the enlightenment  ;)

OW  :)
Avoid the Gates of Hell. Use Linux.