#!/bin/bash kvm_add() { ip="$1" host="$2" mem="$3" disk="$4" echo ===================== `date --utc` >> kvm.log ubuntu-vm-builder kvm hardy \ --domain vietubes.vn \ --arch amd64 \ --dest $host \ --hostname $host \ --mem $mem \ --user johna \ --pass doe \ --ip $ip \ --rootsize $disk \ --swapsize 500 \ --mask 255.255.255.0 \ --net 192.168.5.0 \ --bcast 192.168.5.255 \ --gw 192.168.5.8 \ --dns 192.168.5.8 \ --components 'main,universe' \ --addpkg 'openssh-server' \ --libvirt qemu:///system echo ===================== `date --utc` >> kvm.log } echo '' >> kvm.log # kvm_add 192.168.5.61 windy 500 200000 # openbravo kvm_add 192.168.5.62 stormy 500 200000 # host services, mail kvm_add 192.168.5.63 cloudy 500 20000 # gateway kvm_add 192.168.5.64 snowy 500 20000 # ltsp, orangeHRM