The specified virtual disk needs repair vmware - How to Fix
People create virtual machines for many reasons, but majorly for testing purposes. VMware is one of the most popular providers of virtualization tools that help PC users to create and host as many virtual machines as they want.
When you create a virtual machine using VMware tools, the VM’s data is saved on a VMFS volume of your physical hard drive as a VMDK file. You can as well refer to the VMFS volume as the VMware disk.
If you encounter the “VMware disk needs repair” error message while trying to launch your virtual machine, apparently, there’s an issue with the VMFS volume that contains your VM’s data. Interestingly, there are different ways to deal with this situation; this article explains them.
VMware Defragmentation Failed: “The Specified Virtual Disk Needs Repair”
Faced with the “The Specified Virtual Disk Needs Repair” error? As hinted earlier, this error indicated that the VMDK file – which is stored in the VMFS partition/volume on your actual hard drive – is corrupted or missing. So, to repair this, you need to use the backup VMDK file to create a new virtual disk or try to repair the corrupted VMDK file.
The reasons why the VMDK file may have corrupted include forced system shutdown, malware attack on the system, unfinished updates and upgrades, power surges leading to hard drive crashes, and many other possible reasons. Hereunder are the three ways you can get around this problem.
1. Repair the Workstation VMDK File using VMware vdiskmanager
If you’re running your virtual machines on VMware Workstation, there’s a built-in virtual disk manager (Vmware-vdiskmanager.exe) utility that can help you fix the most common VMDK file issues. Here’s how to go about launching and using the vmware-vdiskmanager.exe utility.
1. Launch Windows PowerShell (Admin) or Command Prompt (Admin)
2. Go to the VMware Workstation installation path; by default, it should be:
- C:\Program Files\VMware\VMware Workstation – for Windows XP/Vista/7&8 (32-bits)
- C:\Program Files (x86)\VMware\VMware Workstation - for Windows XP/Vista/7&8 (64-bits)
- C:\Program Files (x86)\VMware\VMware Workstation – for Windows Server 2008 R2
3. Download VMware Player from its official page
4. Now run vmware-vdiskmanager -R “path to the corrupted vmdk file”
- E.g., vmware-vdiskmanager -R “D:\VMs\Windows 8\faultyvirtualdisk.vmdk”
The –R command will automatically try to repair the indicated VMDK file, which should fix the problem for you. If you use VMware vSphere, this VDiskManager isn’t inclusive in your package; you have to try another way.
2. Use VMKFSTOOLS for ESXi Virtual Machines
Another way around this issue is to use the vmkfstools if your virtual machines are hosted on ESXi hosts. This utility tool is built into VMware ESXi for managing VMFS volumes, virtual disks, and storage devices. Interestingly, you can use this utility to carry out different storage operations, including attempting to fix a faulty VMDK file. Here’s how to use the vmkfstools utility to check and fix corrupted VMDK files of ESXi VMs.
- E.g., vmkfstools -x repair VMDK1.vmdk
VMDK1 should be replaced with the actual name of the VMDK files you want to repair.
3. Repair and Recover the VM from Backups
Not everyone is familiar with command-line commands, so here’s a GUI method of fixing a corrupt VMDK file to regain access to your VMs without dealing with CLI commands. This method means to recover the backup version of the failed, missing, or corrupt VMDK file, so you can use the backup copy to create a new VM with the same properties and data as the corrupted one.
Interestingly, this method works regardless of your VMware virtualization, too – whether it is VMware Workstation, ESXi, or Hyper-V. But for this method to work, it means you already have a backup file somewhere – just that maybe, it got lost, and you need to recover it. DiskInternals VMFS Recovery is a professional software that helps you back up VMFS volumes or restore files from VMFS volumes.
Recovering a backup using VMFS Recovery is easy and fast; download the software and install, launch it, select the disk with the VMFS volume, right-click on the disk, select “Create Disk Image,” and choose where to save the disk image. So, when next your VM fails to load, you simply load the backup (disk image) file and regain access to the VM. You may need to frequently run the backup to capture newer updates.
How to Repair VMware Virtual Hard Disk on Windows 10?
Using Windows 10? No problems; you can still repair your corrupt VMware virtual hard disks (VHDs) using VMWare vdiskmanager tool (download from the official website). The file comes in ZIP format, so you have to unzip it, rename it to vmware-vdiskmanager.exe, and copy it to the installation directory of your VMware Workstation (C:\Program Files\VMware\VMware Workstation or C:\Program Files (x86)\VMware\VMware Workstation).
Now, before you proceed, you should shut down all active virtual machines and, quit the workstation, then restart the windows. You also need “Admin” access on the computer system you’re using – so launch the command prompt as Admin and run this command:
vmware-vdiskmanager -R virtualdisk.vmdk
- Where virtualdisk.vmdk is the path to the virtual hard disk you’re facing issues with.
These are the possible ways to fix your faulty VMDK files and get your VMs to power again. DiskInternals VMFS Recovery is an advanced virtual disk recovery tool that helps you recover lost data from VMFS volume, as well as works to fix ESXi datastores and faulty or corrupt VMDK files. This software program is the favorite of IT experts and VM operations thanks to its intuitiveness and unmatched features.