Giter VIP home page Giter VIP logo

azure-linux-utils's Introduction

azure-linux-utils's People

Contributors

microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar santoshx avatar seansp-zz avatar simonxiaoss avatar szarkos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-linux-utils's Issues

Incorrect error message when provided with invalid VMRS file

I get the following error print when provided with invalid VMRS file.

`> .\vm2core.exe "test1.VMRS" .\test1.vmcore

The system cannot find the file specified. `

The snapshot file exists but it is invalid input as it was generated when VM was in turned off state.

vmcoreinfo note generated is incorrect

Hello, I appreciate that this tool exists, it has helped me out of a bind! But I wanted to give a bit of feedback. The vmcoreinfo note which is generated for the ELF file is fake, as mentioned in the code:

    // Fill fake data in VMCOREINFO to keep crash tool happy
    // TODO: Is it possible to get real data from state file ?

Unfortunately, at least with the crash + kernel versions I tested (honestly, I can't recall the exact details as it was months ago), fake data does not keep crash happy. Crash relies on vmcoreinfo to find things like the page tables, important data structures, and to verify the sizes of important data structures. And other tools like drgn similarly expect to read real data from it.

To work around this, I needed to find the vmcoreinfo data from the generated ELF file, and then patch the ELF file with the correct data.

It is possible to get real data from the memory image, but it is of course quite slow -- you need to scan the memory for well-known contents like OSRELEASE=. Given that vm2core already needs to read and write each block of memory, maybe it wouldn't be a huge additional runtime slowdown to do the search? It could certainly be an opt-in feature if necessary. Vmcoreinfo will always start at a PAGE_SIZE aligned address, and it will always start with OSRELEASE=. That may help speed things up. See here for the linux code generating it.

I have a script which wraps strings to find the correct vmcoreinfo and output it to a file, to give you the general idea of what needs to be done. It doesn't even take into account the page-aligned restriction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.