On Mon, Mar 05, 2018 at 11:37:08AM +0100, Martin Kletzander wrote:
On Wed, Feb 28, 2018 at 03:10:08PM +0800, Meina Li wrote:
>Hi
>
>For the latest seabios version, it said: Support for vga emulation over a
>serial port in SeaBIOS (sercon).
>
>So I want to know how can I find the application of this feature in
>libvirt? And whether my understanding is correct?
>There are no related instruction on the website:
https://libvirt.org/
>
>My understanding:
>(1) The feature means: we can set this the IO address of a serial port to
>"video" element to enable SeaBIOS' VGA adapter emulation on the given
>serial port.
Looks like it, however the question is if that's somehow set as a default or
not. According to the docs for SeaBIOS it says:
sercon-port: Set this to the IO address of a serial port to enable SeaBIOS' VGA
adapter emulation on the given serial port.
However looking at current QEMU master, there is no such setting being done (I
just did simple git grep sercon-port). However it looks like other options are
being set using fw_cfg_add_file, so it should be possible to set that using
something like:
-fw_cfg name=etc/sercon-port,string=0x3F8
but when I tried (with seabios 1.11.0), I realized I'm not sure how to see
whether it works or not. How would I try that, easily?
Anyway, if the above is the case, we don't _yet_ have an option in libvirt's
XML. We will need to add support for fw_cfg, I just didn't, for now.
>(2) Libvirt XML examples and with this xml the guest can start successfully:
> <controller type='virtio-serial' index='0'>
> <address type='pci' domain='0x0000' bus='0x00'
slot='0x06'
>function='0x0'/>
> </controller>
> <video>
> <model type='vga' vram='16384' heads='1'
primary='yes'/>
> <address type='virtio-serial' controller='0' bus='0'
port='3'/>
> </video>
>
I'm not sure how the inner workings of this are supposed to work, so I can't
comment on the XML structure.
Nah, we cracked the code. I don't know why I was overcomplicating this, but it
just means that seabios can now do what sgabios was created for (if I'm
understanding this correctly). So with libvirt you could do that even before,
it's just a matter of adding `<bios useserial="yes"/>` to domain XML
under
`<os/>` section. Libvirt will append `-device sga` onto QEMU's command line
which will add sgabios on top of seabios and it will do the same thing.
If there's something more in that, just let me know, but I doubt that.
What's weird, though, is that if I run updated QEMU with only '-nographic'
option, it just works. I see the iPXE messages and a prompt and I can use it.
However if I create a machine without `<bios useserial="yes"/>` and try
to
`virsh start --console` it, I get no output, only with that XML element added.
I whould investigate further, but I don't have enough time+knowledge to go deep
into QEMU and figure that difference out. And I don't see how the difference
could be caused by libvirt.
Martin