Parallels Forums
> Development Discussion > User Solutions and Workarounds  
How I resized a Windows partition  
  

How I resized a Windows partition

May 3, 2006, 09:23 PM
#1  

jeliker
Junior Member


Join: Apr 2006
Posts: 22
How I resized a Windows partition
Moved from How Parallels "Desktop for Mac"

I successfully resized my Windows 2003 installation today using the following process.
  1. Copy the HDD drive image file and rename
  2. Use Image Tools to resize the original HDD file
  3. Change your VM profile to boot off of the copied HDD image and add the original, resized image as a second hard disk
  4. Once booted, open CMD prompt and run DISKPART
  5. View volumes in DISKPART with the command list volume. Note which volume is your original, resized partition
  6. Select that partition using the DISKPART command select volume # where # is the partition number.
  7. Enter the command extend
  8. Enter the command exit
  9. Exit Windows and change the VM profile to once again boot from the original, resized image file. You can disconnect (and delete?) the copied image file from the VM profile.

I don't know if DISKPART can be used on Windows XP, etc. but I know that you can download it from Microsoft. Google diskpart windows download.

As mentioned, this worked for me though I cannot guarantee that this will work in all situations.
May 7, 2006, 04:39 AM
#2  

BenInBlack
Senior Member


Join: May 2006
Posts: 374
:D :D I what to give you a big thank you for these instructions.

I can personally vouch for the fact that they work with Windows XP Pro Service Pack 2
I just went from 8gig to 20gig.

Just some notes to help those that also want to do this.
1. When you do "List Volumns" you will be hit with 2 volumns that say the same size, so remember you've setup your backup copy as the boot so that will be the C: and you added your resized one and that will most likely be the E: (D: being the CD/DVD).

Here is what my "List Volume" looked like at the point just before extending
DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D CD-ROM 0 B
Volume 1 C NTFS Partition 7995 GB Healthy System
Volume 2 E NTFS Partition 7995 GB Healthy System

at this point i did the "select volume 2" and then did the extend
May 7, 2006, 11:37 AM
#3  

wesley
Senior Member


Join: Apr 2006
Posts: 398
Wow, this should be in a FAQ or something.

__________________
Core 2 Duo iMac 2.8GHz | 4GB RAM | 500GB HDD
Mac OS X 10.5.4 | VM inside PW: Windows XP SP3
May 8, 2006, 12:07 PM
#4  

KaiserX
Junior Member


Join: Apr 2006
Posts: 12
Worked for me. Thank you for posting this!
May 8, 2006, 12:50 PM
#5  

MarkHolbrook
Senior Member


Join: Apr 2006
Posts: 351
Worked beautiful. Thanks a million!
May 8, 2006, 02:35 PM
#6  

hevans
Junior Member


Join: Apr 2006
Posts: 7
Where do I find "Image Tools"?
Thanks in advance.

Hugh Evans
May 8, 2006, 04:50 PM
#7  

neile1
Junior Member


Join: May 2006
Posts: 5
Thanks a lot jeliker
May 8, 2006, 10:40 PM
#8  

BenInBlack
Senior Member


Join: May 2006
Posts: 374
After i installed beta 6 i found that parallel had changed it an put a folder that contains the image tools and parallel.

__________________
Parallels Build: v3 beta build 5580 on Leopard
Running: Mac Mini - DuoCore 1.66Ghz with 2 gig of Ram.
PW: Windows XP Pro set to use 512Meg Memory, 20gig Primary HD
miniStack: 360gig with 40gig second HD for PW
May 9, 2006, 08:50 AM
#9  

jeliker
Junior Member


Join: Apr 2006
Posts: 22
Quote:
Originally Posted by BenInBlack
After i installed beta 6 i found that parallel had changed it an put a folder that contains the image tools and parallel.
You'll need to use Image Tools to resize the hard drive image in step 2 of my original post
May 10, 2006, 04:32 AM
#10  

jkragenb
Junior Member


Join: May 2006
Posts: 4
Outstanding solution - worked perfectly. Thank you.
May 11, 2006, 01:27 PM
#11  

wndxlori
Junior Member


Join: Apr 2006
Posts: 7
Worked like a charm. This should be a sticky thread.
May 11, 2006, 09:23 PM
#12  

pmbooks1
Junior Member


Join: May 2006
Posts: 12
I've gotten as far as resizing the original HDD, but am stumped from 3 forward, changing VM profile to boot off of the copied HDD image. If this is found in the Configuration Editor, I'm not sure what to do. You guys must already be Windows saavy (or programming smart). Any help would be appreciated, thanks, Paul
May 11, 2006, 11:04 PM
#13  

jeliker
Junior Member


Join: Apr 2006
Posts: 22
Quote:
Originally Posted by pmbooks1
I've gotten as far as resizing the original HDD, but am stumped from 3 forward, changing VM profile to boot off of the copied HDD image. If this is found in the Configuration Editor, I'm not sure what to do. You guys must already be Windows saavy (or programming smart). Any help would be appreciated, thanks, Paul
When you first start Parallels Workstation, you'll see the property page for the current VM. If you click on "Hard Disk 1" under the resources section, you'll be shown the Configuration Editor page and "Hard Disk 1" will be highlighted. Under the "Image File" field on the right side of the screen, browse to and select the copied, renamed image file. That will make the copy the new boot drive.

Now, Click the Add... button at the bottom, left side of the screen. Choose "Hard Disk" then click Next. Choose "Use an existing hard disk image" then click Next. Browse to the original, resized image file then click Finish. Now, you'll see a "Hard Disk 2" entry on the left on the Configuration Editor page. Click OK to close the Configuration Editor window.

Start your VM and follow steps 4-8 in my original post.

Shutdown your Windows guest OS and wait for the VM property page to appear. Once it does, click on the Edit button to display the Configuration Editor again. Highlight "Hard Disk 2" then click Remove. Select "Hard Disk 1" and browse to and select the original, resized image file under the Image File field on the right side of the screen. Click OK to close the Configuration Editor window. Click Save to update your VM properties.

Restart your VM and you should see that your guest OS drive is now up to the size you reset it to.
May 12, 2006, 03:37 PM
#14  

BatmanPPC
Junior Member


Join: May 2006
Posts: 7
You don't need to make a copy of the disk image.

Download the live cd from http://gparted.sourceforge.net/download.php
Boot your VM from the live cd iso
Select default values until gpartd starts
Select partition to resize
Resize and apply
Disconnect iso
Reboot

Windows should run chkdsk automatically.
May 13, 2006, 01:01 AM
#15  

joem
Senior Member


Join: Apr 2006
Posts: 1,274
Quote:
Originally Posted by BatmanPPC
You don't need to make a copy of the disk image.
Perhaps, but resizing a partition I don't have a copy of seems unnecessarily risky, so I wouldn't advise not copying it first just in case something goes wrong.

__________________
MacBook Pro 1.83; core duo; 2GB RAM, 200G HD 10.4.8
Win2K Pro, 768 Meg RAM Build 4560
May 15, 2006, 12:34 AM
#16  

BatmanPPC
Junior Member


Join: May 2006
Posts: 7
Quote:
Originally Posted by joem
Perhaps, but resizing a partition I don't have a copy of seems unnecessarily risky, so I wouldn't advise not copying it first just in case something goes wrong.
Heh, how come I always feel like I'm the only one who runs a backup system?
May 15, 2006, 03:02 PM
#17  

dtaylor
Junior Member


Join: May 2006
Posts: 2
I tried using diskpart on my workstation instance but got an error about the disk management subsystem not being available. So I found a workaround using Image Tools and gparted. My original disk image was 4GB resizable. Here's the steps I used:

1) Resize from 4GB to 10GB using Image Tools, keeping as resizable.
2) Boot into gparted.
3) Try to resize to partition to 10GB. BUT I got an error during the resizing operation. I assumed it was because of the resizable partition - still not sure.
4) Quit qparted and use Image Tools to convert the image from resizable to "plain" format (still 10GB).
5) Reboot into windows. Still showing C: as 4GB. Didn't work.
6) Boot again with qparted. Showed the partition was full 10GB, but with 7.5GB used instead of 1.5 GB used.
7) Resize partition to next smallest value available. This was successful.
8) Reboot back into Windows XP, and how I have 8GB free.

I think the key was getting gparted to actually do the resize operation by slightly shrinking the partition size. This rewrote all the data and properly set the free space.
May 15, 2006, 03:22 PM
#18  

jeliker
Junior Member


Join: Apr 2006
Posts: 22
Quote:
Originally Posted by dtaylor
I tried using diskpart on my workstation instance but got an error about the disk management subsystem not being available. So I found a workaround using Image Tools and gparted. My original disk image was 4GB resizable. Here's the steps I used…
Good to know. Was your original partition FAT32 or NTFS? I didn't mention in my original post but I was resizing an NTFS volume.
May 17, 2006, 10:06 AM
#19  

BeyondPrint
Junior Member


Join: May 2006
Posts: 3
Thank you.
I'd like to also say thanks to this. Worked like a charm!
May 22, 2006, 07:48 AM
#20  

myktee
Junior Member


Join: Apr 2006
Posts: 2
Quote:
Originally Posted by BatmanPPC
You don't need to make a copy of the disk image.

Download the live cd from http://gparted.sourceforge.net/download.php
Boot your VM from the live cd iso
Select default values until gpartd starts
Select partition to resize
Resize and apply
Disconnect iso
Reboot

Windows should run chkdsk automatically.
All,

This technique worked exactly as mentioned. I was able to expand a single 4 GB NTFS boot volume (C:\ drive) with about 250 MB of free space to 8 GB.

I extended the virtual hard drive file using the Parallels Image Tool to 8 GB (perhaps I could have used gparted to do this too), booted the VM to the mounted gparted 0.2.5 live CD ISO image and resized the original partition from 4 GB to 8 GB.

After restarting the VM (booting off the hard drive), Windows XP did a checkdisk, restarted, launched a dialog mentioning some device was found/changed (I suspect this step might not always happen to you), restarted and now I have an 8GB partition in a single virtual hard drive file.

I agree, this should be a FAQ entry or sticky topic!

Thanks Batman!

myktee


1234511  > Last »

Thread tools Display modes
Linear Mode