Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming not supported for stream optimized images #34

Open
APriestman opened this issue Jul 30, 2024 · 0 comments
Open

Renaming not supported for stream optimized images #34

APriestman opened this issue Jul 30, 2024 · 0 comments

Comments

@APriestman
Copy link

This is likely the same issue from #30 .

We've been running into a lot of vmdks lately that give errors similar to this:

>mmls -i vmdk -v "r:\work\images\test.vmdk"
libbfio_file_io_handle_open: unable to open file: \\?\R:\work\images\generated-stream.vmdk.
libbfio_handle_open: unable to open handle.
libvmdk_handle_open_extent_data_file_wide: unable to open file IO handle.
libvmdk_handle_open_extent_data_files: unable to open extent data file: r:\work\images\generated-stream.vmdk.))

>vmdkinfo.exe "r:\work\images\test.vmdk"
vmdkinfo 20240529

VMware Virtual Disk (VMDK) information:
        Disk type                       : Stream optimized
        Media size                      : 1.0 GiB (1073741824 bytes)
        Content identifier              : 0x70b22f98
        Parent content identifier       : 0xffffffff
        Number of extents               : 1

Extent: 1
        Filename                        : generated-stream.vmdk
        Type                            : Sparse
        Start offset                    : 0
        Size                            : 1.0 GiB (1073741824 bytes)

The problem appears to be that the file has been renamed (possibly by the tool that created it). If we
rename the vmdk to "generated-stream.vmdk" then it works properly. Poking around, we found that there's code here

if( internal_handle->disk_type == LIBVMDK_DISK_TYPE_MONOLITHIC_SPARSE )

to handle this case for renamed monolithic sparse vmdks. It appears the original file name is used if the one from the extent is not found. Changing this code to also run on the LIBVMDK_DISK_TYPE_STREAM_OPTIMIZED type allows our problem vmdks to be correctly opened.

If you would like a stream optimized vmdk for testing let me know and we can supply one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant