packer.json 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {
  2. "variables": {
  3. "iso_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
  4. "iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/sha1sums.txt",
  5. "root_password": "arch",
  6. "username": "vagrant",
  7. "password": "vagrant"
  8. },
  9. "builders": [
  10. {
  11. "headless": false,
  12. "type": "virtualbox-iso",
  13. "iso_url": "{{ user `iso_url` }}",
  14. "iso_checksum_url": "{{ user `iso_checksum_url` }}",
  15. "iso_checksum_type": "sha1",
  16. "vm_name": "arch-desktop",
  17. "guest_os_type": "ArchLinux_64",
  18. "guest_additions_mode": "disable",
  19. "virtualbox_version_file": "",
  20. "vboxmanage": [
  21. ["modifyvm", "{{.Name}}", "--firmware", "efi"],
  22. ["modifyvm", "{{.Name}}", "--memory", "1024"],
  23. ["modifyvm", "{{.Name}}", "--accelerate3d", "on"]
  24. ],
  25. "boot_wait": "5s",
  26. "boot_command": [
  27. "<enter><wait40s>",
  28. "printf \"{{user `root_password`}}\\n{{user `root_password`}}\\n\" | passwd<enter>",
  29. "systemctl start sshd.service<enter>"
  30. ],
  31. "disk_size": 65536,
  32. "iso_interface": "sata",
  33. "hard_drive_interface": "sata",
  34. "output_directory": "dist/arch-desktop",
  35. "ssh_username": "root",
  36. "ssh_password": "{{user `root_password`}}",
  37. "ssh_timeout": "20m",
  38. "shutdown_command": "systemctl poweroff"
  39. }
  40. ],
  41. "provisioners": [
  42. {
  43. "type": "file",
  44. "source": "arch.sh",
  45. "destination": "arch.sh"
  46. },
  47. {
  48. "type": "file",
  49. "source": "install",
  50. "destination": "install"
  51. },
  52. {
  53. "type": "shell",
  54. "skip_clean": true,
  55. "expect_disconnect": true,
  56. "environment_vars": [
  57. "DEBUG=true",
  58. "root_password={{user `root_password`}}",
  59. "username={{user `username`}}",
  60. "password={{user `password`}}"
  61. ],
  62. "script": "setup/install.sh"
  63. },
  64. {
  65. "type": "shell",
  66. "script": "setup/vbox.sh"
  67. },
  68. {
  69. "type": "shell",
  70. "script": "setup/clean.sh"
  71. }
  72. ],
  73. "post-processors": [
  74. {
  75. "type": "vagrant",
  76. "compression_level": 9,
  77. "output": "dist/arch-desktop.box"
  78. }
  79. ]
  80. }