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 --- createvm.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'createvm.sh') 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