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

.vdi -.vdh open #267

Open
Keops10 opened this issue Nov 28, 2022 · 8 comments
Open

.vdi -.vdh open #267

Keops10 opened this issue Nov 28, 2022 · 8 comments

Comments

@Keops10
Copy link

Keops10 commented Nov 28, 2022

How can I view the files in the virtual machine with the .vdi - .vhd extension. and how can i search for files. Can anyone recommend a few lines of code?

@rs38
Copy link

rs38 commented Nov 29, 2022

See my (updated) answer at SO:
https://stackoverflow.com/questions/74604617/using-discutils-library-to-open-vdi-image/74605552?

@LTRData
Copy link

LTRData commented Nov 29, 2022

See my (updated) answer at SO:
https://stackoverflow.com/questions/74604617/using-discutils-library-to-open-vdi-image/74605552?

I cannot comment on your reply on StackOverflow because of the reputation system, so I reply here instead:

using DiscUtils.Vhdx.DiskImageFile baseFile = new DiscUtils.Vhdx.DiskImageFile(VDIStream); 'Invalid VHDX file - file signature mismatch' I get an error

This is because you try to open a vdi image using vhdx image format classes. You should use vdi format classes instead:
DiscUtils.Vdi.Disk.OpenDisk("pathto.vdi", FileAccess.Read);

@rs38
Copy link

rs38 commented Nov 29, 2022

the updated answer does not use any VHDX classes...?!

@LTRData
Copy link

LTRData commented Nov 29, 2022

the updated answer does not use any VHDX classes...?!

Oh, sorry, your answer is the one with the FreeDOS image example? I misunderstood which answer your comment was about!

@rs38
Copy link

rs38 commented Nov 29, 2022

yes, there is only one answer, so I thought it's obvious :)

@LTRData
Copy link

LTRData commented Nov 29, 2022

Okay, I am a bit unfamiliar with the terminology there. I need to learn that answers to answers are not called answers but comments. ;)

@Keops10
Copy link
Author

Keops10 commented Nov 29, 2022

Really thank you so much

@rs38
Copy link

rs38 commented Nov 29, 2022

please don't forget to accept answers if they work and upvote! :)

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