Page 2 of 2

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 10:33
by loukingjr
dlharper wrote: All you need is a binary file viewer in the host. Use it to look at the whole .vdi file. Scan it through by eye until you find what looks like an MBR, and everything before this is the header.
Thank You. I finally found a Hex Editor that works with OSX 10.9. Now if I knew what the MBR was supposed to look like and what I am looking for in the header I'd be golden. :)

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 12:33
by mpack
loukingjr wrote:
mpack wrote:I would still check the VDI header.
The only way I can see doing that is to install clonevdi in my W7 guest, attach the 8.1 .vdi to the W7 guest as a secondary drive and look at it that way.
That would not work - the guest has no access to the VDI header, the guest can only access the virtual image. The guest can't even tell that it is a VDI, rather than VHD, raw, VMDK etc. The guest also can't tell if the disk is dynamic or fixed.

In principle you can use CloneVDI in a VM to access VDIs held in shared folders, but people in the past have reported problems with VMs accessing very large files using GA shared folders (not sure about true shares), particularly on OS X hosts. Naturally the file would also have to be available at the time - i.e. not already in use by a running VM.

You can also run CloneVDI on OS X under Wine. IMHO CloneVDI is a useful tool to have around, so I think this would be worth your while.

Finally, if you insist on using a hex editor then the relevant fields are at offsets 384 (0x180: nBlocksTotal), and 388 (0x184: nBlocksAllocated). Each field is 4 bytes, e.g. "CB 25 1F 00" should be read as 0x001F25CB. You are looking for nBlocksAllocated <= nBlocksTotal in a valid VDI.

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 14:13
by loukingjr
mpack wrote: You can also run CloneVDI on OS X under Wine. IMHO CloneVDI is a useful tool to have around, so I think this would be worth your while.

Finally, if you insist on using a hex editor then the relevant fields are at offsets 384 (0x180: nBlocksTotal), and 388 (0x184: nBlocksAllocated). Each field is 4 bytes, e.g. "CB 25 1F 00" should be read as 0x001F25CB. You are looking for nBlocksAllocated <= nBlocksTotal in a valid VDI.
thanks for the info mpack. I suppose I could install Wine then run Clone VDI.

To be perfectly honest, in 25 years I've never had to repair a corrupt disk. I've only had one, at least I think that was what happened, corrupt .vdi file. For what I do with VB it's quicker for me just to recreate a disk. But I'll take a look at it. You never know, I may learn something. :wink:

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 15:01
by loukingjr
well that was an adventure. Blocks Total = 40960. Blocks Allocated = 39799. BA<=BT. tada.

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 15:03
by mpack
Good. That proves that any file size discrepency must be related to how OS X reports file size or space used.

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 15:07
by loukingjr
mpack wrote:Good. That proves that any file size discrepency must be related to how OS X reports file size or space used.
seems so. as I mentioned, the guest runs fine. I was just curious about the size differences. btw, it's not easy finding a Wine bin for OSX so I just installed a trial of Crossover.

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 15:15
by mpack
From what previous Mac users have said, I was given to understand that Wine / WineBottler was readily available for OS X.

Re: (Resolved) Disk Size Discrepencies

Posted: 27. May 2014, 15:22
by loukingjr
mpack wrote:From what previous Mac users have said, I was given to understand that Wine / WineBottler was readily available for OS X.
yes and no. it's easy to find an older version. Not so easy to find a current or dev version. all's good though. I prefer Crossover anyway. They are basically a commercial version of Wine. They have some nice automated features to install Windows apps.