On 08/17/2010 11:02 AM, Daniel P. Berrange wrote:
To enable virsh console (or equivalent) to be used remotely
it is neccessary to provide remote access to the /dev/pts/XXX
s/neccessary/necessary
psuedo-TTY associated with the console/serial/parallel device
s/psuedo/pseudo/
in the guest. The virStream API provide a bi-directional I/O
stream capability that can be used for this purpose. This
patch thus introduces a virDomainOpenConsole API that uses
the stream APIs.
* src/libvirt.c, src/libvirt_public.syms,
include/libvirt/libvirt.h.in, src/driver.h: Define the
new virDomainOpenConsole API
* src/esx/esx_driver.c, src/lxc/lxc_driver.c,
src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
src/remote/remote_driver.c, src/test/test_driver.c,
src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
src/xen/xen_driver.c, src/xenapi/xenapi_driver.c: Stub
API entry point
index 4fb357b..648e4fe 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -4318,6 +4318,7 @@ static virDriver esxDriver = {
esxDomainRevertToSnapshot, /* domainRevertToSnapshot */
esxDomainSnapshotDelete, /* domainSnapshotDelete */
NULL, /* qemuDomainMonitorCommand */
+ NULL, /* domainOpenConsole */
Consistent indentation of the comment. (It's a shame that we aren't
consistent between the various device drivers, so that you can't just
copy and paste a new NULL line across all of them.)
+/**
+ * virDomainOpenConsole:
+ * @dom: the domain whose console to open
Reads awkwardly. How about:
the domain where a console will be opened
+++ b/src/libvirt_public.syms
@@ -405,4 +405,9 @@ LIBVIRT_0.8.2 {
virDomainCreateWithFlags;
} LIBVIRT_0.8.1;
+LIBVIRT_0.8.3 {
+ global:
+ virDomainOpenConsole;
+} LIBVIRT_0.8.2;
0.8.3 is already out; this needs bumping to 0.8.4.
ACK with those nits fixed.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org