aboutsummaryrefslogtreecommitdiffstats
path: root/virtualenv
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2017-05-30 11:03:05 +0200
committerGuilhem Moulin <guilhem@fripost.org>2017-05-30 11:03:05 +0200
commit0c98660f308da8e78d696fb50143f30b7933980c (patch)
tree90e78656ed9d872d849cbe214438ce4198e5506b /virtualenv
parentbd29c6b0a0b1b9d248eb9c96bf065cfbdca3b241 (diff)
virtualenv: don't let SPICE listen on a socket.
Diffstat (limited to 'virtualenv')
-rwxr-xr-xvirtualenv/virt19
1 files changed, 7 insertions, 12 deletions
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