Friday, May 28, 2010

Common Parallels Issues

From reading so many tech support incidences, one of the most common issues that I've seen reported and asked about is in regards to the DiskDescriptor.xml file that's contained within your Virtual Machine folder structure.

While in my case I didn't find corruption in there, this file does hold the key to successfully launching and running your VM within Parallels.

One small change renders your VM useless.

Many users have attempted (and some successfully) to re-create the corrupted image though Parallels never lays out exactly what everything means and it's importance to your VM, it does contain the references to your snapshot images, which is the parent of which, etc.

If your VM won't boot up, try looking at your DiskDescriptor.xml file (open your .pvs file, then open the .hdd file using right-click 'Show Package Contents')

Here's a sample:


<Parallels_disk_image Version="1.0" >
    <Disk_Parameters>
        <Disk_size>134218224Disk_size>
        <Cylinders>133153Cylinders>
        <Heads>16Heads>
        <Sectors>63Sectors>
        <Padding>0Padding>
        <Miscellaneous>
            <CompatLevel>level2CompatLevel>
            <Bootable>1Bootable>
            <GuestToolsVersion>5.0.9344GuestToolsVersion>
        Miscellaneous>
    Disk_Parameters>
    <StorageData>
        <Storage>
            <Start>0Start>
            <End>134218224End>
            <Blocksize>504Blocksize>
            <Image>
                <GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}GUID>
                <Type>CompressedType>
                <Flags/>
                <File>Windows 7-0.hdd.0.{5fbaabe3-6958-40ff-92a7-860e329aab41}.hdsFile>
            Image>
        Storage>
    StorageData>
    <Snapshots>
        <Shot>
            <GUID>{5fbaabe3-6958-40ff-92a7-860e329aab41}GUID>
            <ParentGUID>{00000000-0000-0000-0000-000000000000}ParentGUID>
        Shot>
    Snapshots>
Parallels_disk_image>


If you have more than one snapshot, you'll find additional entries as well as additional entries.




Tools to help recovering your Parallels data

I'm listing the tools I've tried, some which didn't work for me, but depending on the exact problem you're experiencing, let's hope one of them is the magic bullet for you:

1. Parallels Image Tool - Included with Parallels.  Launch it from Applications/Parallels.  Let's you merge images/snapshots, alter your virtual drive image etc.   My experience: Didn't do a thing for me, nor did it report errors.  Always said it merged all snapshots (within like a second).

2. Parallels Mounter - If you right click on an .hdd file in your Parallels VM folder, you can mount one of your drive images and browse it within Finder just like any other drive/folder.    This may work for you if for example you can't boot your VM.  You still might be able to get at the files within it.   Worked a little bit for me, but overall left me unsatisfied.   It failed to open any snapshot image and I knew with certainty that they weren't all corrupt.

3. PhotoRec - Orginally a tool for recovering photos from corrupted drives, PhotoRec at http://www.cgsecurity.org/wiki/PhotoRec was my magic bullet.    It takes a little bit of work to use but it was the only tool I found that opened up one of my most valuable Parallels snapshot (.hds files) and pulled out all of the files from it and conveniently put them into another folder on my Mac.     And it's FREE!   One caveat, not all of the names of the files that it recovered were recognizable, but it found everything that I was looking for and put my mind at ease.

4. R-Studio - http://www.r-studio.com/ - Using R-Studio in demo mode, I was able to open up my Parallels snapshot images and have it scan to find many files.   Though the trial mode was limited to extracting 64K sized files, many of the files that I was able to extract just to see if it was working were all jumbled.   Many text files had no meaningful content, some images I found were OK, it was hit and miss, and for $80, I wasn't entirely confident in it's ability to be able to restore many of the files I was looking for.   I give them credit for having a solution that was at least able to read the image though.  Parallels support, when I was on the phone with them, after asking many times, said there is no way to read the data other than the basic utilities you're provided with in the installation of Parallels.


This blog is a work in progress and I'm going to be filling it in with more detail as time allows.

In the mean time if you have any questions, ask and I'll dig up information which might be able to help you.

-John

Thursday, May 27, 2010

Important Parallels Knowledge Base Articles

While I have this in mind, I thought I'd point you to a few of the most commonly referenced solutions on the Parallels forums.


One or more of these just might help you and are worth trying out if the issues sound similar to the ones you're experiencing.

Error message "Hdd file is used by another application".
After you restart your Mac, Parallels Desktop does not start the VM, saying that "Parallels Desktop is unable to access the virtual hard disk image file winxp.hdd. The file is used by other application".



Cannot start VM. Receive "Unable to connect Hard Disk " error. 
You cannot start virtual machine because you see the following message "Unable to connect to Hard Disk"

Step 2: Understanding the files that make up your Parallels VM

Remember, this is coming not from an engineer at Parallels, just a techie that spent way too much time trying to understand all of this.

This is all based on Parallels 5 and I believe it's all quite similar for Version 4

Let's say you have a Windows 7 VM and it's located in your Documents/Parallels/Windows 7.pvm folder.

Within this folder you'll find:

config.pvs - contains the settings for your virtual machine.  XML format that you can view in a text editor, most of the things you change through the VM settings are stored in this file.   If you're curious, go ahead and open it to see what's in there.

floppy.fdd - emulated store for floppy drives

parallels.log - log file for viewing what's going on in Parallels.  If you're experiencing errors, you might find a clue in here as to what's going wrong.

Snapshots folder - Contains memory images (.mem files), Screen shot at the time of capture (.png files), Configuration file (.pvc files, which you can view with TextEdit) and .sav files (contains state of open apps, etc at snapshot time, though I don't know all of the details exactly.)

For each snapshot, there will be four files, each named with the GUID (globally unique ID) of the snapshot.

Snapshots.xml - Ties together the order of the snapshots and is used in conjunction with the Parallels snapshot manager.  (One of the most unreliable parts of Parallels in my opinion)

unattended.fdd - emulated store for unattended installs from what I've read, I honestly didn't care as I don't think it had anything to do with repairing a broken VM.   I may be wrong though.

.hdd - Container for images that represent your Parallels virtual machine hard disk.  Right click and use "Show Package Contents" to see what's in there.  (I'll detail the files below)

.hdd.drh

Step 1: BACKUP YOUR DATA NOW!

No matter what state your Parallels VM is in, back it up right NOW.

Shut down Parallels if it's running and copy the entire content of Documents/Parallels (this is the typical location of your Parallels virtual machine files, if not find them by searching for .pvs files)  off to an external drive.   Leave it alone.  You might need to use it a few times if you mess things up.

The .pvs files you find are actually directory objects that contain the files for your virtual machine.  If you want to see what's inside, right-click and select "Show Package Contents".  You'll find your snapshot data there (some of it at least) as well as the virtual hard drive image (.hdd file).  You can "Show Package Contents" of the .hdd file as well.  There you'll find more files, the disk drive configuration file and more.  I'll get to what's what in a moment.

Well, did you back it up yet?   Yea, copying 50, 100, 200 GB files is no fun, just do it.   Go have a beer while you wait.

Panic.

Is that the state of mind you're in right now?
 
I've been there.  With my postings here I'm hoping that I might point you in the right direction to either getting your Parallels Virtual Machine up and running again or recover data from your VM, hard drive image and/or snapshot files.

I had my Macbook Pro 17 crash on me.   Still under warranty, Apple replaced the drive and attempted to recover most of my files.  To their credit, they did an amazing job, however my Parallels VM was corrupt and beyond even the repair of the Parallels support staff which spent well over three hours remotely trying to fix it.

Did I have a backup?  Um, not anything recent.  I had stopped backing up my VM because I was running out of space on my backup drive and well, I learned my lesson good that storage at any price is always cheaper than trying to recover data.

I've Googled, searched, tried every approach there was to get my VM up and running with the latest image of my VM, but it was all for nothing.

Then, nearly two weeks after trying everything (I really only cared about all of the data files that were on my latest Snapshot), when I was ready to throw in the towel and just give up, I found a solution that at least got back most of my data. 

While I hope to myself never have to repeat this again (I have multiple external backups now in addition to Time Machine/Time Capsule), I hope that I can help you if you're in the same unfortunately situation that I was in.

-John