microcore-mininit - stripped down Tiny Core Linux
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.

microcore-mininit.json 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {
  2. "variables": {
  3. "tc_iso_url": "http://distro.ibiblio.org/tinycorelinux/7.x/x86/archive/7.2/Core-7.2.iso",
  4. "tc_iso_checksum": "77bf8cceacd2110120451f3f22f85156",
  5. "vm_name": "microcore-mininit.qcow2",
  6. "setup_script": "microcore-mininit.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": "tc",
  19. "ssh_password": "tc",
  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 http={{ .HTTPIP }}:{{ .HTTPPort }}<enter><wait10><wait10><wait10><wait10>",
  29. "sudo udhcpc<enter>",
  30. "sudo passwd tc<enter>tc<enter>tc<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/{{user `setup_script`}}"
  41. }
  42. ],
  43. "post-processors": [
  44. {
  45. "type": "shell-local",
  46. "inline": [
  47. "cd output-qemu",
  48. "qemu-img convert -O qcow2 -o compat=0.10 '{{user `vm_name`}}' new_image",
  49. "mv new_image '{{user `vm_name`}}'"
  50. ]
  51. }
  52. ]
  53. }