Closed mcbenjemaa closed 12 months ago
I ran into a similar issue where the cloud init drive is failing to be unmounted. Pretty much after the cloud init does it's thing, it's supposed to get unmounted and boot with the hard disk but since the unmount fails, it ends up going to the select screen of trying to install ubuntu and etc again and that ultimately thanks you to the select the language. If we have a way to configure the boot order on packer, might be a good work around but for now I opted to just manually select boot from the next volume when that screen comes up as a small work around.
That's not what I'm expecting.
Ideally, I guess the Ubuntu team has changed something in the installer.
I tested the same setup in a different instance, which worked fine.
the issue was there's no DHCP
the issue was there's no DHCP
How did you resolve that?
the issue was there's no DHCP
How did you resolve that?
Please start new dhcp server for example with dnsmasq or dhcpd
start new dhcp server on proxmox or where? I have my router configured to give out dhcp leases already.
I'm migrating a working automatic installation of an Ubuntu server 18.04 to 22.04 and I'm currently facing the same issue. Can you add more details on how you fixed this specific issue ?
Did you added a "network" section in your meta-data YAML file ?
I'm migrating a working automatic installation of an Ubuntu server 18.04 to 22.04 and I'm currently facing the same issue. Can you add more details on how you fixed this specific issue ?
Did you added a "network" section in your meta-data YAML file ?
At the end my user-date yaml was not correct. RTFM !!
Where are the docs you looked at to find this manual?
Where are the docs you looked at to find this manual?
Mainly here
https://ubuntu.com/server/docs/install/autoinstall https://ubuntu.com/server/docs/install/autoinstall-quickstart
And I used these 2 tutos as well
https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ https://www.jimangel.io/posts/automate-ubuntu-22-04-lts-bare-metal/
You indeed need a DHCP connection for the installation.
For mine to work I needed to add ip=::::::dhcp:::
before autoinstall
, e.g. linux /casper/vmlinuz --- ip=::::::dhcp::: autoinstall ...
For ease of use with consistent assignment of fixed IP address, I also added mac_address
network_adapters {
:
mac_address = "repeatable"
mtu = 1 # Use the special value '1' to inherit the MTU value from the underlying bridge
}
Where are the docs you looked at to find this manual?
Mainly here
https://ubuntu.com/server/docs/install/autoinstall https://ubuntu.com/server/docs/install/autoinstall-quickstart
And I used these 2 tutos as well
https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/ https://www.jimangel.io/posts/automate-ubuntu-22-04-lts-bare-metal/
You indeed need a DHCP connection for the installation.
Can you please describe where the DHCP connection for the installation is needed and how to set it up? In proxmox? Or where?
the issue was there's no DHCP
Can you please describe it where DHCP should be setup? On proxmox? This seems to be a common issue, can you please add some description how you exactly solved it? Thanks!
I still cannot pass the language selection, I do have a network config:
#cloud-config
autoinstall:
version: 1
locale: en_GB
keyboard:
layout: gb
network:
version: 2
ethernets:
ens18:
dhcp4: true
ssh:
install-server: true
allow-pw: true
disable_root: true
ssh_quiet_keygen: true
allow_public_ssh_keys: true
packages:
- qemu-guest-agent
- sudo
storage:
layout:
name: direct
swap:
size: 0
user-data:
package_upgrade: false
timezone: Europe/London
users:
- name: ubuntu
groups: [adm, sudo]
lock-passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
passwd: secret
@rtacconi
My working config is the same as yours except for not having the network
section at all and lock_passwd
instead of lock-passwd
(see the comments on this post).
Presumably you have set passwd
to a hash, e.g. echo secret | mkpasswd -m sha-512 -s
?
@m19v
the issue was there's no DHCP
Can you please describe it where DHCP should be setup? On proxmox? This seems to be a common issue, can you please add some description how you exactly solved it? Thanks!
My router provides DHCP for the network, but without telling the VM to use DHCP, it wouldn't obtain its networking config during setup.
Further to https://github.com/hashicorp/packer-plugin-proxmox/issues/241#issuecomment-2028897883 above, my settings for boot_command
and boot_key_interval
got DHCP working
boot_command = [
"<wait3s>c<wait3s>",
"linux /casper/vmlinuz --- ",
# <client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>:...
"ip=::::::dhcp::: ", # autoconf=dhcp - this is the line I had to add to get DHCP working
# IP of Windows PC with port mapped to WSL2
"autoinstall 'ds=nocloud-net;s=http://192.168.0.90:8336/'", # even got it working with WSL2!
"<enter><wait>",
"initrd /casper/initrd",
"<enter><wait>",
"boot",
"<enter>"
]
boot_key_interval = "150ms" # type slowly! seems to guarantee more reliable builds even with non-boot_command steps?
@m19v
the issue was there's no DHCP
Can you please describe it where DHCP should be setup? On proxmox? This seems to be a common issue, can you please add some description how you exactly solved it? Thanks!
My router provides DHCP for the network, but without telling the VM to use DHCP, it wouldn't obtain its networking config during setup.
Further to #241 (comment) above, my settings for
boot_command
andboot_key_interval
got DHCP workingboot_command = [ "<wait3s>c<wait3s>", "linux /casper/vmlinuz --- ", # <client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>:... "ip=::::::dhcp::: ", # autoconf=dhcp - this is the line I had to add to get DHCP working # IP of Windows PC with port mapped to WSL2 "autoinstall 'ds=nocloud-net;s=http://192.168.0.90:8336/'", # even got it working with WSL2! "<enter><wait>", "initrd /casper/initrd", "<enter><wait>", "boot", "<enter>" ] boot_key_interval = "150ms" # type slowly! seems to guarantee more reliable builds even with non-boot_command steps?
Thank you very much I got in working if I run packer on Windows cmd, but with WSL2 it is not working. The problem with WSL2 is the http server is only reachable with localhost:
WSL2 is the http server is only reachable with localhost
You can reach it if you configure Windows to proxy the http server port through to WSL. There are plenty of posts that show how to do that for all kinds of use cases where you want to run a service within WSL but expose it externally. See accessing-a-wsl-2-distribution-from-your-local-area-network-lan
netsh interface portproxy add v4tov4 listenport=<yourPortToForward> listenaddress=0.0.0.0 connectport=<yourPortToConnectToInWSL> connectaddress=(wsl hostname -I)
The DHCP misconfiguration is not the only way the installer TUI can be triggered, any failure to reach the autoinstall directives will do so -- for example a firewall issue or a blocked port on the machine serving the configuration over HTTP.
I came across this situation and it bothered me for fews days. Installer stuck on language selection of welcome screen due to lack of user-data, it had nothing to do with the config error of user-data or dhcp server.Pls check the log of http server to see if user-data is being correctly transfered via wget. The download http URL on my grub.cfg is wrong (http:/// There's an extra slash) but manually I test wget user-data using right url http://, the problem was finally discovered
Overview of the Issue
I used packer to build proxmox template using this plugin, although that was working recently. But, now, there's something strange happening.
The VM gets booted to the installer, and then it says,
Waiting for Cloudinit...
and then unexpectedly goes to the language selection page ??? That's not true!I'm using Ubuntu:
ubuntu-22.04.2-live-server-amd64.iso
Reproduction Steps
Steps to reproduce this issue
Plugin and Packer version
From
packer version
Simplified Packer Buildfile
https://github.com/kubernetes-sigs/image-builder/blob/main/images/capi/packer/proxmox/packer.json
Operating system and Environment details
Ubuntu:
ubuntu-22.04.2-live-server-amd64.iso
Log Fragments and crash.log files