How to enable two displays in Ubuntu VM?



I’m trying to create a VM running Ubuntu 22.04 that would use two virtual displays. I’ve tried adding -device qxl to raw.qemu but that results only in lspci outputing:

00:03.0 Display controller: Red Hat, Inc. QXL paravirtual graphic card (rev 05)
04:00.0 VGA compatible controller: Red Hat, Inc. Virtio GPU (rev 01)

When clicking View->Displays->Display 2 in Spice, a window saying “Waiting for display 2” appears. I’ve tried appending max_outputs=2 to the initial raw.qemu, but that didn’t help.
xrandr output in all cases contains only one virtual display. I do not need qxl specifically, but I didn’t know how to increase the heads integer for the default virtio VGA.

Any help or hint would be greatly appreciated!