Long-Term Supported Versions

    Querying VM Information

    [[toc]]

    Overview

    StratoVirt can be used to query VM status, vCPU topology information, and vCPU online status. It uses QMP to manage VMs. Therefore, ensure that StratoVirt is connected to the VM before querying the VM information.

    Querying VM status

    Run the query-status command to query the VM running status.

    • Usage:

      { "execute": "query-status" }

    • Example:

    <- { "execute": "query-status" }
    -> { "return": { "running": true,"singlestep": false,"status": "running" } 
    

    Querying Topology Information

    Run the query-cpus command to query the topology of all CPUs.

    • Usage:

    { "execute": "query-cpus" }

    • Example:
    <- { "execute": "query-cpus" }
    -> {"return":[{"CPU":0,"arch":"x86","current":true,"halted":false,"props":{"core-id":0,"socket-id":0,"thread-id":0},"qom_path":"/machine/unattached/device[0]","thread_id":8439},{"CPU":1,"arch":"x86","current":true,"halted":false,"props":{"core-id":0,"socket-id":1,"thread-id":0},"qom_path":"/machine/unattached/device[1]","thread_id":8440}]}
    

    Querying vCPU Online Status

    Run the query-hotpluggable-cpus command to query the online or offline status of all vCPUs.

    • Usage:

    { "execute": "query-hotpluggable-cpus" }

    • Example:
    <- { "execute": "query-hotpluggable-cpus" }
    -> {"return":[{"props":{"core-id":0,"socket-id":0,"thread-id":0},"qom-path":"/machine/unattached/device[0]","type":"host-x86-cpu","vcpus-count":1},{"props":{"core-id":0,"socket-id":1,"thread-id":0},"qom-path":"/machine/unattached/device[1]","type":"host-x86-cpu","vcpus-count":1}]}
    

    Where, online vCPUs have the qom-path item, while offline vCPUs do not.

    Bug Catching

    Buggy Content

    Bug Description

    Submit As Issue

    It's a little complicated....

    I'd like to ask someone.

    PR

    Just a small problem.

    I can fix it online!

    Bug Type
    Specifications and Common Mistakes

    ● Misspellings or punctuation mistakes;

    ● Incorrect links, empty cells, or wrong formats;

    ● Chinese characters in English context;

    ● Minor inconsistencies between the UI and descriptions;

    ● Low writing fluency that does not affect understanding;

    ● Incorrect version numbers, including software package names and version numbers on the UI.

    Usability

    ● Incorrect or missing key steps;

    ● Missing prerequisites or precautions;

    ● Ambiguous figures, tables, or texts;

    ● Unclear logic, such as missing classifications, items, and steps.

    Correctness

    ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

    ● Incorrect schematic or architecture diagrams;

    ● Incorrect commands or command parameters;

    ● Incorrect code;

    ● Commands inconsistent with the functions;

    ● Wrong screenshots.

    Risk Warnings

    ● Lack of risk warnings for operations that may damage the system or important data.

    Content Compliance

    ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

    ● Copyright infringement.

    How satisfied are you with this document

    Not satisfied at all
    Very satisfied
    Submit
    Click to create an issue. An issue template will be automatically generated based on your feedback.
    Bug Catching
    编组 3备份