mirror of https://github.com/MISP/misp-packer
added a builder for vmware
parent
fca8d16a81
commit
670dbf5217
|
@ -13,7 +13,7 @@ to the IP address you will associate to your VM
|
||||||
|
|
||||||
Launch the generation:
|
Launch the generation:
|
||||||
|
|
||||||
$ packer build misp.json
|
$ packer build -only=virtualbox-iso misp.json
|
||||||
|
|
||||||
A VirtualBox image will be generated and stored in the folder
|
A VirtualBox image will be generated and stored in the folder
|
||||||
*output-virtualbox-iso*. You can directly import it in VirtualBox.
|
*output-virtualbox-iso*. You can directly import it in VirtualBox.
|
||||||
|
|
44
misp.json
44
misp.json
|
@ -2,18 +2,22 @@
|
||||||
"variables": {
|
"variables": {
|
||||||
"ssh_name": "packer",
|
"ssh_name": "packer",
|
||||||
"ssh_pass": "packer",
|
"ssh_pass": "packer",
|
||||||
"hostname": "packer"
|
"hostname": "packer",
|
||||||
|
"vm_name": "MISP_demo",
|
||||||
|
"disk_size": "10000"
|
||||||
},
|
},
|
||||||
|
|
||||||
"builders": [{
|
"builders": [{
|
||||||
"type": "virtualbox-iso",
|
"type": "virtualbox-iso",
|
||||||
"guest_os_type": "Ubuntu_64",
|
"guest_os_type": "Ubuntu_64",
|
||||||
|
"format": "ova",
|
||||||
|
"vm_name": "{{user `vm_name`}}",
|
||||||
|
|
||||||
"vboxmanage": [
|
"vboxmanage": [
|
||||||
["modifyvm", "{{.Name}}", "--vram", "32"]
|
["modifyvm", "{{.Name}}", "--vram", "32"]
|
||||||
],
|
],
|
||||||
|
|
||||||
"disk_size" : 10000,
|
"disk_size": "{{user `disk_size`}}",
|
||||||
|
|
||||||
"iso_url": "http://releases.ubuntu.com/17.04/ubuntu-17.04-server-amd64.iso",
|
"iso_url": "http://releases.ubuntu.com/17.04/ubuntu-17.04-server-amd64.iso",
|
||||||
"iso_checksum": "ca5d9a8438e2434b9a3ac2be67b5c5fa2c1f8e3e40b954519462935195464034",
|
"iso_checksum": "ca5d9a8438e2434b9a3ac2be67b5c5fa2c1f8e3e40b954519462935195464034",
|
||||||
|
@ -41,6 +45,42 @@
|
||||||
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
||||||
"initrd=/install/initrd.gz -- <enter>"
|
"initrd=/install/initrd.gz -- <enter>"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vmware-iso",
|
||||||
|
"guest_os_type": "ubuntu-64",
|
||||||
|
"vm_name": "{{user `vm_name`}}",
|
||||||
|
|
||||||
|
"disk_size": "{{user `disk_size`}}",
|
||||||
|
|
||||||
|
"iso_url": "http://releases.ubuntu.com/17.04/ubuntu-17.04-server-amd64.iso",
|
||||||
|
"iso_checksum": "ca5d9a8438e2434b9a3ac2be67b5c5fa2c1f8e3e40b954519462935195464034",
|
||||||
|
"iso_checksum_type": "sha256",
|
||||||
|
|
||||||
|
"http_directory" : "preseeds",
|
||||||
|
"http_port_min" : 9001,
|
||||||
|
"http_port_max" : 9011,
|
||||||
|
|
||||||
|
"ssh_username": "{{user `ssh_name`}}",
|
||||||
|
"ssh_password": "{{user `ssh_pass`}}",
|
||||||
|
"ssh_wait_timeout": "20m",
|
||||||
|
"ssh_pty" : "true",
|
||||||
|
|
||||||
|
"shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P now",
|
||||||
|
|
||||||
|
"boot_command" : [
|
||||||
|
"<esc><esc><enter><wait>",
|
||||||
|
"/install/vmlinuz noapic ",
|
||||||
|
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
|
||||||
|
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
|
||||||
|
"hostname={{user `hostname`}} ",
|
||||||
|
"fb=false debconf/frontend=noninteractive ",
|
||||||
|
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA ",
|
||||||
|
"keyboard-configuration/variant=USA console-setup/ask_detect=false ",
|
||||||
|
"initrd=/install/initrd.gz -- <enter>"
|
||||||
|
],
|
||||||
|
|
||||||
|
"skip_compaction": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue