Formatting a disk in VirtualBox

I'm using VirtualBox to install a Linux distro. I used gparted to set up a partition table and formatted it as EXT3. However, this is on my FreeBSD box that uses GPT, so now I'm wondering what happens to that formatted space when I uninstall that distro. Off the top of my head I'm guessing that it's not really formatted as EXT3, but can someone set me straight, please?
 
I suspect that VirtualBox is using its own internal format for the file that holds the disk (see here). I guess the file is used as a loopback on which EXT3 really formats the content, so you can mount the disk with some tools (e.g., ImDisk, Qemu) and access the EXT3 filesystem.

However, I've not tried it myself.
 
Are you using raw disks for storage on the virtual machines or just the normal .vdi files as "virtual disks"? If you use raw disks you should never see a difference on the disk(s) when comparing the results of using them from VirtualBox or having the same OS using the hardware without the virtualization. If using the .vdi disks it should be the same, the emulated hard disks will be compatible between different OSes when run in VirtualBox assuming compatible partitioning formats are used. The .vdi files are not directly usable as generic disk images afaik, I believe VirtualBox puts some additional bookkeeping metadata into them.
 
I was toying with "Linux from Scratch" and using an old install of Mint on VirtualBox to create the 'scratch' version. What you guys said are what I was thinking but I probably should read ahead to see what happens once I create the image of the scratch installation. I guess I could just move that image over as a new, separate VM but I don't know how VirtualBox would handle the formatting.
 
By default, VirtualBox uses files for the VM hard disks. All the data that would normally be written to a hard disk is written to those files instead. The good news is that it uses sparse files, so they often take less space than they would if completely full.
 
Back
Top