summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {