1

Intro

I'm new to KVM. I'm preparing an instance of pfSense in KVM; running this gets me close but is not completely working:

virt-install \
    --name pfsense \
    --os-variant freebsd11.2 \
    --virt-type kvm \
    --hvm \
    --vcpus 2 \
    --memory 2048 \
    --graphics none \
    --boot hd \
    --disk format=raw,readonly=on,path=/var/lib/libvirt/boot/pfSense-CE-memstick-serial-2.4.4-RELEASE-p1-amd64.img \
    --disk size=16,bus=virtio \
    --autostart

The above did run successfully with an interactive textual terminal, but the ASCII art used by the installer was all wrong (line art was replaced by latin letters, mostly "q"). I'm considering the following additional arguments to accommodate a simple, text-mode-only installation, with keyboard and screen attached directly to the host:

  • --boot useserial=on
  • --extra-args 'console=ttyS0'
  • --serial pipe or --serial pty
  • --channel pipe or --channel pty
  • --console pty,target_type=virtio
  • Omit --noautoconsole

Related

KVM Guest installed from console. But how to get to the guest's console? - Does require a text terminal, but doesn't go into detail on the above options, nor is it about pfSense.

Questions

  • What is the difference between --serial, --channel, --console and --extra-args 'console=ttyS0', particularly what they do to the host versus guest?
  • What combination of them would be most appropriate to use for a pfSense guest?
  • How do I fix the ASCII art rendering issue?
Reinderien
  • 202
  • 2
  • 13
  • 1
    Does the pfSense ISO even do serial console at all? I thought only the memstick-serial media did. – Michael Hampton Feb 11 '19 at 03:43
  • @MichaelHampton I can't tell, so I'm switching to memstick-serial - along with replacing `--cdrom` with `--location`, and `--paravirt` with `--hvm` by necessity. – Reinderien Feb 11 '19 at 16:29
  • @MichaelHampton I did end up switching to memstick-serial, but rather than `location` I ended up needing to use `disk`. That part works but the serial connection is still a little wonky. – Reinderien Feb 11 '19 at 18:18
  • Have you considered just doing a normal installation and setting up the serial console later (or not at all)? – Michael Hampton Feb 11 '19 at 20:39
  • @MichaelHampton What do you mean by "normal installation"? If you mean using a VGA console, then that isn't possible because this server doesn't have X; it's headless. – Reinderien Feb 11 '19 at 20:41
  • Yes, I mean a normal VGA console. And you can certainly do that on a headless server; use virt-manager on your own computer and set it up with an [ssh connection to your hypervisor](https://i.stack.imgur.com/YIfqw.png). Virt-manager will then run everything including the graphical consoles of your VMs over the ssh tunnel. – Michael Hampton Feb 11 '19 at 20:44
  • It's technically an option, but for my own learning purposes I'd like to see how to do it properly in text mode. – Reinderien Feb 11 '19 at 20:47
  • @Reinderien did you have any success with this serial installation? – Jared Nov 09 '20 at 15:09
  • 1
    Unfortunately this environment is long gone – Reinderien Nov 09 '20 at 15:14

1 Answers1

1

I am using this configuration for start pfsense installation in KVM (qemu):

virt-install --hvm --connect qemu:///system --network type=direct,source=p1p1,source_mode=bridge --mac=52:54:00:13:aa:f0 --network type=direct,source=p1p2,source_mode=bridge --mac=52:54:00:13:aa:f1 --network type=direct,source=p1p2,source_mode=bridge --mac=52:54:00:13:aa:f2 --name fw-01.juvie.org --ram=2048 --vcpus=2 --cpu=kvm64 --os-type=freebsd --os-variant=freebsd11.0 --disk path=/var/lib/libvirt/images/iso/pfSense-CE-memstick-serial-2.4.5-RELEASE-amd64.img --boot hd,menu=on,useserial=on  --disk path=/var/lib/libvirt/images/production_adata/fw-01.juvie.org.qcow2,size=20 --graphics none --console target_type=serial

Maybe it will be help for you.