This tiny shell script can start/stop KVM virtual machines. There is the first note that this script NEVER managements VMs in all senses. It has no fail over mechanism or live migration, no beautiful GUI. You can't see any statistical informations. In addition, it can't even create an new VM disk image.
vmmaestro (:D) is a simple command line tool to start, shutdown VMs and help to connect to the screens from your client PC.
Clone this repository.
vmmaestroto anywhere you'd like, i.e.
- Give executable permission to
chmod +x /usr/local/bin/vmmaestro
If you use SPiCE and TLS, place 3 files into
- CA Root certificate in PEM format. It must be named
- A server certificate merged with CA intermediate certificate issued by CA. It must be named
- A private key file. It must be named
kvmuser account if it doesn't exist.
- Of course, add also your account to
- Add KVM kernel module. (execute
- Add TUN/tap kernel module,
tunto the system. (execute '
- Add Vhost-net kernel module,
vhost-netto the system. (execute '
- Add entries above into
Add bridge interfaces per NIC. Recommend to name them like '
- Create the global configuration file,
- Create the VM specific configuration file in
/etc/vmmaestro. The base name of it must be the same name as VM and has the extension, '
- You can put all settings in the VM specific configuration file and leave blank the global configuration. However, I recommend to put as many common settings as possible in the global configuration file. When the same item in both file, the one put into the VM specific configuration is given priority.
Create acl file for bridge interfaces in
Create lvm partitions or files for VM as you specified in the vm config file(s).
vmmaestro start vm-name and enjoy!
vmmaestro consolestart VM
start VM and then connect to serial console.
vmmaestro start [VM [VM [VM]...]]
start VMs. This command can boot multiple VMs.
vmmaestro shutdown [VM [VM [VM]...]]
shutdown VMs. When entering this command, VMs will do shutdown sequences.
vmmaestro stop [VM [VM [VM]...]]
stop VMs. When entering this command, VMs will terminate immediately
vmmaestro kill [VM [VM [VM]...]]
kill kvm process directly.
vmmaestro restart [VM [VM [VM]...]]
vmmaestro status [VM [VM [VM]...]]
If VM is running, shows the message, "
VM name is running.".
Otherwise shows the message, "
VM name is stopped."
vmmaestro console VM
Connect serial port and show local text screen.
vmmaestro monitor VM
Connect KVM/QEMU monitor port.
- By default, VNC & SPICE port is bind to localhost address (127.0.0.1). I recommend to use
SSH tunnelinginstead of changing bind address.