Fusion

 View Only
  • 1.  forced fsck fails but vmware-vdiskmanager says disk is fine

    Posted Dec 06, 2008 06:35 AM

    I'm running Debian Etch Linux in a VM supplied by my employer. Recently I tried to delete a directory both from CLI and from GUI and VM Fusion 1.x would die, forcing me to abort the process. I eventually narrowed it down to the offending file and put it on a directory intending to just leave it there indefinitely. I attempted to run vmware-vdiskmanager but in Fusion 1.x, the -R repair option wasn't available.

    Today I had to restart my linux image and was told that the drive had been mounted 24 times without running fsck so a check was forced. It gets to exactly 21.7% in this check and fails in exactly the same way (see attached screenshots). I updated to Fusion 2.0.1 and ran vmware-vdiskmanager -R on it and it said: "No errors were found on the virtual disk, 'Other Linux 2.6.x kernel-000001.vmdk'." I ran a -d defrag which completed successfully but the problem still exists. I am unable to boot the image because of this problem.

    I thought perhaps I could use the new 2.0.1 feature and mount the drive on my Mac and delete the file from there and perhaps that would fix it. But if I try to mount the 00001.vmdk file, I get the error "Failed to mount partitions: The virtual disk does not have any partitions that the host system knows how to mount." If I try to mount the larger .vmdk file, I get the error "It is not safe to mount the virtual disk. It may be attached to a suspended or powered-on VM, or it may be inside a snapshot chain." (Maybe I'm not mounting them properly?)

    I'm attaching a clean (single attempt) vmware.log file below. If there isn't a good way to fix my current VM, is it possible to use vmware-vdiskmanager to copy the contents of this image to a new image somehow that might not have the problem? I have a time machine backup that I can revert to, however I can't go back very far or my work will be out of date. And while going to the backup would get me the ability to run the image because I can resume, I am likely to be in the same boat next time I need to restart.

    Michael

    Attachment(s)

    log
    vmware.log   90 KB 1 version


  • 2.  RE: forced fsck fails but vmware-vdiskmanager says disk is fine
    Best Answer

    Posted Dec 06, 2008 10:32 AM

    fsck and the vmware-vdiskmanager check work on different layers. vmware-vdiskmanager checks that Fusion's representation of the virtual disk is consistent; fsck checks that the guest filesystem is consistent. It's like the difference between checking a drive for S.M.A.R.T. errors and doing fsck.

    The screenshots may indicate a bad block on the physical hard drive - if the error was confined to the virtual machine, it should not cause Fusion to throw an error. If you look at the end of the log, Fusion seems to be failing to read the same address and eventually gives up. Since we use standard APIs to read/write files, this is unlikely to be a problem with Fusion and rather a problem with the hardware or the host filesystem.

    I thought perhaps I could use the new 2.0.1 feature and mount the drive on my Mac and delete the file from there and perhaps that would fix it. But if I try to mount the 00001.vmdk file, I get the error "Failed to mount partitions: The virtual disk does not have any partitions that the host system knows how to mount." If I try to mount the larger .vmdk file, I get the error "It is not safe to mount the virtual disk. It may be attached to a suspended or powered-on VM, or it may be inside a snapshot chain."

    The larger .vmdk file is indeed inside a snapshot chain - the 00001,vmdk file is a snapshot and depends on the original. Since you're using a Linux guest, it probably has an ext2 or ext3 filesystem. Unfortunately, OS X does not understand this, so even though Fusion can go "here's a disk", OS X stares at it blankly. There's an experimental ext2 filesystem plugin which would make this work, but I hear it has stability issues.

    I think your best bet is to either override the fsck check (not sure if you can do this, but I would naively suspect you can) or boot from some other media that can recognize the filesystem (either a live CD or create a new virtual machine and attach the existing vmdk - if you do the latter, make sure to use the child -00001.vmdk, not the base disk).



  • 3.  RE: forced fsck fails but vmware-vdiskmanager says disk is fine

    Posted Dec 07, 2008 07:11 PM

    You were right. A Disk Utility verify on the hard drive failed. I used Disk Warrior 4.1 to rebuild the directory which seemed to correct the problems Disk Utility was seeing. It didn't actually fix the VM image, however I restored from the last backup and that copy worked fine. So all is well again. Thanks for the quick response!

    Michael