You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

start-target 846B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. . gconfig
  3. ARCH=qemu$1
  4. SUFFIX=$2
  5. VMSW=KVM
  6. if [ -n "$USE_LXC" ]; then
  7. VMSW=LXC
  8. elif [ -n "$USE_VBOX" ]; then
  9. VMSW=VBOX
  10. fi
  11. case $VMSW in
  12. KVM)
  13. case $ARCH in
  14. qemu32)
  15. [ -n "$KVM" ] || KVM=qemu-system-i386
  16. ;;
  17. qemu64)
  18. [ -n "$KVM" ] || KVM=qemu-system-x86_64
  19. ;;
  20. esac
  21. $KVM -enable-kvm -m ${VMEM:-2000} -smp ${NPROCS:-2} -drive file=target-$SUFFIX.qcow2,cache=writeback,if=virtio -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:$VM_SSH_PORT-:22 -vnc 127.0.0.1:16 > var/target.log 2>&1 &
  22. echo $! > var/target.pid
  23. wait
  24. rm var/target.pid
  25. ;;
  26. LXC)
  27. true #sudo lxc-start -n gitian -c var/target.log -f lxc.config
  28. ;;
  29. VBOX)
  30. VBoxManage startvm "Gitian-${2}" --type headless
  31. echo "Gitian-${2}" > var/target.vmname
  32. ;;
  33. esac