Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong module in user-data.advanced file #21

Closed
Mwiku opened this issue Nov 17, 2022 · 3 comments
Closed

Wrong module in user-data.advanced file #21

Mwiku opened this issue Nov 17, 2022 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@Mwiku
Copy link

Mwiku commented Nov 17, 2022

The user-data.advanced file contains the runcmd module, however, this does not work on autoinstall or at least with the current version. Did u test it?

@cloudymax
Copy link
Owner

cloudymax commented Nov 18, 2022

Hoi 👋, thanks for the question!

As you correctly pointed out runcmd isn't a part of autoinstall - it's actually a part of cloud-init. The advanced sample in question combines both autoinstall and cloud-init into a single file as noted here:

user-data: # Cloud-init starts here after reboot

Its understandably confusing because many of the auto-install modules share the same name as cloud-init modules. You can find more information about cloud-init modules here. I also maintain a set of cloud-init (not auto-install) profiles for use with virtual-machines here for reference

As for testing - I just rebuilt a VM using this profile and verified that it builds properly, though found I needed to change the username specified for setting the brew path (that has been fixed now)

Screenshot 2022-11-18 at 07 05 53

In general, testing for pxeless is done via QEMU using this project to generate the specific commands, in this case:

sudo qemu-system-x86_64 \
-machine accel=kvm,type=q35 \
-cpu host,kvm=off,hv_vendor_id=null \
-smp 8,sockets=1,cores=4,threads=2,maxcpus=8 \
-m 8G \
-cdrom /home/max/repos/pxeless/ubuntu-autoinstall.iso \
-object iothread,id=io1 \
-device virtio-blk-pci,drive=disk0,iothread=io1 \
-drive if=none,id=disk0,cache=none,format=qcow2,aio=threads,file=hdd.img \
-netdev user,id=network0,hostfwd=tcp::1234-:22 \
-device virtio-net-pci,netdev=network0 \
-serial stdio -vga virtio -parallel none \
-bios /usr/share/ovmf/OVMF.fd \
-usbdevice tablet \
-vnc 192.168.50.100:0

The virtual machine uses the pxeless ISO file as a boot drive and the GRUB/boot prompts are navigated via a VNC connection with the VM.

Hope this helps!

@cloudymax cloudymax self-assigned this Nov 18, 2022
@cloudymax cloudymax added the question Further information is requested label Nov 18, 2022
@Mwiku
Copy link
Author

Mwiku commented Nov 18, 2022

Thanks for the swift reply and for maintaining the project.

@Mwiku Mwiku closed this as completed Nov 18, 2022
@cloudymax
Copy link
Owner

Thanks for the swift reply and for maintaining the project.

No problem! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants