Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "builders": [
- {
- "name": "ubuntu-2004",
- "type": "virtualbox-iso",
- "guest_os_type": "Ubuntu_64",
- "headless": false,
- "iso_url": "../iso/mini.iso",
- "iso_checksum": "e5bf713621b43207dead707396da29f6",
- "ssh_username": "vmadmin",
- "ssh_password": "vmadmin",
- "ssh_timeout": "40m",
- "http_directory": "http",
- "memory": 1024,
- "disk_size": 7000,
- "boot_wait": "5s",
- "boot_command": [
- "<tab><wait>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
- "linux initrd=initrd.gz",
- " auto=true",
- " priority=critical",
- " url=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu-20.04-preseed.txt",
- " hostname=mincvm",
- " DEBCONF_DEBUG=5",
- "<enter>"
- ],
- "shutdown_command": "echo 'vmadmin'|sudo -S shutdown -P now",
- "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
- "virtualbox_version_file": ".vbox_version",
- "vm_name": "packer-ubuntu-20.04-amd64",
- "vboxmanage": [
- ["modifyvm", "{{.Name}}", "--cpuexecutioncap", "100"],
- ["modifyvm", "{{.Name}}", "--cpus", "4"],
- ["modifyvm", "{{.Name}}", "--memory", "4096"],
- ["modifyvm", "{{.Name}}", "--usb", "off"],
- ["modifyvm", "{{.Name}}", "--audio", "none"],
- ["modifyvm", "{{.Name}}", "--nictype1", "virtio"],
- ["modifyvm", "{{.Name}}", "--graphicscontroller", "VMSVGA"]
- ]
- }
- ],
- "provisioners": [
- {
- "type": "shell",
- "inline": [
- "echo 'vmadmin'|sudo -S apt-get update",
- "echo 'vmadmin'|sudo -S apt-get upgrade -y"
- ]
- }
- ],
- "post-processors": [{
- "type": "vagrant",
- "compression_level": "8",
- "output": "output/ubuntu-20.04.box"
- }]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement