Page 1 of 2

Resizing virtual drive

Posted: 14. Jul 2013, 16:53
by ciamurra
I am working with a MBP, OS X 10.8.4. In another thread ("Parent folder doesn't exist"), Mpack advised me
I think you'll soon find that 10GB as too small for the hd of an XP VM. It needs to be twice that IMHO if you want to avoid congestion, poor performance, and mysterious failures during Windows updates. When the time comes, be sure to read the Howto|Generic forum for info on enlarging a disk.
I am following the instructions on the forum. I think I've successfully completed step 1 (resize drive). After a few tries in Terminal, I finally got no more error messages. Now the problem is step 2 (Extend the primary partition to include the new drive space)..
Download the Gparted live cd or what ever partition manager program you wish

I believe these instructions are for Windows. Is there a way to do this with Boot Camp? Is there a safe, free app for Mac host/windows guest I can use?

Re: Resizing virtual drive

Posted: 14. Jul 2013, 17:13
by Perryg
Gparted is universal. Have you looked at the site?
Besides it is the guest you use this on and not the host.

Re: Resizing virtual drive

Posted: 14. Jul 2013, 19:45
by ciamurra
Thank you. I thought it ran on Mac.

Re: Resizing virtual drive

Posted: 15. Jul 2013, 05:53
by ciamurra
After successfully resizing the virtual drive, I had to extend the partition.

I looked at GParted Live and didn't think I could follow some of the instructions.
Following the advice of SemiTech from Sept. 2011, I tried DiskPart from within Windows. Two 10 GB partitions resulted, and I couldn't merge them. Then I tried mrrvb and downloaded EaseUS Partion Master. When I saw the publisher was Chinese, I panicked-- their hacking is such big news these days-- and deleted the app. Next, I tried one of ChipMcK's recommendations, partition wizard. That seemed to work; the VB Manager indicated the .vdi was now 20 gig, as I wanted.

So I tried to run windows. It's caught in a loop. I've tried safe mode and its variations, but no go. WindowsXP starts to load, but then a command prompt (black & white) appears. "Windows didn't start successfully..." I restored the .vdi using Time Machine, but still couldn't dodge the startup loop. I restored the VB app too. So I'm caught in a loop with an app and a vm, both of which predate the problem.

Now what?

Macbook Pro, OS X 10.8.4, Virtual Box 4.2.16. Guest: WindowsXP SP2

Re: Resizing virtual drive

Posted: 15. Jul 2013, 06:22
by ciamurra
Addendum to above post:
The virtual drive was 10 GB. I wanted to resize to 20 GB. I did that with the modifyhd command. In step 2, I didn't know whether to extend the size of the vm to 20 GB or increase by 10 GB. I chose to extend to 20 GB. Was that the error?

Re: Resizing virtual drive

Posted: 15. Jul 2013, 08:54
by loukingjr
ciamurra wrote: I restored the .vdi using Time Machine, but still couldn't dodge the startup loop. I restored the VB app too. So I'm caught in a loop with an app and a vm, both of which predate the problem.

Now what?
A couple things. First of all you can't restore just the .vdi file because the .vbox file now thinks your .vdi is 20GB. You need to restore the whole WindowsXP folder then you will be back to the 10GB version.

Second, after resizing it again, you should really try and use GParted. It's pretty simple. You just attach the GParted .iso to the Windows guest as the CD. Boot the guest and GParted will start. Once it's open you will see the main partition taking up about half the drive. You just have select resize/move from the Partitions menu, drag the arrow to fill up the space and click apply. When it's done you can shut it down, remove it from Storage in the guest and start the guest.

Re: Resizing virtual drive

Posted: 15. Jul 2013, 12:51
by mpack
loukingjr wrote:you can't restore just the .vdi file because the .vbox file now thinks your .vdi is 20GB.
There is nothing in the .vbox file that cares about the disk size. It only cares about the file name, path, and UUID(s).

Re: Resizing virtual drive

Posted: 15. Jul 2013, 13:47
by loukingjr
mpack wrote:
loukingjr wrote:you can't restore just the .vdi file because the .vbox file now thinks your .vdi is 20GB.
There is nothing in the .vbox file that cares about the disk size. It only cares about the file name, path, and UUID(s).
I made an assumption based on his post saying he restored the .vdi file. I never actually looked. if he restored the working one it should of worked as before then. I guess that means he didn't. thanks.

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:39
by ciamurra
Thanks, guys. I must have restored a different copy of the vdi. But remember, I can't open WindowsXP guest. Should I move the VMs folder to the Mac desktop and start the whole process again? I no longer have the most current (then) vdi. I emptied the trash in case the latest (then) was causing the problem.

Suppose I delete the entire VMs folder and create another vdi?

If I create a new one, I'd like to know how to specify 20 GB right from the start. I haven't seen that option, just "recommended size is 10 GB."

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:41
by mpack
ciamurra wrote:If I create a new one, I'd like to know how to specify 20 GB right from the start. I haven't seen that option, just "recommended size is 10 GB."
You either type the number you want into the edit box, or drag the slider. Often a bit of both. Look closely at the hd creation dialog next time you do it.

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:46
by ciamurra
If I create a new vdi, then all the data on the old one (from an older MBP) will be irretrievable?

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:47
by loukingjr
ciamurra wrote:Thanks, guys. I must have restored a different copy of the vdi. But remember, I can't open WindowsXP guest. Should I move the VMs folder to the Mac desktop and start the whole process again? I no longer have the most current (then) vdi. I emptied the trash in case the latest (then) was causing the problem.

Suppose I delete the entire VMs folder and create another vdi?

If I create a new one, I'd like to know how to specify 20 GB right from the start. I haven't seen that option, just "recommended size is 10 GB."
if you create a new machine and .vdi you will no longer have the programs you had installed in the original one. what happened to the WindowsXP.vdi from the old computer that was working?

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:48
by ciamurra
to be clear: the data I don't want to lose are some programs for which I no longer have the installation CD

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:55
by ciamurra
Okay. So trash the current vdi and create a new one with original vdi. If I make the new one larger than the original, I won't be able to use the old vdi, right? I'm forced to start with 10 gb and extend to 20 gb?

Re: Resizing virtual drive

Posted: 15. Jul 2013, 16:56
by loukingjr
ciamurra wrote:Okay. So trash the current vdi and create a new one with original vdi. If I make the new one larger than the original, I won't be able to use the old vdi, right? I'm forced to start with 10 gb and extend to 20 gb?
yes, you need to start with the one that was working.