Git Product home page Git Product logo

qmp-shell's Introduction

QMP Shell

Build Status

QMP Shell is an interface to communicate with QEMU instances via QEMU Machine Protocol.

How to use

There are two ways to work with the QMP Shell:

  1. Command line mode
  2. Interactive mode

The first one is good for executing single commands, collecting statistics or fetching other data about the QEMU instances.

The interactive mode can be useful for debugging and experimenting.

Some examples:

  1. Bring up the network card alice_ath0:

     echo set_link name=alice1 up=true | qmp-shell /var/run/kvm-monitor/alice.qmp
    
  2. Set the password for VNC:

     echo set_password protocol=vnc password=secret | qmp-shell /var/run/kvm-monitor/alice.qmp
    
  3. Get memory balloon information:

     echo query-balloon | qmp-shell /var/run/kvm-monitor/alice.qmp
     {
         "actual": 2.44318208e+08
     }
    

To work with the HMP commands use flag -H. Some examples:

  1. Get memory balloon information:

     echo info balloon | qmp-shell -H /var/run/kvm-monitor/alice.qmp
     balloon: actual=233
    
  2. Get the VNC server status:

     echo info vnc | qmp-shell -H /var/run/kvm-monitor/alice.qmp
    
  3. All available commands with short description:

     echo help | qmp-shell -H /var/run/kvm-monitor/alice.qmp
    

Installing from source

mkdir qmp-shell && cd qmp-shell
export GOPATH=$(pwd); go get -v -tags netgo -ldflags '-s -w' github.com/0xef53/qmp-shell

qmp-shell's People

Contributors

0xef53 avatar rgl avatar

Stargazers

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

Watchers

 avatar  avatar

qmp-shell's Issues

Add support for connecting to TCP sockets

Currently we can only connect to unix domain sockets, but its also useful to connect to TCP sockets.

To distinguish between the two, we should support something URLs, something like tcp://{ip}:{port} and unix://{path}.

To maintain backwards compatibility, it should be enough to assume its a unix domain socket when the user did no supply an URL (e.g. {scheme}:{rest}).

What do you think?

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.