diff options
author | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 20:18:11 -0400 |
---|---|---|
committer | Jamie McClelland <jm@mayfirst.org> | 2009-10-08 20:18:11 -0400 |
commit | d1ef7281dcdd0a29a462d839fec80c3a473e59a2 (patch) | |
tree | 991ee834df436d5f05c3df2658f2155032847dba | |
parent | fe72382a724129f56f247ee66866ec6d94f2f626 (diff) | |
download | kvm-manager-d1ef7281dcdd0a29a462d839fec80c3a473e59a2.tar.gz kvm-manager-d1ef7281dcdd0a29a462d839fec80c3a473e59a2.tar.bz2 |
make the name of the volume group a parameter to be passed rather than
hard coded.
-rw-r--r-- | README | 2 | ||||
-rwxr-xr-x | kvm-creator | 9 |
2 files changed, 6 insertions, 5 deletions
@@ -30,7 +30,7 @@ Before you begin, you may want to prepare your system by doing the following: A typical workflow to start an installer is: -kvm-creator create $GUESTNAME [$DISKSIZE [$RAM [$TAP [$MAC] ] ] ] +kvm-creator create $GUESTNAME $VG [$DISKSIZE [$RAM [$TAP [$MAC] ] ] ] # set up boot media for the host ("put the installer CD in the drive"): ln -s /usr/local/share/ISOs/d-i.iso /home/$GUESTNAME/vms/$GUESTNAME/cd.iso # set up access to the account: diff --git a/kvm-creator b/kvm-creator index 6ea989f..6162241 100755 --- a/kvm-creator +++ b/kvm-creator @@ -9,10 +9,11 @@ CMD="$1" shift NAME="$1" -SIZE="${2:-3G}" -RAM="${3:-512}" -TAP="${4:-$(( $( cat /etc/sv/kvm/*/env/TAP | sed 's/^tap//' | sort -n | tail -n 1 ) + 1 ))}" -MAC="${5:-$(cat /etc/sv/kvm/*/env/MAC | head -n1 | cut -f 1-5 -d: ):$(( $( cat /etc/sv/kvm/*/env/MAC | cut -f 6 -d: | sort -n | tail -n 1 ) + 1 ))}" +VG="$2" +SIZE="${3:-3G}" +RAM="${4:-512}" +TAP="${5:-$(( $( cat /etc/sv/kvm/*/env/TAP | sed 's/^tap//' | sort -n | tail -n 1 ) + 1 ))}" +MAC="${6:-$(cat /etc/sv/kvm/*/env/MAC | head -n1 | cut -f 1-5 -d: ):$(( $( cat /etc/sv/kvm/*/env/MAC | cut -f 6 -d: | sort -n | tail -n 1 ) + 1 ))}" VG=vg_malty0 |