0

In my PC, running on Ubuntu 14.04, the hard disk is divided into several partitions, and although there is vacant space in each of them there is only a paltry 8.7 MB unpartitioned space left.

But recently, after installing the Virtual Box when I attempted to install Windows XP in it, I was offered a 10 GB space for formatting and installing the new OS. Now can anyone tell me where exactly this 10 GB space is being taken from and, more importantly, whether this threatens my data in the various partitions?

6
  • How much space do you have in your home directory? (or wherever you created the associated disk for that VM)
    – muru
    Feb 2, 2016 at 10:41
  • @muru. My home directory is of 9.6 GB.
    – user255726
    Feb 2, 2016 at 10:46
  • 1
    Then it's likely that when Windows XP actually gets around to using 10 GB, your home directory will be filled up. Look in the VM settings to see where you have actually stored the virtual disk, and move it to a partition with more than 10 Gb free.
    – muru
    Feb 2, 2016 at 10:47
  • @muru. I can't figure out where it's stored. Settings>General>Advanced>Snapshot Folder shows: /home/subrata[my name]/VirtualBox VMs/Test/Snapshots. Is it there? The adjacent lowdown gives options of "other" and "reset". Should these be used? Alternatively perhaps I could shrink some of the partitions so as to increase the unpartitioned space and then use THAT space at the time of installing the Windows? My overriding concern is, naturally, not to risk the existing data. So which would be the safe way?
    – user255726
    Feb 2, 2016 at 11:20
  • Try: Settings>Storage, image listed below SATA, and look for Location in the Information pane.
    – muru
    Feb 2, 2016 at 11:21

2 Answers 2

3

The virtual machine definition itself will occupy little space. The thing that will occupy space is the virtual disk where the client OS will be installed, as long as the possible snapshots you'll take1.

Normally the disks are installed in a directory called VirtualBox VMs under your home; so it will by default occupy space in your home partition. Native Virtualbox virtual disks are dinamical; they will grow till occupying the allocated space (10G in your case) when the guest OS will use the space.

To check where you have yor disks, open "settings":

enter image description here

...as you see, I have mine in another partition --- namely one mounted on /home/vbox. To create the virtual disk (VDI) in a non standard place, you simply select the directory where to put it on creation (you can move it later too, in a lot of way, the most easy being to move the containing directory and put a symlink in its place).

choosing the VDI location

The VDI is a file as much as Linux is concerned, so you cannot put it in an unallocated space on disk2, so you have to partition, format and mount your unallocated space beforehand.


Footnotes:

1 and it will grow up, but it will not grow down --- this is much more complex. In my experience, 10G is far too little for a Windows installation --- especially if you plan to put Office on it.

2 well, you probably can. But it's not a standard way to do it.

1
  • Yours is in home, right? What do I do to shift it to a new unpartitioned space or partition of adequate size specially created for this purpose? Do I do it during choosing the Settings of the VM or can I do it during installing the new OS?
    – user255726
    Feb 2, 2016 at 12:03
2

there is only a paltry 8.7 MB unpartitioned space left.

Not important.

Now can anyone tell me where exactly this 10 GB space is being taken from and, more importantly, whether this threatens my data in the various partitions?

From the partition you installed the virtual machine. The VM makes a file on your system and treats that as a filesytem where you can install an operating system into.

I was offered a 10 GB space for formatting and installing the new OS

You where also asked WHERE to create the VM. It will probably default to your home (ie. something like /home/$USER/Virtual Box/Windows XP).

2
  • I want to move my VM and everything related to it safely away from all existing partitions. For this I can shrink my existing partitions and create an adequate unpartitoned space and also a new partition. The question is : after doing that, should I assign this location for the VM & new OS while choosing the Settings of the VirtualBox , or can I do it during installing the new OS?
    – user255726
    Feb 2, 2016 at 11:54
  • I would pick the 2nd, Create a big /data/ partition for all your VMs.
    – Rinzwind
    Feb 2, 2016 at 12:26

You must log in to answer this question.

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