#! /bin/bash -x # # This script helps creating a new LibVirt domain # # Run as root user # # TODO: fill the variables below with proper values # ---------------------------------------------------- domain_name=.. cpus=... disk_size=... memory=... mac=... isodisk=... # ---------------------------------------------------- virt-install \ --name ${domain_name} \ --disk path=/var/lib/libvirt/images/${domain_name}.qcow2,size=${disk_size}\ --vcpus ${cpus} \ --memory ${memory} \ --location ${isodisk}\ --network bridge=virbr0,mac=${mac}\ --graphics none\ --virt-type kvm\ --extra-args console=ttyS0 \ --osinfo detect=on,require=off --import