12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- {
- "variables": {
- "iso_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/archlinux-{{isotime \"2006.01\"}}.01-x86_64.iso",
- "iso_checksum_url": "https://mirrors.kernel.org/archlinux/iso/{{isotime \"2006.01\"}}.01/sha1sums.txt",
- "root_password": "arch",
- "username": "vagrant",
- "password": "vagrant"
- },
- "builders": [
- {
- "headless": true,
- "type": "virtualbox-iso",
- "iso_url": "{{ user `iso_url` }}",
- "iso_checksum_url": "{{ user `iso_checksum_url` }}",
- "iso_checksum_type": "sha1",
- "vm_name": "arch-desktop",
- "guest_os_type": "ArchLinux_64",
- "guest_additions_mode": "disable",
- "virtualbox_version_file": "",
- "vboxmanage": [
- ["modifyvm", "{{.Name}}", "--firmware", "efi"],
- ["modifyvm", "{{.Name}}", "--memory", "1024"],
- ["modifyvm", "{{.Name}}", "--accelerate3d", "on"]
- ],
- "boot_wait": "5s",
- "boot_command": [
- "<enter><wait40s>",
- "printf \"{{user `root_password`}}\\n{{user `root_password`}}\\n\" | passwd<enter>",
- "systemctl start sshd.service<enter>"
- ],
- "disk_size": 65536,
- "iso_interface": "sata",
- "hard_drive_interface": "sata",
- "output_directory": "dist/arch-desktop",
- "ssh_username": "root",
- "ssh_password": "{{user `root_password`}}",
- "ssh_timeout": "20m",
- "shutdown_command": "systemctl poweroff"
- }
- ],
- "provisioners": [
- {
- "type": "file",
- "source": "arch.sh",
- "destination": "arch.sh"
- },
- {
- "type": "file",
- "source": "install",
- "destination": "install"
- },
- {
- "type": "shell",
- "skip_clean": true,
- "expect_disconnect": true,
- "environment_vars": [
- "PACKER=y",
- "DEBUG=true",
- "enable_hibernation=y",
- "root_password={{user `root_password`}}",
- "username={{user `username`}}",
- "password={{user `password`}}"
- ],
- "script": "setup/install.sh"
- },
- {
- "type": "shell",
- "script": "setup/packer.sh",
- "pause_before": "10s"
- }
- ],
- "post-processors": [
- {
- "type": "vagrant",
- "compression_level": 9,
- "output": "dist/arch-desktop.box"
- }
- ]
- }
|