Guest User

launchVm

a guest
Apr 12th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #!/bin/bash
  2. if [[ $EUID -ne 0 ]]; then
  3. echo "This script must be run as root" 1>&2
  4. su
  5. exit 0
  6. fi
  7.  
  8. set -x
  9.  
  10. virsh start win10
  11.  
  12. if [[ $(virsh list | grep win10) == "" ]]
  13. then
  14. exit 0
  15. fi
  16.  
  17. set +x
  18.  
  19. exit 0
Add Comment
Please, Sign In to add comment