#!/bin/bash #author: Thomas Roehm #version: 1.0 echo "" echo "Overview VM´s:" echo "" virsh list --all echo "" read -p "Please enter the name of the vm you want to clone: " SOURCEVM echo "" read -p "Please enter the name of the cloned vm: " DESTVM echo "" virt-clone \ --original $SOURCEVM \ --auto-clone \ --name $DESTVM STATUS=$(echo $?) echo "" if [ $STATUS -eq 0 ] then echo "VM \"$DESTVM\" cloned." else echo "Problem - VM not cloned!" fi