VMware Cloud Community
martinm242
Contributor
Contributor

New hard-disk size option: useless?

Hello!

the initial hard disk size for a VM running RHEL5 was 20 GB and now I need to extend it somehow, so I opened up the VMware Infrastructure Client, edited the VM's properties and set a new size to 40 GB.

Now I have a 40 GB hard disk on the datastore that can't be seen by the guest OS so my question is how to add those 40 GB to the existing virtual disk.

If it's not possible, is it safe to just delete de 40 GB-virtual disk from the datastore and start over? Which would be the right procedure?

TIA,

Martin

0 Kudos
10 Replies
Troy_Clavell
Immortal
Immortal

see this link for guides on how to extend your vm's disk files

http://vmware-land.com/Resizing_Virtual_Disks.html

0 Kudos
mokymura
Expert
Expert

Hello Martin

From you text i guess you have VC 2.5: is the easyest way to expand a HD Smiley Happy

  • Windows System:

    • start -> run ->diskpart-> select disk x -> select volume x -> expand

  • Linux System (i am not expert on this OS)

    • lvextend -L5410M /dev/VolGroup00/LogVol00 -> you should deep inside the correct command line to expand the partition.

Regards

Si encuentras esta u otras respuesta útiles, por favor considera el asignar puntos seleccionando la respuesta como útil o correcta If you find this or any other answer useful please consider awarding points by marking the answer helpful or correct.
0 Kudos
martinm242
Contributor
Contributor

actually the idea now is to remove the 40 GB virtual disk and get back to the initial 20 GB... is it possible at all?

TIA,

Martin

0 Kudos
Troy_Clavell
Immortal
Immortal

shrinking a disk is probably better done using VMware vCenter Converter Standalone 4.0

0 Kudos
Dynamax
Enthusiast
Enthusiast

if you havent run the expand disk in the OS im pretty sure you can change the size of the disk back to its original size if the change was only made in VC.

0 Kudos
martinm242
Contributor
Contributor

hi,

that was my first (natural) step... to set back the size to 20 GB but the VC won't allow me to change it and it stays at 40 GB always... therefore my post Smiley Happy

0 Kudos
martinm242
Contributor
Contributor

the tool can't retrieve the hardware information form the ESXi... hmmm... ideas? maybe need to open some ports? which ones?

TIA

0 Kudos
TCronin
Expert
Expert

You can't shrink disks using VC, too much chance of corruption of you shrink past a partion boundary. You used to be able to do it in ESX 2.5 at the command line, but that's when I found out about crossing the partion boundary, the hard way.

There is limited support for Linux in the converter products so you may run into issues trying to get that to work. If you have data to save I would say create a 20 GB disk attached to the machine and mount it, copy your data and then delete the 40 GB disk after you power down. You may have to change the disk number in the VM settings so the new 20 GB drive matches the old 40 GB designation (probabaly scsi0:0)

Tom Cronin, VCP, VMware vExpert 2009 - Co-Leader Buffalo, NY VMUG

Tom Cronin, VCP, VMware vExpert 2009 - 2021, Co-Leader Buffalo, NY VMUG
0 Kudos
martinm242
Contributor
Contributor

during all this grow/shrink/migration procedure something went wrong and my .vmdk files are gone so the VM won't come start up anymore due to a missing file...

I'm now following these steps http://www.itexperience.net/2008/03/03/howto-recreate-vmdk-files/ hoping to save my ass before going home... Smiley Happy

0 Kudos
martinm242
Contributor
Contributor

odd to reply to myself...

just wanted to add that the steps decribed on the link above will result in an empty VM... everything is lost. It's a nice exercise though...

Anyway, as now everything is ruined is better to delete the old VM, forget it and start from scratch.

my 2 cents...

0 Kudos