Posted By

666f6f on 04/04/10


Tagged

kvm-qemu raw


Versions (?)

Script to run your QEMUlated Windows


 / Published in: Bash
 

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

  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

Report this snippet  

You need to login to post a comment.