none
win7 virtual pc - attach existing vhd - error "Cannot attach the virtual hard disk to the virtual machine. Check the values provided and try again"

    Question

  • I created a VHD using Norton Ghost, from a 136 GB disk.

    I attempted to use the VHD in Windows Virtual PC, but got the error:
    "Cannot attach the virtual hard disk to the virtual machine. Check the values provided and try again"

    I then used Paragon Partition manager to shrink the partition down to 85GB, having read that this could be caused because there is a size limit of 127GB on a volume.  (note that the virtual disk is still 136GB - I cant figfure out how to  remove the unallocated 50+ gb at the end).

    Anyway, I try to use the drive in virtual PC again and get the same issue.

    I wish it gave some more clues as to what is wrong.

    I dont have any anti virus as yet, so its not the kasperski issue that some have had!

    I need the VHD as it was the Vista system that existed before my new Windows 7 install splatted over it!


    this is only my day job!!
    Monday, October 26, 2009 10:26 PM

All replies

  • I have the same problem, except I used sysinternals disk2vhd utility to create my vhd file. It is only 62GB in size, so the 127GB limit should not apply.

    I think I have the solution:
    The current limitation of 127GB does apply in my case. The disk partition I created an image from was only 62GB in size, but the total disk size this partition was on, was 300GB. The image reflected this, and thus the image could not start.

    I've found a small utility which I have yet to try out (need an external HD to test this on because my local drive is not large enough to handle another 300GB to work with). The utility can be downloaded here: http://vmtoolkit.com/files/folders/converters/entry87.aspx
    It promices to resize the VHD disk to a more manageable size.

    I will try this later today. Hope this solves both mine and your problem.
    • Proposed as answer by Greffin Wednesday, October 28, 2009 10:06 AM
    Wednesday, October 28, 2009 8:56 AM
  • Yes, the size is indeed the reason, even if you had a 136gb or 300gb VHD that was completely empty, WinVPC can't mount it due its total size.  VPC looks at the disk size, not the partition, so resizing the partition won't help in this case.
    VHD Resizer will resize the VHD, but you might need to do a repair install to get it to boot.
    Make sure you have enough disk space, since the Resizer basically copies the original VHD to a smaller one.

    • Edited by Steve JainMVP Wednesday, October 28, 2009 8:59 PM grammar
    Wednesday, October 28, 2009 7:46 PM
  • So I was hoping this was my issue as well.  Having same problem with .vhd created from Disk2Vhd.  Problem is tool won't let me resize below 232 GB even though .vhd created is physically only 98 GB.

    Other ideas?
    Wednesday, October 28, 2009 11:06 PM
  • See the post from Greffin above for the VHD resizer link.

    Wednesday, October 28, 2009 11:16 PM
  • Tried resizer but as mentioned above when running it has minimum size of 232 GB with maximum of 4000GB.  So won't let me resize smaller.
    Thursday, October 29, 2009 3:19 AM
  • Tried resizer but as mentioned above when running it has minimum size of 232 GB with maximum of 4000GB.  So won't let me resize smaller.
    I believe the cause is that you have a virtual partition size of 232GB in your VDH file.  Attached the VDH file in W7's disc manager, and then use your favorite partition resizer program like Partition Magic or Partition Master to reduce your partition size(s) to under 127GB (total).  After you finish that, VDH Resizer will offer a minimum size equal to the new smaller partition size.
     
    Basically, VDH Resize can't reduce the virtual disc size to anything less than the existing virtual partition size(s).
    Sunday, December 13, 2009 11:57 AM
  • I am having similar issues.  Some additional notes

    My VHD image when loaded in disk manager is 93 GB,  I installed Windows 7 on a PC and then installed Virtual PC 2007 SP1 and was able to use the VHD.  I then took a copy and attached it to a Windows 2008 HyperV server and had no problems.   I try and use it on a windows 7 ultimate machine with Virtal PC for Windows 7 and recieve the Cannot attach ... error.  In the process of shinking the drive 78 GB to see what happens

    • Proposed as answer by BCADY Sunday, January 16, 2011 4:13 AM
    Wednesday, March 31, 2010 1:20 AM
  • I am having similar issues.  Some additional notes

    My VHD image when loaded in disk manager is 93 GB,  I installed Windows 7 on a PC and then installed Virtual PC 2007 SP1 and was able to use the VHD.  I then took a copy and attached it to a Windows 2008 HyperV server and had no problems.   I try and use it on a windows 7 ultimate machine with Virtal PC for Windows 7 and recieve the Cannot attach ... error.  In the process of shinking the drive 78 GB to see what happens


    Perhaps your image is of a 64 bit operating system.  Virtal PC for Windows 7 will not attach a 64 bit O/S at this time.  Otherwise KewlDawg has the correct procedure.  File size is not a parameter.  Partition size must first be reduced < 127 GB then VHD Resizer will shrink the drive size to <127 GB.

     

    I had a 64 bit O/S and had to use Virtualbox.  It will attach .VHD file with a 64 bit O/S.

    Sunday, June 27, 2010 11:10 AM
  • I am trying to convert a XP SP3 32 bit OS with a 60 GB partition to a Virtual Machine.  I use Disk2Vhd (1.63) to create the VHD file (12 GB) on an external hard drive.  

    Then I copy the VHD to my Windows 7 64 bit os and try to create a virtual machine using the existing VHD file.  I get the "Cannot attach the virtual hard disk to the virtual machine. Check the values provided and try again" error.

    Does anyone no how to troubleshoot this?

    Thursday, January 13, 2011 10:55 PM
  • I just realize that even tho the partition is only 60 GB, the physical drive the partition is on is 500 GB.  The Disk2VHD tool creates a VHD file that contains the 60 GB partition as well as the 400+ GB of unallocated disk space. 

    How do I create a VHD file containing just the 60 GB partition?

    Friday, January 14, 2011 4:08 PM
  • Have you tried resizing the VHD?  I think you'll still hit some issues even if you're able to just create a new VHD from the partition.  I think there will be missing information.

    If you have some kind of disk cloning tool its possible you could image it and resize the 500GB drive to 127GB.

     

    Friday, January 14, 2011 7:22 PM
  • Hi David,

     

    I have the same issue. Were you able to find any solution?

    Cheers,

    Alex

     

    • Proposed as answer by R Hemes Monday, October 10, 2011 11:40 AM
    Tuesday, February 01, 2011 12:52 PM
  • Virtual Hard Disks  must exist on an NTFS volume.

     

    Monday, October 10, 2011 11:41 AM
  • I had a similar problem. I resolved it by uninstalling and reinstalling Windows Virtual PC. Thought I'd post this in case it helps anyone else.
    Monday, January 23, 2012 2:29 PM
  • It doesn't work, I couldn't reduce the size of the disk.
    Saturday, March 03, 2012 11:45 AM
  • I've had the same problem, but was able to resolve by using Oracle VirtualBox to run the VM. 

    I had use the Microsoft Sysinternals Disk2vhd to create the image then use virtualbox to open the vhd.  Just had to select the correct Nic to get xp to autoload the driver.

    Wednesday, March 28, 2012 4:07 PM
  • I have hit the same problem, the original XP machine I had was 32GB (on disk) and after compaction it came up as 28GB.

    When i had a closer look at the computer (hard disk settings) in virtual PC, it showed as

    In order to use the disk, I have converted the disk to a fixed disk (as opposed to dynamic), which will reset the HDD size, and then convert back to Dynamic (without the sata voluyme size).

    It would be good if the disk2vhd application did this, as the process takes a rather long time even with 8 cores and 8gb ram working on it.

    • Proposed as answer by HaydnWVN Friday, April 26, 2013 10:09 AM
    Tuesday, June 19, 2012 2:50 AM
  • Can you please let me know how you uninstalled Windows Virtual PC? It downloaded as a patch and does not appear as a separate entry in 'Remove programs'. Thanks, Venki
    Wednesday, September 19, 2012 10:35 PM
  • Windows VPC is a feature, not a program, remove it from the Windows features section.

    Honestly, I really don't see how removing and reinstalling WVPC will help with a VHD that is too large.  After an uninstall/reinstall if your VHD is larger than 127GB it still won't mount.

    Wednesday, September 19, 2012 10:44 PM
  • I have hit the same problem, the original XP machine I had was 32GB (on disk) and after compaction it came up as 28GB.

    When i had a closer look at the computer (hard disk settings) in virtual PC, it showed as

    In order to use the disk, I have converted the disk to a fixed disk (as opposed to dynamic), which will reset the HDD size, and then convert back to Dynamic (without the sata voluyme size).

    It would be good if the disk2vhd application did this, as the process takes a rather long time even with 8 cores and 8gb ram working on it.

    This didn't work for me, but I've got problems with my VHD anyways... A great tip if you have the option, much quicker than using a Partitioning program.

    You can also use the 'Shrink Volume' option within Disk Management (right click on the mount point).

    The process takes a long time as it's limited by the BUS you're using, having an 16 core processor with 32GB RAM will still take a long time to resize a 150GB partition on a 5400 RPM HDD if its attached to a slow SATA/3gbs interface. Attaching a faster drive (SSD) to a faster interface (SATA2) will give you the best speeds possible.


    • Edited by HaydnWVN Friday, April 26, 2013 11:03 AM
    Friday, April 26, 2013 10:18 AM
  • Right click on VHD mounted in Disk Manager and select "Shrink Volume"


    ¯\_(ツ)_/¯

    Monday, May 20, 2013 6:13 AM
  • I wanted to do this on a 250GB drive which of course wouldn't work due to this stupid limit, even though I was only using 20GB of the drive.
    My work around was to clone the disk onto an old 80GB I had laying around using True Image which automatically resized the partition to fit.
    I booted up with that, and then ran Disk2VHD.

    The main problem I have with this is that even when Windows 7 was released, you couldn't even buy hard drives small enough for this to work, and very few people partition up drives these days.  So why have they left a limit in that will prevent 90% or more using the tool?
    Most SSD's are small enough (I tried that first), but this system was old enough not to have AHCI mode in the bios and the drive wouldn't boot.


    • Edited by CreepyD Tuesday, May 21, 2013 11:17 AM
    Tuesday, May 21, 2013 11:17 AM
  • I wanted to do this on a 250GB drive which of course wouldn't work due to this stupid limit, even though I was only using 20GB of the drive.
    My work around was to clone the disk onto an old 80GB I had laying around using True Image which automatically resized the partition to fit.
    I booted up with that, and then ran Disk2VHD.

    The main problem I have with this is that even when Windows 7 was released, you couldn't even buy hard drives small enough for this to work, and very few people partition up drives these days.  So why have they left a limit in that will prevent 90% or more using the tool?
    Most SSD's are small enough (I tried that first), but this system was old enough not to have AHCI mode in the bios and the drive wouldn't boot.



    The limitations derive from the technology that was in use when the applicable software were written.  It would require a major revision of that applicable software to overcome the limitations.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”


    • Edited by Rick Dee Tuesday, May 21, 2013 4:09 PM
    Tuesday, May 21, 2013 4:08 PM