<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Can you guys add the following code to function VDCopy() in VBoxHDD.cpp? right before VDCreateBase() is called. </DIV>
<DIV> </DIV>
<DIV>It resets the geometry if cSectors > 63, VHD disk somehow has more than 63 sectors.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>    /* vmlite, fix converting error from VHD */<BR>    if (PCHSGeometryFrom.cHeads > 16 || PCHSGeometryFrom.cSectors > 63)<BR>    {<BR>     Assert(RT_MIN(cbSize / 512 / 16 / 63, 16383) -<BR>        (unsigned int)RT_MIN(cbSize / 512 / 16 / 63, 16383) == 0);  <BR>     PCHSGeometryFrom.cCylinders = (unsigned int)RT_MIN(cbSize / 512 / 16 / 63, 16383);<BR>     PCHSGeometryFrom.cHeads = 16;<BR>     PCHSGeometryFrom.cSectors = 63;<BR>    }<BR>    /* vmlite */</DIV>
<DIV>                rc = VDCreateBase(pDiskTo, pszBackend, pszFilename, cbSize,<BR>                                  uImageFlags, szComment,<BR>                                  &PCHSGeometryFrom, &LCHSGeometryFrom,<BR>                                  NULL, uOpenFlagsFrom & ~VD_OPEN_FLAGS_READONLY, NULL,
 NULL);<BR>                if (RT_SUCCESS(rc) && !RTUuidIsNull(&ImageUuid))<BR>                     pDiskTo->pLast->Backend->pfnSetUuid(pDiskTo->pLast->pvBackendData, &ImageUuid);<BR>                if (RT_SUCCESS(rc) && !RTUuidIsNull(&ParentUuid))<BR>                     pDiskTo->pLast->Backend->pfnSetParentUuid(pDiskTo->pLast->pvBackendData, &ParentUuid);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>- Huihong</DIV></td></tr></table>