Home > Back-end >  Ubuntu 20.04 packer Autoinstall prompting GUI
Ubuntu 20.04 packer Autoinstall prompting GUI

Time:03-10

Working with Ubuntu 20.04, Packer and vSphere, I am having issues getting the autoinstall to work correctly. It will load and enter the autoinstall command in the boot options section, and when it processes I see it determine the network but afterwards it boots like a normal install and prompts for user interaction.

I have verified that I can reach the User-Data file from the browser and it exists, and that it is correctly typing in the command as I watch it in the vSphere view.

Questions:

  1. is the boot command correct? (I have tried a variety of options after some time googling all the same results)
  2. Is there a parameter I am missing to override the GUI?

Boot Command:

  boot_command = [
    " <up><wait>",
        " <up><wait><esc><wait>",
     "<f6><wait><esc><wait>",
      " autoinstall net.ifnames=0 biosdevname=0 ip=dhcp ipv6.disable=1 ds=nocloud-net;seedfrom=http://{{.HTTPIP}}:{{.HTTPPort}}/",
      "<enter><wait>",
      "<enter>"
  ]

user-data

#cloud-config
autoinstall:
  version: 1
  locale: en_US
  keyboard:
    layout: en
    variant: us
  network:
    network:
      version: 2
      ethernets:
        eth0:
          dhcp4: true
  storage:
    layout:
      name: lvm
  identity:
    hostname: ubuntu-server
    username: ubuntu
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
  ssh:
    install-server: yes
    allow-pw: true
  user-data:
    disable_root: false
  packages:
    - openssh-server
    - build-essential
  late-commands:
    - echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu

CodePudding user response:

I was able to resolve this, by reconfiguring the networking on the VM host and the script.

The HTTP_Directory that is published by packer was not able to communicate with the VM, there were no notable errors that I had scene only the bypassing to the GUI for installation.

  • Related