summaryrefslogtreecommitdiff
path: root/scripts/packer.json
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/packer.json')
-rw-r--r--scripts/packer.json89
1 files changed, 61 insertions, 28 deletions
diff --git a/scripts/packer.json b/scripts/packer.json
index 5d5f201e..b09b9834 100644
--- a/scripts/packer.json
+++ b/scripts/packer.json
@@ -7,6 +7,7 @@
"builders":
[
{
+ "name": "qemu-image",
"type": "qemu",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
@@ -16,46 +17,78 @@
"disk_size": 4096,
"format": "raw",
"headless": true,
- "accelerator": "kvm",
+ "accelerator": "tcg",
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_username": "vyos",
"ssh_password": "vyos",
"ssh_port": 22,
- "ssh_wait_timeout": "30s",
+ "ssh_wait_timeout": "300s",
"vm_name": "vyos_qemu_image.img",
"net_device": "virtio-net",
"disk_interface": "virtio",
"boot_wait": "5s",
"boot_command":
[
- "<enter><wait10><wait10>",
- "vyos<enter><wait>",
- "vyos<enter><wait>",
- "install image<enter><wait>",
- "<enter><wait>",
- "<enter><wait>",
- "<enter><wait>",
- "Yes<enter><wait>",
- "<enter><wait10>",
- "<enter><wait>",
- "<enter><wait>",
- "vyos<enter><wait>",
- "vyos<enter><wait>",
+ "<enter><wait3m>",
+ "vyos<enter><wait5>",
+ "vyos<wait><enter><wait10>",
+ "install image<enter><wait5>",
+ "<enter><wait5>",
+ "<enter><wait5>",
+ "<enter><wait5>",
+ "Yes<enter><wait5>",
"<enter><wait10>",
- "reboot<enter><wait>",
- "Yes<enter><wait10><wait10><wait10>",
- "vyos<enter><wait>",
- "vyos<enter><wait>",
- "configure<enter><wait>",
- "delete system console<enter><wait>",
- "set interface ethernet eth0 address dhcp<enter><wait>",
- "set service ssh<enter><wait>",
- "commit<enter><wait>",
- "save<enter><wait>",
- "exit<enter><wait>",
- "reboot<enter><wait>",
- "Yes<enter><wait10><wait10><wait10><wait10><wait10>"
+ "<enter><wait5>",
+ "<enter><wait5>",
+ "vyos<enter><wait5>",
+ "vyos<enter><wait10>",
+ "<enter><wait10><wait10>",
+ "reboot<enter><wait5>",
+ "Yes<enter><wait3m>",
+ "vyos<enter><wait5>",
+ "vyos<enter><wait10>",
+ "configure<enter><wait5>",
+ "set interface ethernet eth0 address dhcp<enter><wait5>",
+ "set service ssh<enter><wait5>",
+ "commit<enter><wait5>",
+ "save<enter><wait5>",
+ "delete interface ethernet eth0 hw-id<enter><wait5>",
+ "commit<enter><wait5>",
+ "save<enter><wait5>",
+ "exit<enter><wait5>"
+ ]
+ },
+ {
+ "name": "vmware-image",
+ "type": "qemu",
+ "iso_url": "{{user `output_directory`}}/qemu/vyos_qemu_image.img",
+ "iso_checksum_type": "none",
+ "output_directory": "{{user `output_directory`}}/vmware",
+ "shutdown_command": "sudo halt -p",
+ "disk_image": true,
+ "disk_size": 4096,
+ "format": "raw",
+ "headless": true,
+ "accelerator": "tcg",
+ "ssh_host_port_min": 2222,
+ "ssh_host_port_max": 2229,
+ "ssh_username": "vyos",
+ "ssh_password": "vyos",
+ "ssh_port": 22,
+ "ssh_wait_timeout": "300s",
+ "vm_name": "vyos_vmware_image.img",
+ "net_device": "virtio-net",
+ "disk_interface": "virtio",
+ "boot_wait": "5s"
+ }
+ ],
+ "provisioners": [
+ {
+ "type": "shell",
+ "only": ["vmware-image"],
+ "scripts": [
+ "scripts/packer-scripts/vmware.sh"
]
}
]