Closed Poeschl closed 1 year ago
Hoi 👋 Thanks for the question!
A couple points:
Ive changed the example user-data.basic file, it's now much simpler and as such is now less error prone.
I've also moved the previous version of the user-data file to user-data.advance and removed the storage section. This avoids and error in VM settings where the drives are not properly detected during the Storage module's run.
I was able to re-create the described behavior by running the image-create script in the same way you did on a desktop iso. I saw a successful completion of the pxeless process, but was sent to the installation wizard. I then repeated the test with a server ISO and was sent through the autoinstaller process.
I don't believe that the desktop image uses the same installer as the server image (i could be mistaken through) which would cause the behavior you described. I'm basing this on these docs https://ubuntu.com/server/docs/install/autoinstall
While I can't provide a solution to the exact problem at hand, I can suggest that you install your desired desktop environment as part of the the server iso's cloud-init process. there is a great blog post by Pudget Systems that talks about how they use this process to image their laptops.
And here is the gist with their config file: https://gist.github.com/dbkinghorn/c236aea31d76028b2b6ccdf6d3c6f07e
In their setup, they install a minimal desktop then switch the network to use network-manager so wifi will work. This creates a similar end-result to installing via one of the desktop iso, though it is not a live-image.
If it helps for parity of testing environments, I test these images using a QEMU setup with 2 drives (the ISO as a CD-ROM and a blank virtual disk) then attach over vnc using TigerVNC to control the grub selection/reboots that way.
│ # luanch the VM to install from ISO to Disk
216 │ create_vm_from_iso(){
217 │ log "💿 Creating VM from iso file"
218 │ tmux new-session -d -s "${VM_NAME}_session"
219 │ tmux send-keys -t "${VM_NAME}_session" "sudo qemu-system-x86_64 \
220 │ -machine accel=kvm,type=q35 \
221 │ -cpu host,kvm="off",hv_vendor_id="null" \
222 │ -smp sockets="$SOCKETS",cores="$PHYSICAL_CORES",threads="$THREADS" \
223 │ -m "$MEMORY" \
224 │ -cdrom $ISO_FILE \
225 │ -object iothread,id=io1 \
226 │ -device virtio-blk-pci,drive=disk0,iothread=io1 \
227 │ -drive if=none,id=disk0,cache=none,format=qcow2,aio=threads,file=hdd.img \
228 │ $NETDEV
229 │ $DEVICE
230 │ -bios /usr/share/ovmf/OVMF.fd \
231 │ -vga virtio \
232 │ -usbdevice tablet \
233 │ -vnc $HOST_ADDRESS:$VNC_PORT \
234 │ $@" ENTER
235 │ tmux_stream
236 │ }
Thanks a lot for this really details reply. :+1: I will try the server image to see if its an issue with the desktop iso. For my usecase I normally do not need a UI, but if needed it could be installed afterwards (as you said).
Trying again with the server iso and it worked perfectly. So indeed the desktop variant is not supporting the autoinstall procedure. :grinning:
Trying again with the server iso and it worked perfectly. So indeed the desktop variant is not supporting the autoinstall procedure. 😀
Happy to hear it worked for you - Cheers!
Thanks for taking over the ubuntu-autoinstall-iso-generator repro :heart:
Is there a working example known for an automatic install of ubuntu 22.04.1? I'm having issues on setting it up correctly.
When I'm trying to use the provided sample and execute the builder with a pre-downloaded ubuntu iso and the command
the iso is successfully created.
Now when booted from this iso in a VM, selected the default grup entry, the automatic procedure is not started correctly and I'm seeing the install wizard.
I looked into the syslog and the commands in the kernel seem to be correct. Any clues where to look at?