/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash WINVER=$1 IMGDIR=/home/gp/Images while [[ -z "$IMG" ]]; do while [[ -z "$WINVER" ]]; do read -p "Which Windows version? " WINVER done for FILENAME in $IMGDIR/* do if [[ "$FILENAME" =~ "_${WINVER}_" ]]; then IMG=$FILENAME && break fi done WINVER= done # Q: Why sudo? A: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/103010 sudo -b kvm -hda $IMG -localtime -net nic -net tap -m 2G
URL: http://666f6f.wordpress.com/2010/03/28/kvm-qemu-getting-started/