summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2013-01-02 15:30:05 -0500
committerWill Woods <wwoods@redhat.com>2013-01-02 15:30:05 -0500
commit9a7d34cd8b08d2b574fe19f0027f8823d14cf9af (patch)
treed34d46eff970f4ff42c8698f2c3ba133aae97ca7
parent7411892782d5e1ec5e1297299c8bb4743f3580f2 (diff)
downloadtestboot-9a7d34cd8b08d2b574fe19f0027f8823d14cf9af.tar.gz
testboot-9a7d34cd8b08d2b574fe19f0027f8823d14cf9af.tar.xz
testboot-9a7d34cd8b08d2b574fe19f0027f8823d14cf9af.zip
use $vmname for vmname
someone might want to change the vmname, I guess?
-rwxr-xr-xtestboot.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/testboot.sh b/testboot.sh
index fd65f58..50b5ce0 100755
--- a/testboot.sh
+++ b/testboot.sh
@@ -14,6 +14,7 @@ cdrom=${cdrom:-$dir/iso/Fedora-17-x86_64-DVD.iso}
graphics=${graphics:-vnc}
dracut_opts="${dracut_opts:---add anaconda --omit plymouth}"
network="${network:-default}"
+vmname="${vmname:-testboot}"
compress=${compress:-$(type -P pigz || type -P xz)}
[ "$compress" = "xz" ] && compress="xz --check-crc32 -1"
@@ -185,10 +186,10 @@ if [ "$fromcd" != "true" ]; then
bootarg="kernel=$vmlinuz,initrd=$initrd,kernel_args=$kernel_args"
fi
-echo "Creating 'testboot' guest..."
-virsh destroy testboot &>/dev/null
-virsh undefine testboot &>/dev/null
-virt-install --name testboot --ram $ram --graphics $graphics \
+echo "Creating '$vmname' guest..."
+virsh destroy $vmname &>/dev/null
+virsh undefine $vmname &>/dev/null
+virt-install --name $vmname --ram $ram --graphics $graphics \
--os-type linux --os-variant fedora16 $console \
--disk $disk,size=10 --disk $disk2,size=10 \
${nonet:+--nonetworks} \
@@ -196,7 +197,7 @@ virt-install --name testboot --ram $ram --graphics $graphics \
${dualnic:+--network network=$network,model=virtio,mac=52:54:00:03:31:39} \
${usecd:+--disk $cdrom,device=cdrom} \
${bootarg:+--boot "$bootarg"}
-virsh destroy testboot &>/dev/null
+virsh destroy $vmname &>/dev/null
# historical interest: this is how it'd work in qemu
do_qemu() {