Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbh34680/virget
https://github.com/cbh34680/virget
kvm-api libvirt libvirt-python virsh
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cbh34680/virget
- Owner: cbh34680
- License: mit
- Created: 2024-03-03T03:47:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-03T04:14:45.000Z (9 months ago)
- Last Synced: 2024-04-03T05:26:27.270Z (9 months ago)
- Topics: kvm-api, libvirt, libvirt-python, virsh
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
virget
=======Runs some commands similar to virsh and returns the results in JSON format.
Therefore, it can be conveniently used for batch processing in shell scripts.For example ``virsh list``, ``virsh domblklist`` etc.
Jump to:
- `Getting Started <#getting-started>`__
- `Examples <#examples>`__Getting Started
---------------To make installation easier, grab the file and add the path to ``bin``
Dependencies
------------- Linux virtualization environment with libvirt
- ``jmespath``: 1.0.1 or greater
- ``xmltodict``: 0.13.0 or greater.. note::
``virget`` was tested with version python3.11.Installation
------------Here, the path is set to bin in the directory obtained from github.
::
$ sudo -i
# git clone https://github.com/cbh34680/virget.git
# chmod u+x ./virget/bin/virget
# export PATH="${PWD}/virget/bin:${PATH}"
# which virgetExamples
--------See help for all available commands.
::
# virget help
or have a look at this `command-files `_
Comparison with virsh.
*list*
::# virsh list
Id Name State
----------------------------
1 vhcalnplci running
# virget --pretty list
{
"data": [
{
"id": 1,
"name": "vhcalnplci",
"state": "running"
}
]
}*domblklist*
::# virsh domblklist 1
Target Source
-----------------------------------------------------
vda /disk/2/clone.d/ubuntu16/vhcalnplci.qcow2
# virget --pretty domblklist 1
{
"data": [
{
"target": "vda",
"source": "/disk/2/clone.d/ubuntu16/vhcalnplci.qcow2"
}
]
}