A critical error has occurred while reading/ writing to Hard Disk 0

203 users found this article helpful

Symptoms

While using the virtual machine I get the following error message:

Cause

This issue happens when Parallels Desktop cannot use the virtual machine drive to read data from it or write information into it. Most commonly it happens due to the following reasons:

1. Mac disk physical corruption.

2. Mac disk file system failure

Troubleshooting and possible resolution

In case file system got corrupted there is a chance to fix it the following way:

1. Boot your Mac to Recovery mode

2. Choose Disk Utility and run First Aid. 

This way there's a greater chance that First Aid algorithms will find the issue and fix it as the hard disk is locked for its needs only, in contrast to running First Aid in normal mode.

In case it didn't help, most likely the issue is caused by the hard disk corruption. The following part of the article will be devoted to it.

Analyzing dmesg log

To check the Mac disk for I/O (input/output) errors presence it's required to use the following Terminal command on the Mac side shortly after encountering the critical read/write error:

  1.  Launch Terminal (Finder > Applications > Utilities > Terminal).
  2.  Execute the following command:
sudo dmesg

NOTE: You will need to enter your Mac password to run the command. No symbols will be shown due to security considerations, so just hit the keys and use return/Enter.

If the output of sudo dmesg command contains I/O error, as the example below,

disk2: I/O error.
CoreStorageGroup::completeIORequest - error 0xe00002ca detected for LVG "Macintosh HD" (D41ACF9D-27F1-44D4-A4D4-B3ACE45334CF), pv 3E833260-3241-4375-BB0F-972C27A3C457, near LV byte offset = 2024465223680.
disk2: I/O error.
CoreStorageGroup::completeIORequest - error 0xe00002ca detected for LVG "Macintosh HD" (D41ACF9D-27F1-44D4-A4D4-B3ACE45334CF), pv 3E833260-3241-4375-BB0F-972C27A3C457, near LV byte offset = 2024465223680.
disk2: I/O error.

it means for sure that the disk could not be written or read -> in this case we strongly recommend to take your Mac to Apple service as this is a sign of severe disk corruption leading to absolute data loss. Don't forget to save dmesg.log to show it at the service.

Restoring virtual machine file permissions

Sometimes the virtual machine bundle or its inner files might get wrong permissions causing issues at startup. In order to set default permissions:

0. Make sure the virtual machine is shutdown

1. Open Terminal (Finder > Applications > Utilities > Terminal).

2. Start typing the following command but don't press Enter yet

chmod -RN 

3. Find the virtual machine file (right click on its name in Parallels Control Center and select Show in Finder)

4. Drag the virtual machine file to Terminal in order to enter the full path to it. Let's say, the virtual machine is called Windows 10.pvm and it's stored in Documents/Parallels folder. In this case the command will look like

chmod -RN /Users/your_user_name/Documents/Parallels/Windows\ 10.pvm

NOTE: make sure there's a space between -RN and the path to the file

In your case the command might slightly differ depending on the virtual machine name and location.

5. Hit return/Enter button to execute the command.

Checking S.M.A.R.T. status

If you have an SSD or Fusion drive in your Mac you should also check S.M.A.R.T.(Self-Monitoring, Analysis and Reporting Technology) status of this disk:

1. Open Disk Utility (Finder > Applications > Utilities > Disk Utility)

2. Click on the general disk name and check S.M.A.R.T. status.

3. Contact the nearest service center in case the status differs from Verified (e.g. Failing)

Checking ability to read the virtual machine file

As a general troubleshooting step it'll be useful to find out if the system can read the data from the virtual machine.

1. Open Terminal (Finder > Applications > Utilities > Terminal).

2. Start typing the following command but don't press Enter yet

find 

NOTE: there's a space after it

3. Find the virtual machine file (right click on its name in Parallels Control Center and select Show in Finder)

4. Drag the virtual machine file to Terminal in order to enter the full path to it. Then add the following:

-type f -exec dd if={} of=/dev/null \;

In the end the command should look approximately like this:

find ~/Documents/Parallels/Windows\ 10.pvm/ -type f -exec dd if={} of=/dev/null \;

5. Press return/Enter button and wait until the process is over (same string as when you just started Terminal with computer_name:~ user_name$ should be shown). In case you see errors, it means the data cannot be read from the virtual machine bundle: it might be stored on corrupted disk sectors, have wrong permissions, etc. Save the output as a text file, it will help to narrow down the issue to input error in case you contact Parallels support.

Running Windows virtual machine from the external hard drive

  1. In case of getting A critical error has occurred while reading/ writing to Hard Disk 0 error message when Windows is placed on the external drive, make sure the disk has not got any other S.M.A.R.T status than Verified.
    The drive should be visible in Disk Utility and be Mounted.
  2. If you can pass the error message and get into Windows, check your virtual hard disk for error messages.
    It can help repairing the corrupted blocks causing the error occurrence.
  3. If you cannot pass the error message as it pop ups constantly, create a new Windows machine for further troubleshooting.
    Shut down the created machine and connect the corrupted virtual hard drive from your primary machine to the new one as a second drive.
    Go to Windows File Explorer and confirm that the corrupted is present along with C:\ drive from the new machine, it usually has D:\ or E:\ letter assigned.
    Run check disk utility for this drive, make sure the correct disk assignment letter has been chosen.

 

 

 

Once the issue is fixed (with the help of Apple or not) you can recover the virtual machine from Time Machine or another backup:
1. In Time Machine it should be located in the same folder as the corrupted one - the .pvm file, most likely Windows 10.pvm
2. Put the recovered back-up copy to the same folder and double click it to bound it to Control Center.
 

Before you contact Apple support we recommend to follow the steps below that may help to recover your data from the virtual machine's hard drive:

1) Locate the .pvm bundle of the Virtual Machine on your Mac HD using Spotlight > right click on the found .pvm file and choose "Show package content";

2) Inside you will see an .hdd file -> right click on it -> open with Parallels Mounter. The virtual machine's hard drive will be mounted to your file system and should appear in Finder;

3) If a new drive appeared in Finder, open it and copy folders that you need to Macintosh HD step-by-step (not all folders at once).

Note: At this step some folders may fail to be copied. It means that they or their contents were corrupted. If you meet such a folder, open it and try to copy its contents the same way, step-by-step.

4) If no new drives appeared in Finder, it means the virtual machine's critical part was corrupted and there is no way to retrieve data from it using Parallels applications.

Note: Regardless of a troubleshooting outcome the issue is not Parallels Desktop related and there are no further steps to be taken from the Parallels side.

Was this article helpful?

Tell us how we can improve it.