Skip to content

[Feature] - Add 'boot_command' over VNC like Qemu builder #197

@danielfdickinson

Description

@danielfdickinson

Is your feature request related to a problem? Please describe.

The Alpine Linux ISO does not include cloud-init which means initial setup has to be done over VNC. With the Packer Qemu build there is a boot_command option that allows to interact with the instance over VNC in order to do 'just enough' to SSH in.

I have utilized this ability to create a QCOW2 image from the Alpine ISO that includes cloud init in a public repo.

The documentation for the boot_command capability can be found in the Packer Documentation (see the 'Boot Configuration' section).

The source code for the qemu builder is at: https://github.com/hashicorp/packer-plugin-qemu/tree/main

Describe the solution you'd like

A similar boot_command capability for the Vultr plugin that allows controlling the instance via VNC in order to enable SSH access (after which regular provisioning can be be used).

Describe alternatives you've considered

Since the goal is automation doing this manually as described in the Vultr docs for Alpine Linux doesn't solve the problem, and would require doing this for every new release of Alpine Linux.

Another option would be to be able to upload a QCOW2 or RAW boot image rather than only an ISO (such as can be done with OpenStack). AIUI the snapshots option is not just a disk image but a whole VM image which means uploading a QCOW2 or RAW generated using the public repo I created, above, is not currently an option with Vultr.

EDIT: I was able to upload (but have not yet tested) a RAW image generated use the repo I mentioned from a web hosting instance I have (it would be helpful to be able to upload directly from my local machine, but that's a separate issue), so it looks like there may be a workaround for now.

EDIT #2: While it was possible to upload the image, it fails to boot an instance. So currently there is no automation-friendly workaround.

EDIT #3: Mea culpa, the workaround from the first edit works; I had an error in my Packer scripts that didn't use the snapshot properly. So there is a workround for now. Example repository at https://gitlab.com/danielfdickinson/alpine-two-stage-packer-for-vultr

From what I have read of the Alpine Docs, Wiki, and mailing list, "cloud-init" is considered too heavy and efforts are focused on tiny cloud init, and I am new to Alpine (and have not yet posted to the mailing list), so it seems that requesting adding a 'cloud-init' image to the Alpine releases would be a non-starter.

In addition this would enable more distros to be prepared for use on Vultr from their main distribution ISO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions