Expand .vhd for Windows 8.1 guest?

Discussions about using Windows guests in VirtualBox.
Post Reply
Objekt
Posts: 21
Joined: 27. Sep 2010, 06:03
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP & 7

Expand .vhd for Windows 8.1 guest?

Post by Objekt »

I'm in a bit of a pickle with a Windows 8 guest OS on a Windows 7 host system, using Virtualbox 4.3.12 (I tried 4.3.14 but it didn't work, as I gather has been the case for others).

The problem is I don't have enough room in the system's *.vhd file. After downloading the Windows 8.1 update package (around 3.6 GB) I have only 2.8 GB left, but need a lot more (4.8 GB IIRC).

There doesn't seem to be any way to expand the .vhd.

After making a backup of the Windows 8 guest's .vhd file, I ran the following console command:

Code: Select all

VBoxManage modifyhd "D:\Public VMs\Windows 8 x64 RTM\Windows 8 x64 RTM.vhd"  --resize 40000
(note the " marks around the file path - required if your path has any spaces in it, otherwise VBoxManage will not understand)

That command completed successfully, but gave me an unbootable guest OS. When trying to start the Windows 8 guest, I now get the error message:

Code: Select all

FATAL! No bootable medium found!  System halted.
At least I made a backup of the original .vhd.

I next booted up the guest with a GParted image, but it only shows a 39.06 GB "unallocated" disk. So I can't resize the system partition to match the newly-expanded "disk."

Where do I go from here? Would really like to have a working Windows 8.1 guest OS. Don't want to have to start from scratch with a new virtual HDD file.
dlharper
Posts: 291
Joined: 25. Aug 2011, 19:17
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: MS Windows (several versions); DOS

Re: Expand .vhd for Windows 8.1 guest?

Post by dlharper »

40GB is still pretty small for running Windows 8.1. (The figure you give in the VBoxManage command is the final size, not the amount you are expanding it by.) Can I suggest you try expanding it to at least 100GB - it won't take any more space on the physical host disk unless it needs to.

In Windows (XP and later) you can manage partitions using Disk Management, and I usually find this is the best way of doing it.
Objekt
Posts: 21
Joined: 27. Sep 2010, 06:03
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP & 7

Re: Expand .vhd for Windows 8.1 guest?

Post by Objekt »

Yes, I can expand the *.vhd to give Windows 8 as much room as I want. The problem is that the *.vhd will then no longer boot. See above.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Expand .vhd for Windows 8.1 guest?

Post by Perryg »

Have you tried to convert it to a VDI file first? I know it says that it will work on VHD but I find that format lacking and fragile.
Objekt
Posts: 21
Joined: 27. Sep 2010, 06:03
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP & 7

Re: Expand .vhd for Windows 8.1 guest?

Post by Objekt »

That did the trick. As you say, the *.vdi container seems to be robust. I resized it using VBoxManage and it still started up. I was able to resize the system partition once Windows 8 was running using its native tool.
Post Reply