Script to run your QEMUlated Windows


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/bin/bash
  2. WINVER=$1
  3. IMGDIR=/home/gp/Images
  4.  
  5. while [[ -z "$IMG" ]]; do
  6. while [[ -z "$WINVER" ]]; do
  7. read -p "Which Windows version? " WINVER
  8. done
  9.  
  10. for FILENAME in $IMGDIR/*
  11. do
  12. if [[ "$FILENAME" =~ "_${WINVER}_" ]]; then
  13. IMG=$FILENAME && break
  14. fi
  15. done
  16.  
  17. WINVER=
  18. done
  19.  
  20. # Q: Why sudo? A: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/103010
  21. sudo -b kvm -hda $IMG -localtime -net nic -net tap -m 2G

URL: http://666f6f.wordpress.com/2010/03/28/kvm-qemu-getting-started/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.