NETem - Network Link Emulator for GNS3

NETem.json 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {
  2. "variables": {
  3. "tc_iso_url": "http://distro.ibiblio.org/tinycorelinux/6.x/x86/archive/6.4/Core-6.4.iso",
  4. "tc_iso_checksum": "c8e04e26de234e5528e6eac8ecb1bdda",
  5. "vm_name": "NETem.qcow2",
  6. "setup_script": "NETem.sh",
  7. "disk_size": "32"
  8. },
  9. "builders": [
  10. {
  11. "type": "qemu",
  12. "iso_url": "{{user `tc_iso_url`}}",
  13. "iso_checksum": "{{user `tc_iso_checksum`}}",
  14. "iso_checksum_type": "md5",
  15. "shutdown_command": "sudo poweroff",
  16. "format": "qcow2",
  17. "headless": false,
  18. "ssh_username": "gns3",
  19. "ssh_password": "gns3",
  20. "accelerator": "none",
  21. "vm_name": "{{user `vm_name`}}",
  22. "disk_interface": "ide",
  23. "disk_size": "{{user `disk_size`}}",
  24. "net_device": "e1000",
  25. "http_directory": "http",
  26. "boot_wait": "5s",
  27. "boot_command": [
  28. "mc user=gns3 http={{ .HTTPIP }}:{{ .HTTPPort }}<enter><wait10><wait10><wait10><wait10><wait10><wait10><wait10>",
  29. "sudo udhcpc<enter>",
  30. "sudo passwd gns3<enter>gns3<enter>gns3<enter>",
  31. "tce-load -wi openssh<enter><wait10>",
  32. "cd /usr/local/etc/ssh; [ -f sshd_config.example ] && sudo cp -a sshd_config.example sshd_config; cd<enter>",
  33. "sudo /usr/local/etc/init.d/openssh start<enter>"
  34. ]
  35. }
  36. ],
  37. "provisioners": [
  38. {
  39. "type": "shell",
  40. "script": "scripts/hd-install.sh"
  41. },
  42. {
  43. "type": "shell",
  44. "script": "scripts/serial.sh"
  45. },
  46. {
  47. "type": "shell",
  48. "script": "scripts/packages.sh"
  49. },
  50. {
  51. "type": "shell",
  52. "script": "scripts/{{user `setup_script`}}"
  53. },
  54. {
  55. "type": "shell",
  56. "script": "scripts/post_setup.sh"
  57. }
  58. ]
  59. }