Feature Request: Spawn getty on serial console in installer iso

Hi there! I’m trying to install NixOS to test it out and learn in a libvirt-managed qemu/kvm VM.

Booting it with virt-install:

install: clean $(DISKDIR)/$(HOSTNAME).qcow2
        -virsh destroy $(HOSTNAME)
        -virsh undefine $(HOSTNAME)
        virt-install \
                --connect=qemu:///system \
                --name="$(HOSTNAME)" \
                --bridge="vlan2000" \
                --mac="$(MAC)" \
                --cdrom $(BASEDIR)/latest-nixos-minimal-x86_64-linux.iso \
                --disk="$(DISKDIR)/$(HOSTNAME).qcow2,bus=scsi,discard=unmap,format=qcow2,size=$(DISKSIZE)" \
                --controller type=scsi,model=virtio-scsi \
                --ram=8192 \
                --vcpus=$(VCPUS) \
                --cpu host \
                --autostart \
                --hvm \
                --arch x86_64 \
                --accelerate \
                --check-cpu \
                --os-type=linux \
                --force \
                --watchdog=default \
                --console pty,target_type=serial \
                --graphics vnc,listen=0.0.0.0,port=61337 \
                --noautoconsole \
                --debug
        make console

I only get the following output:

Loading /boot/bzImage... ok
Loading /boot/initrd...ok

Then nothing. I had to change the --graphics line above to VNC in to the booted installer to use the text console.

If a getty (like spawns on the vts) could spawn on the serial console in the installer iso, this would allow an easy text mode install via virt-install. Otherwise, graphics are required (spice or vnc or whatever).

Thanks for the consideration.

I confirmed that simply running a systemctl start serial-getty@ttyS0 in the booted ISO (via vnc) was sufficient to enable a working serial console for virt-install.

It appears there is discussion at:

https://github.com/NixOS/nixpkgs/issues/58198