Page 1 of 1

Expand .vhd for Windows 8.1 guest?

Posted: 4. Sep 2014, 22:45
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.

Re: Expand .vhd for Windows 8.1 guest?

Posted: 5. Sep 2014, 01:41
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.

Re: Expand .vhd for Windows 8.1 guest?

Posted: 5. Sep 2014, 02:13
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.

Re: Expand .vhd for Windows 8.1 guest?

Posted: 5. Sep 2014, 03:04
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.

Re: Expand .vhd for Windows 8.1 guest?

Posted: 5. Sep 2014, 04:01
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.