summaryrefslogtreecommitdiff
path: root/createvm.sh
diff options
context:
space:
mode:
Diffstat (limited to 'createvm.sh')
-rwxr-xr-xcreatevm.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/createvm.sh b/createvm.sh
index cf84f67..3290a95 100755
--- a/createvm.sh
+++ b/createvm.sh
@@ -3,10 +3,10 @@
# configuration
NAME=arch32
-HOST=192.168.130.1
+HOST=192.168.120.1
NETMASK=255.255.255.0
PREFIX=24
-CLIENT=192.168.130.2
+CLIENT=192.168.120.101
vm_is_running() {
if [ "$(virsh domstate $1 2>/dev/null)" == "running" ]; then
@@ -22,12 +22,9 @@ wait_for_vm_to_stop() {
done
}
-mount -o loop,ro mirror/archisos/archlinux-2018.08.01-i686.iso archiso
+mount -o loop,ro /data/arch32/mirror/archisos/archlinux-2019.03.07-i686.iso archiso
-cp archiso/arch/boot/i686/vmlinuz .
-cp archiso/arch/boot/i686/archiso.img .
-
-#darkhttpd . --port 8088 &
+darkhttpd . --port 8088 &
virt-install --name ${NAME} -r 1536 --vcpus=1 --os-type=linux --os-variant=virtio26 \
--disk pool=default,size=4,format=qcow2 --network bridge=br0,model=virtio \
@@ -36,7 +33,6 @@ virt-install --name ${NAME} -r 1536 --vcpus=1 --os-type=linux --os-variant=virti
sleep 15
-exit 0
virsh start ${NAME}
sleep 15
@@ -53,5 +49,5 @@ virsh start ${NAME}
rm -f ${NAME}-new.xml ${NAME}.xml
-#pkill darkhttpd
+pkill darkhttpd
umount archiso