packer.json 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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": true,
  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. "enable_hibernation=y",
  59. "root_password={{user `root_password`}}",
  60. "username={{user `username`}}",
  61. "password={{user `password`}}"
  62. ],
  63. "script": "setup/install.sh"
  64. },
  65. {
  66. "type": "shell",
  67. "script": "setup/vbox.sh"
  68. },
  69. {
  70. "type": "shell",
  71. "script": "setup/clean.sh"
  72. }
  73. ],
  74. "post-processors": [
  75. {
  76. "type": "vagrant",
  77. "compression_level": 9,
  78. "output": "dist/arch-desktop.box"
  79. }
  80. ]
  81. }