GUESTFS-GOBJECT(3) - Linux man page online | Library functions

How to use libguestfs with the GObject bindings.

guestfs-gobject(3) Virtualization Support guestfs-gobject(3)


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


From Javascript using gjs: const Guestfs =; var g = new Guestfs.Session(); g.add_drive('disk.img', null); g.launch(); g.close();


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


Using gjs, you can write a ".js" file containing: const Guestfs =; var g = new Guestfs.Session(); g.add_drive('disk.img', null); g.launch(); g.close(); and then run it using: gjs program.js


guestfs(3), guestfs-examples(3), guestfs-erlang(3), guestfs-golang(3), guestfs-java(3), guestfs-lua(3), guestfs-perl(3), guestfs-python(3), guestfs-recipes(1), guestfs-ruby(3),


Richard W.M. Jones ("rjones at redhat dot com")
Copyright (C) 2012-2017 Red Hat Inc.


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


To get a list of bugs against libguestfs, use this link: To report a new bug against libguestfs, use this link: When reporting a bug, please supply: · The version of libguestfs. · Where you got libguestfs (eg. which Linux distro, compiled from source, etc) · Describe the bug accurately and give a way to reproduce it. · Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.
libguestfs-1.36.13 2018-01-25 guestfs-gobject(3)
This manual Reference Other manuals
guestfs-gobject(3) referred by guestfs(3) | guestfs-erlang(3) | guestfs-golang(3) | guestfs-java(3) | guestfs-lua(3) | guestfs-ocaml(3) | guestfs-perl(3) | guestfs-python(3) | guestfs-recipes(1) | guestfs-ruby(3)
refer to guestfs(3) | guestfs-erlang(3) | guestfs-examples(3) | guestfs-golang(3) | guestfs-java(3) | guestfs-lua(3) | guestfs-perl(3) | guestfs-python(3) | guestfs-recipes(1) | guestfs-ruby(3) | libguestfs-test-tool(1)
Download raw manual
Index Virtualization Support (+86) libguestfs-1.36.13 (+63) № 3 (+68044)
Go top