From aad453830d5b14a39abccb6c9a15cf2c647d57cb Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 13 Jun 2019 17:08:09 +0200 Subject: install without graphical output, write only a logfile, patch machine XML and add VNC add the end --- archauto.sh | 5 ++++- createvm.sh | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/archauto.sh b/archauto.sh index d478355..c4eb965 100755 --- a/archauto.sh +++ b/archauto.sh @@ -106,7 +106,7 @@ echo ${HOSTNAME} > ${MOUNT_PATH}/etc/hostname cat > ${MOUNT_PATH}/etc/systemd/network/25-wired.network <>${MOUNT_PATH}/etc/ssh/sshd_config arch-chroot ${MOUNT_PATH} systemctl enable sshd +# some networking and debugging tools, decent editor +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S iputils iproute2 joe + # maybe later, when pacman knows the Archlinux32 developer keys #sed -i 's/^SigLevel.*/SigLevel = Required DatabaseOptional/g' ${MOUNT_PATH}/etc/pacman.conf diff --git a/createvm.sh b/createvm.sh index 3290a95..f9e2511 100755 --- a/createvm.sh +++ b/createvm.sh @@ -28,7 +28,7 @@ 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 \ - --arch i686 --cpu coreduo \ + --arch i686 --cpu coreduo --graphics none \ --boot kernel=archiso/arch/boot/i686/vmlinuz,initrd=archiso/arch/boot/i686/archiso.img,kernel_args="archisobasedir=archiso/arch archiso_http_srv=http://${HOST}:8088/ script=http://${HOST}:8088/archauto.sh ip=${CLIENT}:::${NETMASK}:${NAME}::off nomodeset i915.modeset=0" & sleep 15 @@ -43,7 +43,24 @@ virsh dumpxml ${NAME} > ${NAME}.xml xmlstarlet ed -d '/domain/os/kernel' ${NAME}.xml | xmlstarlet ed -d '/domain/os/initrd' | xmlstarlet ed -d '/domain/os/cmdline' > ${NAME}-new.xml -virsh define ${NAME}-new.xml +xmlstarlet ed \ + -a /domain/devices/rng -t elem -n graphics -v '' \ + -i /domain/devices/graphics \ + -t attr -n type -v vnc \ + -i /domain/devices/graphics \ + -t attr -n port -v 5909 \ + -i /domain/devices/graphics \ + -t attr -n autoport -v yes \ + -i /domain/devices/graphics \ + -t attr -n listen -v '0.0.0.0' \ + -s /domain/devices/graphics -t elem -n listen -v '' \ + -i /domain/devices/graphics/listen \ + -t attr -n type -v address \ + -i /domain/devices/graphics/listen \ + -t attr -n address -v '0.0.0.0' \ + ${NAME}-new.xml > ${NAME}-new2.xml + +virsh define ${NAME}-new2.xml virsh start ${NAME} -- cgit v1.2.3-54-g00ecf