[et-mgmt-tools] [PATCH] virt-manager: show serial/parallel devices

Daniel P. Berrange berrange at redhat.com
Tue Jul 29 16:51:54 UTC 2008


On Tue, Jul 29, 2008 at 12:28:18PM -0400, Cole Robinson wrote:
> Daniel P. Berrange wrote:
> > On Mon, Jul 28, 2008 at 11:51:49AM -0400, Cole Robinson wrote:
> >> The attached patch teaches virt-manager how to parse VM
> >> character devices, showing them in the details section.
> >> This patch also implements removing these devices.
> >>
> >> There are a couple quirks though:
> >>
> >> 1) All the possible character device xml properties
> >>    aren't accounted for. This only parses target port,
> >>    device type, and source path. I figure this covers
> >>    the common cases, and is easily expandable.
> >>
> >> 2) Explicit entries are only set for serial and parallel
> >>    devices, not console devices. Since by default, console
> >>    is really just a duplicate of the first serial device,
> >>    we try to detect this and label said serial device as
> >>    appropriately (seen in the second screen shot).
> >>    This simplifies things a good deal, and makes deleting
> >>    easier, since in order to remove the console or 
> >>    first serial device, both xml blocks need to be removed
> >>    simultaneously (not sure if this is a libvirt bug or not).
> > 
> > I think that is probably a bug. Can you re-test with the latest
> > CVS snapshot of libvirt where I've changed the handling a little
> > bit. Basically you should never need to add or remove a 'console'
> > device explicitly. Either it is there permanently (eg, Xen PV
> > always has a console), or it is automatically added/removed when
> > the first serial device is added or removed. 
>  
> Cool, things seem to work with current upstream.
> 
> As far as the virt-manager code though, do you think it's a reasonable
> approach (don't have an explicit console entry)?

This a little bit of an annoying part due to the way we had to maintain
backwards comaptability with the XML format. You can skip the 'console'
entry if-and-only-if there is at least one serial device. If there's
no serial device, you'll need to explicitly list the console. 

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the et-mgmt-tools mailing list