From 0c98660f308da8e78d696fb50143f30b7933980c Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 30 May 2017 11:03:05 +0200 Subject: virtualenv: don't let SPICE listen on a socket. --- virtualenv/virt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'virtualenv/virt') diff --git a/virtualenv/virt b/virtualenv/virt index 9d298b0..e0ab1be 100755 --- a/virtualenv/virt +++ b/virtualenv/virt @@ -69,8 +69,8 @@ install() { x86_64) darch=amd64;; *) darch=$ARCH;; esac - local version=$(sed -n '/^VERSION\s*=\s*/ {s///p;q}' $root/../preseed/Makefile) - local cdrom="$root/../preseed/dist/$darch/debian-$version-$darch-netinst-preseeded.iso" + local version=$(sed -n '/^VERSION\s*=\s*/ {s///p;q}' "$root/../Makefile") + local cdrom="$root/../dist/$darch/debian-$version-$darch-netinst-preseeded.iso" if doesExist "$name"; then echo "Error: Domain $name already exists. If you want to replace the domain, run" >&2 @@ -100,14 +100,15 @@ install() { --os-variant debianwheezy \ --arch "$ARCH" \ --virt-type kvm \ - --cpu host,-invtsc \ + --cpu host \ --vcpu 2 \ --memory 512 \ --memballoon virtio \ --cdrom "$cdrom" \ --disk "$disk",size=12,format=raw,bus=virtio,cache=none,io=native \ --network network="$network",model=virtio \ - --graphics spice \ + --graphics spice,listen=none \ + --rng "random,device=/dev/urandom,model=virtio" \ --noautoconsole # --import \ # --disk path=/dev/sdc,bus=usb,perms=ro \ @@ -132,21 +133,15 @@ install() { it should now be up and running. To open a graphical console, run - $0 view $name + virt-viewer --attach $name EOF } -view(){ - [ $# -eq 1 ] || usage - virt-viewer -c "qemu+ssh://odin.guilhem.org/system" "$1" - # Or remotely virt-viewer -c "qemu+ssh://$username@$hostname/system" "$1" -} - [ $# -gt 0 ] || usage command="$1" shift; case "$command" in - install|view) $command "$@";; + install) $command "$@";; *) usage esac -- cgit v1.2.3