Scripts for managing KVM hypervisors used with DRBD and LVM.
Go to file
Victor LABORIE 0fcf624576 Add a gitignore for .swp files 2018-07-27 11:06:57 +02:00
.gitignore Add a gitignore for .swp files 2018-07-27 11:06:57 +02:00
README.md Add doc for disks config in add-vm 2018-07-27 11:06:31 +02:00
add-vm.sh Fix default disks value 2018-07-27 10:57:35 +02:00
kvmstats.sh Use more revelant names for temp files 2018-07-19 11:41:35 +02:00

README.md

KVM tools

This repository contain scripts for managing KVM hypervisors used with DRBD and LVM.

It contains the following scripts.

  • add-vm.sh: create DBRD volumes and virtual machines.
  • kvmstats.sh: gives informations about defined virtual machines.

Install

Copy the scripts to /usr/local/sbin:

install -m 0755 add-vm.sh /usr/local/sbin/add-vm
install -m 0755 kvmstats.sh /usr/local/sbin/kvmstats

Edit configuration in /etc/evolinux/add-vm.cnf:

masterKVMIP=192.168.0.X
slaveKVMIP=192.168.0.Y

Script add-vm.sh assume you have two LVM Volume Group named "ssd" and "hdd".

You can override this by adding a Bash array in /etc/evolinux/add-vm.cnf, eg:

disks=("VG1" "VG2")

Dry-run mode

You can use the dry-run mode by setting doDryRun var in config file:

doDryRun=true

This is specific to add-vm.