19 lines
347 B
Bash
Executable File
19 lines
347 B
Bash
Executable File
#!/bin/bash -e
|
|
cd "$(dirname "$0")"
|
|
. ./lib.sh
|
|
|
|
if [ -f hda.qcow2 ]; then
|
|
echo -e "Disk file exists. Are you sure you don't want" \
|
|
"\e[1m\e[31m./run.sh\e[0m?\nCtrl-C to interrupt" >&2
|
|
read -r
|
|
fi
|
|
|
|
qemu-img create -f qcow2 hda.qcow2 10G
|
|
|
|
CMD=(
|
|
"${CMD[@]}"
|
|
-drive file=arch.iso,index=1,media=cdrom,readonly=on
|
|
)
|
|
|
|
"${CMD[@]}"
|