[Libvir] RFC: Supporting serial & parallel ports for QEMU (and improving Xen)

Daniel P. Berrange berrange at redhat.com
Mon May 21 19:18:42 UTC 2007


On Mon, May 21, 2007 at 10:58:02AM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> >The question as ever is how to represent this in XML. For serial ports 
> >we'll
> >stick with '<console>', while parallel ports we might as well use a better
> >named  '<parallel>'.
> 
> Hmm, I'd prefer to use '<serial>', much less confusing in the long run. 
> And maybe alias '<console>' to '<serial port=0>' for compatibility.

There is actually one compelling reason to do this - the Xen paravirt 
console really isn't a true serial port. It is just a dumb text console
driver, so perhaps it is better to distinguish <console> from <serial>
with this scenario. We already use <console> for HVM too though - so
perhaps we should say

  - <parallel> - parallel ports
  - <serial>  - serial ports
  - <console>  - first text based virtual console channel

So, paravirt Xen would only ever have a <console> element. With fullyvirt
Xen the first <serial> port element would also be exposed as a <console>
element.


> >Next up, I think should use a 'type' attribute on this
> >element to determine the main way ot connecting the device, and then more
> >type specific attributes or sub-elements as needed. If 'type' was not 
> >specified then use a default of 'pty', since that gives compatability with
> >existing practice.
> 
> Also enumerate them somehow, so you can configure multiple of them.

Good point, better to have an explicit 'port' number attribute than
to rely on implict ordering of the devices in the XML, since there's
no other attribute in them giving uniqueness (cf device, or MAC in
disk or network).

> >NB, whereever there are IP addresses, hostnames can be used too, hence I
> >call the attriute 'addr' instead of 'ip'
> 
> s/addr/host/ + s/port/service/ to make clear that non-numeric stuff is 
> accepted for both?
>
> <serial type='udp' port='0'>
>   <sendto host='loghost' service='syslog'>
> </serial>

Sounds reasonable.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list