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

Why can't open virtual disk file under linux? #257

Open
U626C opened this issue Jun 3, 2022 · 2 comments
Open

Why can't open virtual disk file under linux? #257

U626C opened this issue Jun 3, 2022 · 2 comments

Comments

@U626C
Copy link

U626C commented Jun 3, 2022

When I use the following code
VirtualDisk vhdx = VirtualDisk.OpenDisk("/ext.vmdk", FileAccess.Read)
I have
Unhandled Exception: System.IO.FileNotFoundException: Unable to parse path
But the virtual disk exists and has permissions

@henrikstengaard
Copy link

henrikstengaard commented Jun 13, 2022

I had the exact same issue opening existing virtual disks .vhd on both Mac os and linux and discovered the issue is related to a combine path method that always use backslash instead of environment path separator.

Creating virtual disks worked fine, but not open.

I have created a fork, fixed the issue and build my own nuget packages. Not sure what's the best way to push my changes as i had to exclude 2 msbuild tasks projects due to net framework 4.0 dependencies.

Latest commit is about a year old, so I wonder how active this is.

I could publish my own packages on my fork, but I would prefer a pull request and merge with the fix.

@LTRData
Copy link

LTRData commented Jun 13, 2022

Unfortunately, this repo seems to not be that active nowadays. I made a fork with lots of fixes like this one, performance improvements, bugfixes in many different places, async and Span support for streams and buffers, enumerating methods instead of arrays etc that I use in some projects. It targets net46, net48, netstandard2.0, netstandard2.1 and net6.0.
https://github.com/LTRData/DiscUtils/
It has some breaking interface and base class changes compared to this repo, though, so it might need some refactoring work to get it working with existing projects. Should be pretty straight-forward though, I think.

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

3 participants