Enable Pre-Formatting of the vdi File

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
Ganapathi
Posts: 9
Joined: 21. Jun 2010, 15:31
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8.1

Enable Pre-Formatting of the vdi File

Post by Ganapathi »

I don't know if this is possible or not but I just ran across this problem with wanting to test install Win8.1 into a virtual box. Scenario is as follows:

1. I create a virtual-box to install Win8.1 into. (This effectively means that VBox creates a vdi file, into which the install of the guest OS will be put.)
2. Start the install of Win8.1 to the virtual-box.
3. At the point where the install asks into what partition the install should be put chose the advanced setup option.
4. Then disk information is shown as to what space there is available to install Win8.1 into. This is shown as "unallocated space" - and the size of that unallocated space is equal to the size of the vdi file.
5. So I select the unallocated space and say that I want to install into that space.
6. The install then proceeds I find (at the end of the day) that the install routine has split the unallocated space into two partitions.
7. The first of those partitions is shown as "System Reserved 350 MB" with a second partition shown into which the OS has been installed. The size of that partition is the remainder of the unallocated space after the 350 MB is subtracted from it.
8. The problem with this is that I want to test to see if I can install the entire OS to one single partition. In effect I don't want that "System Reserved" partition at all.
9. As far as I am aware it is possible to do that. But the entire unallocated space needs to be pre-formatted before trying to install the Win8.1 system. If that (single) pre-formatted space does exist then the installer installs the entire system (including what would have went into the "System Reserved" partition) into that one single partition.
10. I would therefore like to suggest the ability to pre-format all the unallocated space of a virtual-box as a single partition. Or have VBox present the entire unallocated space to the Win8.1 installer as if that unallocated space was in fact a single pre-formatted partition (thus tricking the installer into treating it as such, so it can't create the System Reserved partition).

I hope the way I have explained this makes sense.

(I also think the same sort of scenario would be in operation if the user was trying to install Win7 to a virtual-box and into a single partition.)
Host System = Win 7 Pro x64 SP1
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: Enable Pre-Formatting of the vdi File

Post by socratis »

  1. VirtualBox does not deal with partitions. VirtualBox does not know what a partition is.
  2. VirtualBox provides the HD, just like Seagate or Western Digital provides an empty hard drive.
  3. You can format a partition (or more) with several options. See: https://en.wikipedia.org/wiki/Partition_type. VirtualBox supports all of them, and none of them in particular. See #1.
  4. The 350MB "System Partition" is due to Windows, not due to VirtualBox.
  5. What you need to do is to either figure out a way for Win8.1 to do it in a single partition (without thinking about VirtualBox at all), or to mount the VDI in an existing VM and format it there. Exactly as you would do in a physical computer.
  6. I believe that you can partition the unpartitioned space, before selecting it in Windows setup as the unpartitioned one, but it's been a while since I've installed Windows.
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.
Ganapathi
Posts: 9
Joined: 21. Jun 2010, 15:31
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8.1

Re: Enable Pre-Formatting of the vdi File

Post by Ganapathi »

socratis wrote:
  1. [5] What you need to do is to either figure out a way for Win8.1 to do it in a single partition (without thinking about VirtualBox at all), or to mount the VDI in an existing VM and format it there. Exactly as you would do in a physical computer.
Thank you socratis. I know that the "System Partition" is due to the Windows installer but it is perfectly possible, on a physical hard-drive, to arrange things so the installer doesn't create that partition. It is possible to do this. I installed my Win7 system to single partition on a physical hard-drive (not a vdi 'hard-drive'). To achieve that I had to pre-format the partitions on the hard-drive so that Windows installer had no option but to install Win7 to a single partition.

All that said, I will look into your suggested point "5" information and see if I can do that. (Though that said it would be great if VBox could provide a way of not having to go to all that trouble.)

Doing this should also be possible with Win8.1. There is a guide that mentions how to do this here: Clean Install - Windows 8. See the section numbered 8. (Note).

My suggestion is really for improvement of VirtualBox. Maybe it might be possible to fool installers into thinking that the entire "unallocated space" is really a formatted partition.
Host System = Win 7 Pro x64 SP1
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: Enable Pre-Formatting of the vdi File

Post by socratis »

You forgot to quote my first point, so let me quote it again. It might help the conversation:
socratis wrote:1. VirtualBox does not deal with partitions. VirtualBox does not know what a partition is.
Now, from the article that you linked:
If you do not want to have the 350 MB System Reserved partition ... then select a formatted partition or drive
Well, do that then. Download the GParted LiveCD (a partition editor), boot your VM with that, partition and format your HD, shut down the VM and reboot with the Windows 8 installer. It takes less than 2 minutes. This is pretty much the procedure I was outlining in #5, I just didn't go in the details...
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.
Ganapathi
Posts: 9
Joined: 21. Jun 2010, 15:31
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8.1

Re: Enable Pre-Formatting of the vdi File

Post by Ganapathi »

socratis wrote:You forgot to quote my first point...
Well, no, I didn't forget I just didn't understand it immediately. I slept on it and understood it when I woke in the morning.

In the event of that I found the following instructions on how to mount one vdi into another (running) virtual machine: Mounting another VM's .vdi in VirtualBox.

So I made a new virtual machine fixed size vdi file into which I intended to freshly install Win8.1 and then followed the instructions there to mount it into an already existing virtual machine. Then I was able to format the newly mounted new drive as a single partition in the already existing (running) virtual machine.

Once that was done I launched the new virtual machine, and stepped through the Win8.1 install routine. When I got to the part on where to install 8.1 to I just chose the Advanced Option, and there was the drive pre-formatted as a single partition. I made the Windows installer format the drive again (just to be sure) and then installed to that single partition.

At the end of the install routine I booted into the new virtual machine. And "Voila!" There was Win8.1 installed to a single partition! No "System Reserved" partition at all. Happy now.

Thanks very much for the pointers, socratis. Hugely appreciated. :D

(I might write a tutorial on this for the forum. In case anyone else searches how to do this in the future.)
Host System = Win 7 Pro x64 SP1
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Enable Pre-Formatting of the vdi File

Post by mpack »

Ganapathi wrote:(I might write a tutorial on this for the forum. In case anyone else searches how to do this in the future.)
That would be out of place here, and indicates that you still don't understand the separation between hardware and software. VirtualBox is a hardware emulator, it doesn't control or care what software (i.e. your guest OS) does with the hardware. Specifically, it does not know or care what management data structures a given OS might write to the disk. Not its business.
Ganapathi
Posts: 9
Joined: 21. Jun 2010, 15:31
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8.1

Re: Enable Pre-Formatting of the vdi File

Post by Ganapathi »

mpack wrote:That would be out of place here, and indicates that you still don't understand the separation between hardware and software.
Okay, got it now. :)
Host System = Win 7 Pro x64 SP1
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: Enable Pre-Formatting of the vdi File

Post by socratis »

Ganapathi wrote:So I made a new virtual machine fixed size vdi file into which I intended to freshly install Win8.1 and then followed the instructions there to mount it into an already existing virtual machine. Then I was able to format the newly mounted new drive as a single partition in the already existing (running) virtual machine.
That's really the convoluted way of doing things and I should only have posted it as a 2nd convoluted alternative. The easiest solution in your case would be to download a GParted LiveDVD. No need for a second VM.
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.
Ganapathi
Posts: 9
Joined: 21. Jun 2010, 15:31
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8.1

Re: Enable Pre-Formatting of the vdi File

Post by Ganapathi »

:shock: Am I getting a bad time here, or what?

I already had the first virtual machine, the one with 8.1 installed to two partitions. I used that to format the new vdi file. Simple, straightforward, not convoluted at all. A lot less convoluted than downloading something else, burning a boot CD, stabbing at the vdi file from the boot-disk, rebooting, then do the install to see if it all went fine. (I might give it a try, though, when I get time as it sounds like something that is worth experimenting with.)

In any case, for the method I used, "Hey! It worked!" :mrgreen:
Host System = Win 7 Pro x64 SP1
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: Enable Pre-Formatting of the vdi File

Post by socratis »

Ganapathi wrote:Am I getting a bad time here, or what?
No, you're not, we're simply trying to put out the correct answers for people that read this now and in the future. Mistaken statements and assumptions do not really help, on the contrary they can be confusing. So it's better to clear out any potential confusion.

Yes, it worked for your case because you already had a VM. It still is way, way more convoluted if you don't have a VM; to create a VM just to partition a virtual HD.

And a small correction: you don't have to burn a CD and boot from it. You boot directly from the downloaded GParted ISO.
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