[libvirt] [PATCH 6/7] Re-write virsh console to use streams
Daniel P. Berrange
berrange at redhat.com
Mon Aug 23 13:53:57 UTC 2010
On Tue, Aug 17, 2010 at 06:02:45PM +0100, Daniel P. Berrange wrote:
> This re-writes the 'virsh console' command so that it uses
> the new streams API. This lets it run remotely and/or as a
> non-root user. This requires that virsh be linked against
> the simple event loop from libvirtd in daemon/event.c
> As an added bonus, it can now connect to any console device,
> not just the first one.
>
> * tools/Makefile.am: Link to event.c
> * tools/console.c, tools/console.h: Rewrite to use the
> virDomainOpenConsole() APIs with streams
> * tools/virsh.c: Support choosing the console name
> via --devname $NAME
I've realized one problem with this patch. It breaks virsh console
for Xen & LXC, since I've not added virDomainOpenConsole to those
drivers yet.
Supporting them is easy, but it would be a big cut+paste of the
QEMU driver code, so I think I need to re-work this to pull out
the QEMU stream code into a reusable module for other (local)
drivers to share. ESX would of course need separate code, since
that's a remote driver only.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.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 libvir-list
mailing list