Score:0

Autoinstall issue 22.04.2 server packer

jo flag

Weird issue when using autoinstall its fires up cloud-init and starts doing something but gets to subiquity/meta/status_get and its falls over.

So heres what i'm using ubuntu 20.04 moved to 22.04 packer 1.9.1 deploying ubuntu-22.04.2-live-server-amd64.iso

  cd_files = [
    "./http/meta-data",
    "./http/user-data"
    ]
  cd_label = "cidata"
  boot_wait = "2s"

  boot_command = [
    "<enter><wait><f6><wait><esc><wait>",
    "linux /casper/vmlinuz ",
    "<wait><enter>",
    "initrd /casper/initrd",
    "<wait><enter>",
    "autoinstall",
    "<wait><enter>",
    "boot"
  ]

user-data file is as follows. (stripped to barebones)

#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: tf-edu-ubuntu
    realname: builduser
    username: builduser
    password: "encrypted"

this is the error im getting.

enter image description here

Any help would be appreciated even if its to get more logs.

Hoping someone one would have come across this? Well here goes.

Update added some logging to packer and found the following.

2023/07/21 09:12:13 packer-builder-vsphere-iso plugin: [INFO] Waiting for SSH, up to timeout: 2h46m40s
==> vsphere-iso.this: Waiting for SSH to become available...
2023/07/21 09:12:13 packer-builder-vsphere-iso plugin: [DEBUG] Error getting SSH config: SSH_AUTH_SOCK is not set

Update

With the SSH issue I used putty to connect to the server but the username and password used in both the user-data and vSphere configuration will not allow me to connect.


I found the answer tucked away. This worked and enabled cloudinit.

boot_command = [
    "<down><down><down><end>",
    " autoinstall ds=nocloud;",
    "<F10>"
  ]
waltinator avatar
it flag
Read the last half dozen lines of your picture. Do what it says.
Scott Johnstone avatar
jo flag
I'm new to Linux and packer so learning. I am not asking anyone to answer my question but point me in the right direction. Yes I see the add autoinstall to the kernel but where. Also I have enabled logging within packer. I am seeing the following ------------------- 2023/07/21 09:12:13 packer-builder-vsphere-iso plugin: [INFO] Waiting for SSH, up to timeout: 2h46m40s ==> vsphere-iso.this: Waiting for SSH to become available... 2023/07/21 09:12:13 packer-builder-vsphere-iso plugin: [DEBUG] Error getting SSH config: SSH_AUTH_SOCK is not set
waltinator avatar
it flag
Comments are designed for US to ask YOU questions about your Question. You should [Edit] your question to add information. By updating your Question, and using the formatting buttons, you make all the information available to new readers. People shouldn't have to read a long series of comments to get the whole story. AskUbuntu is a Question and Answer site, not a conversation site. If you have an update, [edit] your Question. If you have a new question, see [Ask].
Scott Johnstone avatar
jo flag
OK so I have added all the information. You then told me that "Read the last half dozen lines of your picture". Which I did and queried what you said added auto install to the boot section in various places. I also had already updated the question. So basically you have added nothing to a solution on the issue I'm having except to tell me what this site is about and how you want me to format a question? This isn't to be rude as I appreciate the help but your reply is not helpful.
Score:0
jp flag

The boot_command is literally typed into the console. You can open the console to the VM and see it happen.

For simplicity, I am going to assume that <enter><wait><f6><wait><esc><wait> gets to the grub command line. In your case, the remaining boot_command will type the following into the console.

linux /casper/vmlinuz 
initrd /casper/initrd
autoinstall
boot

You want them to type

linux /casper/vmlinuz autoinstall
initrd /casper/initrd
boot

That's what the screenshot is telling you. The autoinstall argument is not part of the kernel command line. Adjust your boot_command.

Scott Johnstone avatar
jo flag
Hi Andrew, I tried all combinations of this with 22.04 and it didn't work. I found an article tucked away that pointed me to the right commands to use with packer and 22.04. I have posted the answer in the above. This is in case anyone else gets the same issue.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.