Ok, I’ve been playing more and more with VMware lately. All of it personal, because the work opportunities just haven’t really presented themselves.
In relocating one of my “production” servers to the Fibre array I purchased recently, I ran into a problem. I realized that I was doing it wrong and tried to cancel out of a disk move.
Every vmware vmfs disk is made up of two parts. The actual virtual disk is contained in a file ending in “-flat.vmdk” then there is a header file that is named the same way, minus the “-flat”.
In my particular mistake somehow the -flat file got moved but the header file didn’t. So when I went to re-mount the disk under the VM, it was just gone.
To give you an idea of the level of panic that was going on, the name of the disk that was lost was “finance.vmdk”. Yes, this is the root disk of the server that runs my accounting package for work. Not a happy time for me”
I played with it, I scoured the vmfs volumes to ensure that it didn’t get redirected to the wrong lun, I searched VMWare’s knowledge base (a useless endeavor) and was getting ready to rebuild the server when I had an idea.
I renamed the remaining flat file to “finance-temp-flat.vmdk” and went into the console and created a new disk of exactly the same size. I then deleted the -flat file that was created, and renamed ‘finance-temp-flat.vmdk” to “finance-flat.vmdk” .
I restarted the virtual machine, and lo and behold, it booted without effort.
I then immediately shut it down and backed it up.
I then exhaled.