Link to home
Start Free TrialLog in
Avatar of JB Blanco
JB BlancoFlag for United States of America

asked on

I shrank a flat-vmdk on a vm and now, vcenter wont let me power on or storage migrate the VM!!!

Environment = Vcenter Version 6.7.0.20000 Build 10244845
ESXi, 6.5.0, 7967591

I shrank a flat-vmdk on a vm and now,  vcenter wont let me power on or storage migrate the VM.  

I followed this guide - https://virtualman.wordpress.com/2016/02/24/shrink-a-vmware-virtual-machine-disk-vmdk/
(I should never done it! Big mistake)  The guide seemed so straight forward and I did not think anything would happen.  

Error I get when I try to Storage Migrate the VM:
User generated image
Error I get when I try to power on the VM:
User generated image

Let me explain exactly what happen which may help you figuring out a solution:

1.)I Powered off the VM because memory hot add was not enabled and I needed to increase the RAM from 32gb to 228gb total.
When I went to increase the ram I mistakenly increased the Hard Disk from 80GB to 228GB and clicked ok!!!
With the VM still powered off, I decided to try and shrink the flat-vmdk following that above guide.

I followed the ONLY portion of the guide which shows how to edit the .vmdk descriptor file.

Keep in mind the VM was powered off the entire time.  So I skipped the first portion of that guide about shrinking the disk from Windows OS.  

I followed this guide exactly and successfully changed the flat-vmdk to show 80GB :)  But now I get those errors when trying either power on the VM or storage migrate it!!

Please help!
Avatar of JB Blanco
JB Blanco
Flag of United States of America image

ASKER

Before you ask, yes I made damn sure I modified the right .vmdk file!  

I am positive!
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is it too late for me to try and use Converter now in the state that its in?  I was also thinking of just undoing what I did and put the .vmdk descriptor file back the way it was.

And then if it powers on and functions normally then I will try to use Converter???
Is it too late for me to try and use Converter now in the state that its in?  I was also thinking of just undoing what I did and put the .vmdk descriptor file back the way it was.

Possibly.

And then if it powers on and functions normally then I will try to use Converter???

Possibly.

I would

1. Delete the failed attempt at your hack job, you got wrong.

2. Restore the backup, you took prior to fiddling with the files.

3. Use VMware Converter to shrink

4. Later practice on an example files and VMs which will not cause an issue.
Use VMware Converter to shrink


If I restore from backup from before I made any changes at all to the VM,  Then it wont matter for me to use converter correct?

Converter is just to shrink the vmdk.  correct?
If you restore from backup, you've got your original VM again, all working.

As your original is then 80GB, you can then extend to the correct size if that's what's required. (and expand).
If you restore from backup, you've got your original VM again, all working.

As your original is then 80GB, you can then extend to the correct size if that's what's required. (and expand).

Id rather not have to restore from backup and just undo the change and bring the Hard disk back to 228GB.  Yes the 228GB was a mistake, but I can always run converter and shrink it the supported way later.  right?
Not if you cannot start it, or Converter does not recognise it, because the damage has been done.

In that case, you need to go back and repeat all the calculations because something has gone wrong.

did you even keep a copy of the descriptor ?
I don't understand how this could get corrupt.  I even restored the copy .vmdk file I made before modifying anything and it just tells me "The virtual disk is either corrupted or not a supported format."  there has to be a way to UN-HACK the HACK
re-generate the flat vmdk.

Assume the flat file you modified is missing, and needs re-creating.

see here

https://kb.vmware.com/s/article/1002511