VMware Cloud Community
Znook
Contributor
Contributor
Jump to solution

Virtual Disk became a File.

During some housekeeping I stupidly renamed a VM's virtual disk in the datastore browser in vSphere Client and it now shows as type: File. This now means the VM won't start. Any suggestions on how I can re-associate the file as a virtual disk.

I can SSH into the server if needs be.

Thanks in advance for any help with getting this sorted out.

Znook

0 Kudos
1 Solution

Accepted Solutions
7 Replies
blabarbera
Enthusiast
Enthusiast
Jump to solution

Are you getting a specific error message when you attempt to start the VM?

0 Kudos
rcporto
Leadership
Leadership
Jump to solution

Did you remove the extension .vmdk ? If yes, just add the extension .vmdk again.

If possible, post the screenshot of files of datastore or a output of a "ls -l" from the SSH.

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

As per as know we can not rename VMDK from VI client. Rename option should be grayed out.

Can you let  us know what exactly you did? Also plz do provide details that "Richardson" has requested.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

0 Kudos
Znook
Contributor
Contributor
Jump to solution

@blabarbera The VM once started stops with, "The file is not a virtual disk' error. Just to clarify it should be the 100GB C drive of the Windows VM.

@Richardson Porto I would have to assume the extension changed when I renamed the disk (right-click) in the vSphere datastore browser, though that really should not have happened.

If I use rename again in the datastore browser to add the extension back it does appears to show the file as now having a vmdk extension (see photo below) but the Type still shows as File. Even if I go in via SSH and do the same (to remove any possibility it's a datastore browser renaming issue) it still shows as Type: File 😞

For what it's worth in the VM's Properties window it shows the entry for "Hard disk 1" as having a provisioned size of 0. I don't want to change it to 100GB just in case it then irreversibly damages the file (it's too big to do a back-up of to try this out). I feel it's something simple that needs setting to tell vSphere it's a virtual disk but I'm flummoxed on what it is.

vmdk issue.png

Anyway thanks for the input guys, much appreciated.

0 Kudos
blabarbera
Enthusiast
Enthusiast
Jump to solution

0 Kudos
Znook
Contributor
Contributor
Jump to solution

Whoa, that does sound like the issue I'm having. Thanks @blabarbera! Unfortunately it will have to wait till later before I can get the chance to peruse those docs and give any suggestion/s a try. My best, Znook.

0 Kudos
Znook
Contributor
Contributor
Jump to solution

Only just spotted @vickvision2020's reply - apologies. In the image I posted if I right-click 'Windows 7.vmdk' in the Name column the option to rename is available.

0 Kudos