summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-01-28 13:19:52 +0000
committerRichard W.M. Jones <rjones@redhat.com>2011-02-03 18:50:45 +0000
commitcfd9513a54778e1ade82dc1eb351ea32416938a8 (patch)
treef8ab099c3f7fe1eb20d9fa2a1c67522e8cca2206 /generator
parent17434fb159e6391353363b3d11e2c1fb626fe548 (diff)
downloadlibguestfs-cfd9513a54778e1ade82dc1eb351ea32416938a8.tar.gz
libguestfs-cfd9513a54778e1ade82dc1eb351ea32416938a8.tar.xz
libguestfs-cfd9513a54778e1ade82dc1eb351ea32416938a8.zip
Add guestfs_add_domain 'live' flag.
This optional flag controls whether this API call will try to connect to a running virtual machine 'guestfsd' process. If the flag is given and the virtual machine is running, then the libvirt XML is parsed looking for a suitable <channel> element, and 'guestfs_set_attach_method' is called with the corresponding virtio-serial socket path.
Diffstat (limited to 'generator')
-rw-r--r--generator/generator_actions.ml18
1 files changed, 15 insertions, 3 deletions
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index a2e7467f..192df77f 100644
--- a/generator/generator_actions.ml
+++ b/generator/generator_actions.ml
@@ -1074,7 +1074,7 @@ Please read L<guestfs(3)/INSPECTION> for more details.");
This returns the internal QEMU command line. 'debug' commands are
not part of the formal API and can be removed or changed at any time.");
- ("add_domain", (RInt "nrdisks", [String "dom"], [String "libvirturi"; Bool "readonly"; String "iface"]), -1, [FishAlias "domain"],
+ ("add_domain", (RInt "nrdisks", [String "dom"], [String "libvirturi"; Bool "readonly"; String "iface"; Bool "live"]), -1, [FishAlias "domain"],
[],
"add the disk(s) from a named libvirt domain",
"\
@@ -1101,12 +1101,18 @@ we connect to the default libvirt URI (or one set through an
environment variable, see the libvirt documentation for full
details).
+The optional C<live> flag controls whether this call will try
+to connect to a running virtual machine C<guestfsd> process if
+it sees a suitable E<lt>channelE<gt> element in the libvirt
+XML definition. The default (if the flag is omitted) is never
+to try.
+
The other optional parameters are passed directly through to
C<guestfs_add_drive_opts>.");
(*
This interface is not quite baked yet. -- RWMJ 2010-11-11
- ("add_libvirt_dom", (RInt "nrdisks", [Pointer ("virDomainPtr", "dom")], [Bool "readonly"; String "iface"]), -1, [NotInFish],
+ ("add_libvirt_dom", (RInt "nrdisks", [Pointer ("virDomainPtr", "dom")], [Bool "readonly"; String "iface"; Bool "live"]), -1, [NotInFish],
[],
"add the disk(s) from a libvirt domain",
"\
@@ -1129,7 +1135,13 @@ from a remote libvirt connection (see L<http://libvirt.org/remote.html>)
will fail unless those disks are accessible via the same device path
locally too.
-The optional parameters are passed directly through to
+The optional C<live> flag controls whether this call will try
+to connect to a running virtual machine C<guestfsd> process if
+it sees a suitable E<lt>channelE<gt> element in the libvirt
+XML definition. The default (if the flag is omitted) is never
+to try.
+
+The other optional parameters are passed directly through to
C<guestfs_add_drive_opts>.");
*)