To build the images in this repository, you will need:
When extending the template, the notes in the "Troubleshooting" may be helpful.
cd base/distro/ packer build -parallel=false template.json
Note: when building images that include
virtualbox-iso builders, the
-parallel=false is most likely necessary.
In most cases, images only need to be built with one builder. Supported builders are found in the template file. The following example is for building using VirtualBox.
cd base/distro/ packer build -only=virtualbox-iso template.json
This will output images to the
dist directory, within the corresponding directory to the template and builder type.
$ tree dist dist └── void-x86_64-20171007-qemu ├── void-x86_64-20171007.gz # a compressed raw disk image for sending over the network ├── void-x86_64-20171007.qcow2 # a qcow disk image └── void-x86_64-20171007.raw # a raw disk image
To deploy a built image, start in the Linode Manager.
ext4disk on the destination Linode.
Now that the Linode is booted into Rescue Mode and has SSH up and listening, the disk image can be copied to the remote device.
This again uses the
void image as an example.
There is a helper
bin/sync.sh to help with this.
Here is an example.
The target IP address needs to be replaced.
It has been excluded to avoid copy-paste accidents with
cd dist/void-x86_64-20171007-qemu ../../bin/sync.sh void-x86_64-20171007 123.45.nn.nn /dev/sda
/dev/sdband all helpers disabled.
To get more verbose output from packer, print the logs to the console.
PACKER_LOG=1 packer build template.json
Provisioning scripts are currently being run with the
Because of this, all commands that are run during the build step will be printed to the console, and therefore the packer logs.
To stop this behavior, just remove the
-x from the first line of the scripts, leaving only