1guestfs-gobject(3)          Virtualization Support          guestfs-gobject(3)
2
3
4

NAME

6       guestfs-gobject - How to use libguestfs with the GObject bindings
7

SYNOPSIS

9       From Javascript using gjs:
10
11        const Guestfs = imports.gi.Guestfs;
12        var g = new Guestfs.Session();
13        g.add_drive('disk.img', null);
14        g.launch();
15        g.close();
16

DESCRIPTION

18       This manual page documents how to call libguestfs using GObject
19       bindings, especially from Javascript.
20
21       Note that the GObject bindings have problems handling 64 bit values.
22       You should not use the GObject bindings if there are native bindings
23       for your language.  For example, to use libguestfs from Python you are
24       strongly advised to use the Python native bindings instead (see
25       guestfs-python(3)).
26
27       This page just documents the differences from the C API and gives some
28       examples.  If you are not familiar with using libguestfs, you also need
29       to read guestfs(3).
30

JAVASCRIPT

32       Using gjs, you can write a ".js" file containing:
33
34        const Guestfs = imports.gi.Guestfs;
35        var g = new Guestfs.Session();
36        g.add_drive('disk.img', null);
37        g.launch();
38        g.close();
39
40       and then run it using:
41
42        gjs program.js
43

SEE ALSO

45       guestfs(3), guestfs-examples(3), guestfs-erlang(3), guestfs-golang(3),
46       guestfs-java(3), guestfs-lua(3), guestfs-perl(3), guestfs-python(3),
47       guestfs-recipes(1), guestfs-ruby(3), http://libguestfs.org/.
48

AUTHORS

50       Richard W.M. Jones ("rjones at redhat dot com")
51
53       Copyright (C) 2012-2020 Red Hat Inc.
54

LICENSE

56       This manual page contains examples which we hope you will use in your
57       programs.  The examples may be freely copied, modified and distributed
58       for any purpose without any restrictions.
59

BUGS

61       To get a list of bugs against libguestfs, use this link:
62       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
63
64       To report a new bug against libguestfs, use this link:
65       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
66
67       When reporting a bug, please supply:
68
69       •   The version of libguestfs.
70
71       •   Where you got libguestfs (eg. which Linux distro, compiled from
72           source, etc)
73
74       •   Describe the bug accurately and give a way to reproduce it.
75
76       •   Run libguestfs-test-tool(1) and paste the complete, unedited output
77           into the bug report.
78
79
80
81libguestfs-1.49.9                 2023-01-19                guestfs-gobject(3)
Impressum