项目作者: rsevilla87

项目描述 :
Libvirt shortcut CLI
高级语言: Go
项目地址: git://github.com/rsevilla87/rsvirt.git
创建时间: 2018-12-29T22:52:41Z
项目社区:https://github.com/rsevilla87/rsvirt

开源协议:GNU Lesser General Public License v3.0

下载


rsvirt

Rsvirt is a tool focused in providing a set of shortcuts for libvirt. These shortcuts are aimed to improve our productivity and avoid dealing with tasks like:

  • Create VMs based in Copy-On-Write disks
  • Attach disks to guests
  • Guest’s power management
  • SSH guests
  1. $ ./bin/rsvirt -h
  2. This CLI tool acts as a wrapper over libvirt.
  3. Similar to other tools like virsh but providing some shortcuts to the
  4. most common tasks, like creating VMs from base images or attaching
  5. several nics to a VM at creation time
  6. Usage:
  7. rsvirt [command]
  8. Available Commands:
  9. add-disk Adds a disk to a Virtual Machine
  10. completion Generates bash completion scripts
  11. create Create a new Virtual Machine
  12. delete Delete Virtual Machines
  13. help Help about any command
  14. list List Virtual Machines
  15. show Show Virtual Machine information
  16. ssh SSH to Virtual Machine
  17. start Start Virtual Machines
  18. stop Stop Virtual Machines
  19. version Print the version number of rsvirt
  20. Flags:
  21. -c, --connect string Hypervisor connection URI (default "qemu:///system")
  22. -h, --help help for rsvirt
  23. Use "rsvirt [command] --help" for more information about a command.

Requirements

  • libvirt
  • qemu-img
  • libguestfs-tools

Getting started

This project requires Go to be installed. On OS X with Homebrew you can just run brew install go.

Running it then should be as simple as:

  1. $ make
  2. $ make install
  3. $ rsvirt -h

Building on Linux

Make sure you have installed the dependencies:

  • golang 1.9 or later
  • GNU make 3.81 or later
  • libvirt headers files and libraries
  • git
  • dep

Testing

make test

Completion

Bash completion:

. <(rsvirt completion bash)

ZSH completion:

. <(rsvirt completion zsh)