Use Packer to create LUbuntu VirtualBox VM

First of all, I think this would be the question benefiting developers more that it benefit end users, thus I choose “Development” over “Support”. Now,

I was following
https://www.serverlab.ca/tutorials/dev-ops/automation/how-to-use-packer-to-create-ubuntu-18-04-vagrant-boxes/

And try to adapt it for lubuntu-20.04-desktop, but am really struggling to get it works. Long story short, this is what I’m getting in the end:

==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 6s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Using ssh communicator to connect: 127.0.0.1
==> virtualbox-iso: Waiting for SSH to become available...

But the problem is that, from the Typing the boot command step I got /install/vmlinuz not found

So, anyone has a working template for Packer to install LUbuntu 20.04 Desktop to VirtualBox VM automatically? Thx!

As far as I understand it, Packer is meant for server images. But Lubuntu is a Desktop distribution.

If your SSH connection tries to connect with Lubuntu: Lubuntu has only the openssh-client installed.

I am not sure, what the goal of your project is. Something like an OEM installation?

Oh, that’ll be 2nd and 3rd of my problems then, while the 1st one being I got /install/vmlinuz not found.

  • 2nd problem can easily be overcome by installing ssh-server using the preseed file.
  • as to the 3rd problems, that’s out of the scope of this question but since you ask, I actually want to automate my LUbuntu Desktop HD installation. I.e., doing it in VirtualBox VM is kind of a sprint-board.