Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Repairing a sparse virtual disk in Fusion (1023888)

Symptoms

  • The virtual machine fails to start after a forced Mac shutdown.
  • The virtual machine does not boot up after a crash.
  • When starting the virtual machine, you see the error:

    Operation on file failed. If the file resides on a remote file system, please make sure your network connection and the server where this disk resides are functioning properly.

  • When starting the virtual machine, you see the error:

    Cannot open the disk 'path_to_virtual_machine /virtual_disk.vmdk' or one of the snapshot disks it depends on. Reason: The specified virtual disk needs repair.

  • When trying to mount the virtual disk with VMDKMounter, you see the error:

    There is a problem trying to mount the virtual disk.

  • When trying to repair the virtual disk using vmware-vdiskmanager, you see the error:

    The virtual disk is corrupted but the repair process has failed.

  • When starting the virtual machine, you see the error:

    "Unable to delete snapshot" virtual disk needs repair

Purpose

This article describes the steps to repair a sparse virtual disk. You cannot repair a pre-allocated virtual disk. To determine if you have a sparse disk or a pre-allocated disk, see Making a Fusion virtual disk pre-allocated or sparse (1021565).

Note: Not all corrupted virtual disks can be repaired. Power outages, force-quitting Fusion, and powering off the Mac (rather than shutting it down) might cause unrepairable damage to a virtual machine. Bad sectors on a physical hard disk or a failing hard drive can also cause damage to a virtual machine by corrupting the virtual disk.

Resolution

To repair a virtual disk:

Note: If you are using Fusion 3.1.0, you must obtain the correct version of the utility before proceeding with the repair. For more information, see Repairing a virtual disk in Fusion 3.1 and Workstation 7.1 (1023856).

  1. Ensure that your virtual machine is shut down and not suspended. If your virtual machine is suspended, see Fixing an unexpected signal 10 error in Fusion (1018757).
  2. Open Finder, navigate to /Applications/Utilities, and open Terminal.
  3. Copy and paste this line into the Terminal window:

    • If you are using Fusion 4.x or above:

      sudo /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -R

    • If you are using Fusion 3 or below:

      sudo /Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager -R

    Note: If there is no space at the end of the command, press now. Also, do not press Enter now because the command is not yet complete.

  4. In a new Finder window, locate your virtual machine bundle. For more information, see Locating the virtual machine bundle in VMware Fusion (1007599).
  5. Right-click the virtual machine bundle and select Show Package Contents.
  6. Locate the .vmdk file that was in the error message and drag it into the Terminal window. This copies the file location into the command that has already been started. The command in Terminal looks similar to this:

    • If you are using Fusion 4.x or above:

      sudo /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -R /Users/yourusername/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP.vmdk

    • If you are using Fusion 3 or below:

      sudo /Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager -R /Users/yourusername/Documents/Virtual\ Machines.localized/Windows\ XP.vmwarevm/Windows\ XP.vmdk

  7. Enter the administrator password when prompted, then press Enter.

    Note
    : For security reasons, the typed password is not displayed. You do not need to enter your password again, for the next five minutes.

  8. Wait for the repair to complete. A message appears indicating whether the virtual disk repair is successful. After the command has run, you see one of these messages:

    • No issues: No errors were found on the virtual disk, <location of disk>
    • Issue repaired: The virtual disk, <path to disk>, was corrupted and has been successfully repaired.
    • Can't repair: The virtual disk, <path to disk>, is corrupted but the repair process has failed.
    • Can't repair: No result is displayed as the disk file damage is such as it has caused vdiskmanager to crash.

      Note: If you have any snapshots, you must repeat Steps 6 and7 for each main disk (the base disk and the main snapshot disks). For more information, see Contents of the virtual machine bundle in Fusion (1021016).

  9. To exit from Terminal, go to Terminal > Quit Terminal.

If the repair is successful, open Fusion and start the virtual machine. If the repair fails, you need to restore from a backup of your virtual machine or create a new virtual machine. The steps to create a new virtual machine can be found in our video walk-through VMware Fusion 3 Install Microsoft Windows on Your Mac.

Tags

corrupt-virtual-disk virtual-disk

See Also

Update History

07/14/2010 - Updated command to run it as the superuser. 12/15/2010 - Expanded on sources of virtual disk corruption. 2/1/2012 - Edited to clarify this is for sparse disks only. 3/15/2012 - Added command output information. 08/23/2012 - Added Fusion 5.x to Product Versions. 09/09/2013 - Added VMware Fusion 6.x to Product Versions.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 26 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 26 Ratings
Actions
KB: