robjeff
Contributor
Contributor

Has anyone successfully resized their boot partition on a vm?

Jump to solution

All -

I have successfully extended my vmdk file for my primary server.

I have mount that vmdk file to a second vm.

I used diskpart.exe to extend my c:\ partition I got the following message. "The volume you have selected may not be extended.

Please select another volume and try again"

However I was able to successfully extend my d:\ partition.

My question:

Has anyone successfully resized their boot partition of a vm using no third party apps? If so how?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
server_team
Enthusiast
Enthusiast

Hi,

I'm sure there are many ways, this is ours using only VMware GUI, which is nice as I'm a windows man. We have done this to about 50 machines resizing from 15gb to 8gb.

Download Vmware converter. http://www.vmware.com/download/converter/

While waiting for this to download take a full backup of your virtual machine.

Install VMware converter on your desktop

File/New/Import/Next

Source[/b]

Source type = ESX server or Vcentre.

Login

Select your Virtual Server

Select volumes and resize

(click the dropdown and select type size in gb) enter size (8 in my case)

Destination[/b]

Vmware ESX server or VCentre

Login

give the machine a new name

select the ESX server you want it to go to (it can be the same one)

select your datastore (can be the same one)

select your network

Default the next two screens and click finish.

pops out the other end 20 minutes later

fire up the new machine, when you are happy delete the original.

good luck

Message was edited by:

server.team

View solution in original post

0 Kudos
22 Replies
GBromage
Expert
Expert

I haven't done it without third party apps, but I have done it with free/open source apps.

If you download a Knoppix (bootable linux) CD from http://www.knopper.net there's a nice GUI utility called qtparted which can resize NTFS partitions.

If you prefer the command line (and who doesn't? Smiley Happy ), the underlying Linux utility is ntfsresize[/i]

I hope this information helps you. If it does, please consider awarding points with the 'Helpful' or 'Correct' buttons. If it doesn't help you, please ask for clarification!
0 Kudos
dmanconi
Enthusiast
Enthusiast

Hi

Have a look at this link, It explains it quite well

http://h0bbel.p0ggel.org/2007/04/10/howto-expand-vm-boot-partition/

Cheers

David

PS also reading through the comments for the link above, you could use the vmware converter utility to copy your VM and resize on the way through.

Message was edited by:

dmanconi

0 Kudos
timw18
Enthusiast
Enthusiast
0 Kudos
RParker
Immortal
Immortal

http://linux.softpedia.com/get/System/Recovery/System-Rescue-CD-188.shtml

Look at this link, you can use a utility to do it, and it's quite easy.

A VM partition is no different than a physical disk and I have resized many of them, with no problem. If you have the right tool, it's not big deal.

Acronis Disk Director is another utility I use.

0 Kudos
esiebert7625
Immortal
Immortal

My technique, using gparted....

http://gparted.sourceforge.net/

Resizing virtual disks

o Shutdown the Virtual Machine

o Type “vmkfstools –X ” ie. /vmfs/volumes/MyVMFS-Local/MyServer.vmdk New disk size can be specified in kilo, mega or gigabytes and will be the total size of the new disk. So if you want to increase a virtual disk from 20GB to 24GB you would specify either 24000m or 24g

o Power on the Virtual Machine and make sure it boots properly, load Disk Management and you will see the new unallocated space

o Now to join the unallocated space to the primary partition, first shutdown the Virtual Machine

o Connect the Virtual Machine to the GpartEd ISO file and make sure you enable Connected at Power On

o Power on the Virtual Machine

o Press ESC at the Bios screen to get to the Boot Menu

o Select CD-ROM as the Boot device

o Gnome Partition Editor will load, press Enter at the boot screen

o At the Boot option screen select Manual Video Card and then select Done

o Select US English at the Language screen

o Select qwerty/us.map at the Keyboard screen

o Select Generic VESA Compatiable at the Video Driver screen

o Select 8 at the Display Depth screen

o Select 1024x768 at the Resolution screen

o Once the partition editor loads, click on /dev/sda1 in the partition list

o Click the Resize/Move button

o Click and drag the arrow to extend the size of the partition, make sure you do a resize (double arrow) and not a move (four way arrow) so you should 0 free space preceding and following and then click the Resize/Move button

o Next click the Apply button and then the operation will start, you can expand Details to see the progress, once completed click the Close button.

o Click the power button in the button right corner, then select reboot.

o Edit the VM and remove the ISO from the CD/ROM device (change to Client)

o When the server restarts it will do a Check Disk, let this complete, Windows will prompt for a reboot after you login

o Reboot and load Disk Management and your Primary Partion will be the new size without any unallocated space

wcrahen
Expert
Expert

Use the method and link that dmanconi mentions, this works very well, otherwise you can use Ghost with a helper machine as well.

0 Kudos
esiebert7625
Immortal
Immortal

Thats what I posted also in step by step detail...

0 Kudos
penseur2
Enthusiast
Enthusiast

if the boot partition / volume is a dynamic disk, you will need to first use dskprobe.exe from the win2k3 support tools pack to change it to a basic disk.

pls backup the vmdk before proceeding

load up dskprobe.exe and navigate to physical drive 0, right click -> open handle

then Read Sectors 0 to 10

on line 01C0 --- the 3rd byte will be 42 if the disk is dynamic, change it to 07

write sectors 0,10 and reboot.

Now you can use gparted to extends the NTFS volume.

0 Kudos
GlenMarquis2
Enthusiast
Enthusiast

I like a program by Acronis called partition expert.

However a common thing that people forget is that to enlarge a VM disk/partition it is two fold.

Firstly - make the VMDK bigger e.g. at the console....vmkfstools -X newsize /disk0.vmdk , but the OS will not automatically use the extra freespace.

Secondly - use something like diskpart or Acronis partition expert to resize the NTFS volume into the new freespace.

0 Kudos
tgradig
Hot Shot
Hot Shot

Guys,

It's simple we do it all the time.

1. Move page file off of the C: drive and reboot. (Can't extend a drive with a pagefile)

2. Shutdown the guest.

3. resize it using vmkfstools

4. Attach the c: drive to a helper box (same OS) and power on the helper box. You will see the drive as a second system drive, but it really isn't.

5. run diskpart and extend the drive.

6. Shutdown the helper box and remove (don't delete) the c: drive from your production guest.

7. Power on your newly extended disk.

Good luck.

0 Kudos
robjeff
Contributor
Contributor

I used this link and when I got to the step where you extend the volume is when I got the message that it could not. This is my problem! Thanks!

0 Kudos
tgradig
Hot Shot
Hot Shot

What link did you use? Make sure you don't have a page file associated to the c: drive. Also, it must be attached to a helper box to extend the c: partition.

robjeff
Contributor
Contributor

Excellent... I didn't try this but will do it now... I'll update this post later. Thanks a bundle for everyone that has given input so far. You all are really great. Smiley Happy

0 Kudos
server_team
Enthusiast
Enthusiast

Hi,

I'm sure there are many ways, this is ours using only VMware GUI, which is nice as I'm a windows man. We have done this to about 50 machines resizing from 15gb to 8gb.

Download Vmware converter. http://www.vmware.com/download/converter/

While waiting for this to download take a full backup of your virtual machine.

Install VMware converter on your desktop

File/New/Import/Next

Source[/b]

Source type = ESX server or Vcentre.

Login

Select your Virtual Server

Select volumes and resize

(click the dropdown and select type size in gb) enter size (8 in my case)

Destination[/b]

Vmware ESX server or VCentre

Login

give the machine a new name

select the ESX server you want it to go to (it can be the same one)

select your datastore (can be the same one)

select your network

Default the next two screens and click finish.

pops out the other end 20 minutes later

fire up the new machine, when you are happy delete the original.

good luck

Message was edited by:

server.team

View solution in original post

0 Kudos
RParker
Immortal
Immortal

That's a lot of work considering a simple boot disk with linux running gparted does the same thing, and it's free.

We do this all the time as well, and that's the long way to go about it, it's much easier to simply boot from within the VM, and use gparted. It takes like 3 minutes total from the time you boot, let linux come up (booting from CD-ISO image) run startx shell, run gparted, extend disk, and reboot.

Done!

No need to bring in another VM.

0 Kudos
RParker
Immortal
Immortal

You people like doing things the hard way don't you?

Your way takes a minimum of 30 minutes, my way takes like 3 minutes. same suggestion as earlier

esiebert7625 even gave a step by step. Following those directions, it took longer to paste it then it did to actually do it....

0 Kudos
RParker
Immortal
Immortal

Some people just like to do things the hard way I suppose.. I even posted a link to the linux rescue CD, which has the same utility you use..

Why do people just completely ignore the easy steps?

I guess if its easy, it must be not be the most professional way...

0 Kudos
robjeff
Contributor
Contributor

Thanks a bundle. This tool worked perfectly.... Thanks again!

0 Kudos
tgradig
Hot Shot
Hot Shot

The only problem I have with Gparted is that you said it will need to do a check disk. If you have a large drive attached, this could take a long time, but I will give it a try though.

0 Kudos