Wuodan0

kvm start

Jun 14th, 2012
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. stefan@halley ~ $ cat /mnt/KVM/Gentoo/startGentoo64.sh
  2. #!/bin/bash
  3. #
  4. # This seems complicated, so here are the parts:
  5. start_vm()
  6. {
  7. local conf=""
  8.  
  9. # network config, see http://en.gentoo-wiki.com/wiki/KVM_with_VDE
  10. # conf="${conf} -net vde -net nic,vlan=0,macaddr=52:54:00:00:EE:03"
  11. conf="${conf} -net nic,macaddr=00:00:00:00:00:00 -net tap,ifname=tap0,script=no,downscript=no"
  12.  
  13. # 1GB RAM
  14. conf="${conf} -m 1024"
  15.  
  16. # time setting (localtime or utc): host has localtime for dual-boot with windows
  17. conf="${conf} -localtime"
  18.  
  19. # hard disk image
  20. conf="${conf} -hda /mnt/KVM/Gentoo/gentoo-amd64.img"
  21.  
  22. # boot from CD for installation
  23. # conf="${conf} -cdrom /mnt/KVM/ISO/systemrescuecd-x86-2.8.0.iso"
  24. conf="${conf} -cdrom /mnt/KVM/ISO/install-amd64-minimal-20120531.iso"
  25.  
  26. # boot from CD-ROM first, switch back to default order after reboot
  27. conf="${conf} -boot d"
  28.  
  29. # now start qemu-kvm
  30. qemu-kvm $conf &
  31. }
  32. start_vm
Advertisement
Add Comment
Please, Sign In to add comment