Page 1 of 1

Guest OS has to be an image file?

Posted: 24. May 2009, 20:15
by MasterEvilAce
Does the guest OS have to be in an image file, or can it run from a folder? Could I partition a drive, extract my VDI into a folder, and run virtualbox from that?

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 20:23
by baf
It has to be either an image-file or (warning advanced!) an existing partition.
So run from folder no can do.

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 20:57
by MasterEvilAce
baf wrote:It has to be either an image-file or (warning advanced!) an existing partition.
So run from folder no can do.
So if I partitioned my C drive, would I be able to extract the VDI to that new partition (let's call it D), and then tell virtualbox to use it from there?
Are there any downsides to this? Is there anything else I have to do?

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 21:02
by baf
One question: why?

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 21:09
by MasterEvilAce
Primarily so I can easily access the files in that environment, without having to rely on folder shares
another reason being file fragmentation.. After a day's use the single VDI file causes my drive to get fragmented to 20% or more.

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 21:22
by baf
Well you can't use it both ways at the same time. That is a guarantee for corruption. So for shared files I would recommend a share either virtualboxs own or a network share. To avoid fragmentation the one possibility is to keep your vdi-files on a separate partition.
But once more using a raw partition is a very easy way to crash your data.

From the manual:
Warning: Raw hard disk access is for expert users only. Incorrect use or use
of an outdated configuration can lead to total loss of data on the physical
disk. Most importantly, do not attempt to boot the partition with the currently
running host operating system in a guest. This will lead to severe data
corruption.

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 21:34
by MasterEvilAce
Ok, I will probably move the images to their own partition.
Thank you for your insight and your expertise

Re: Guest OS has to be an image file?

Posted: 24. May 2009, 21:56
by Sasquatch
And for even better fragmentation control, don't use dynamic VDI's, but use static sized ones. That will cause VB to take a bit longer to create the VDI, but if you defragmented the drive before creating it, you will have a single file occupying one large space, and not broken up in several parts.