1.2 KiB
1.2 KiB
KVM tools
This repository contains scripts for managing (KVM)[https://www.linux-kvm.org/page/Main_Page] hypervisors using (DRBD)[http://drbd.org/] and (LVM)[https://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29].
It contains the following scripts.
- add-vm: create DRBD volumes and virtual machines.
- vm-migrate: migrate a DRBD based virtual machine
- kvmstats: gives informations about defined virtual machines.
Installation
Copy the scripts to /usr/local/sbin:
install -m 0755 add-vm /usr/local/sbin/add-vm
install -m 0755 kvmstats /usr/local/sbin/kvmstats
Edit the configuration in /etc/evolinux/add-vm.cnf:
masterKVMIP=192.168.0.X
slaveKVMIP=192.168.0.Y
Script add-vm assumes you have two LVM Volume Groups named "ssd" and "hdd".
You can override this by adding a bash(1) array in /etc/evolinux/add-vm.cnf, eg:
disks=("VG1" "VG2")
Dry-run mode
You can use the dry-run mode by setting the doDryRun variable in /etc/evolinux/add-vm.cnf::
doDryRun=true
This is specific to add-vm.
License
This is an Evolix project and is licensed under the GPLv3, see the LICENSE file for details.