Packer Ubuntu 20.04 autoinstall via CD drive

Hi

What makes you think that your cdrom with user-data and meta-data on it is mounted to /cidata/? In my case the ubuntu installer did not mount anything.

According to the documentation here https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html the statement you have in the boot_command is wrong.
IS: “ds=nocloud-net;s=/cidata/”,
SHOULD: “ds=nocloud;s=/cidata/”,

After you have fixed this, most probably it still does not work. I think the gui installer still pop’s up asking for the installation language. If this is the case you can start a shell from the [ HELP ] menu to check where your cdrom is mounted. In my case the cdrom is attached to /dev/sr1 but not mounted anywhere into the installer. To check if this is the same for you do: mount /dev/sr1 /mnt ; ls /mnt. You should see your user- and meta-data.
In my case I did not find a mountpoint /cidata/ ( the place where you configured cloud- init to find user-data and meta-data) or any other mountpoint for my cdrom with user- meta-data.
If I’m wrong and it works for you please post your solution and the versions of packer and vsphere you use because I fight exactly the same problem like you. I use packer 1.6.6 and vsphere 7.0

Thanks and best
Roland

1 Like