guestfs-gobject(3)
β¨ guestfs-gobject β¨
okay bestie, welcome to the Virtualization Support corner of the manual, this is guestfs-gobject(3) and it's all about using libguestfs through the GObject bindings π
π DEPRECATED π
ngl this is the sad part. These bindings are deprecated and they will be removed in libguestfs 1.58. so like... enjoy them while they last, but maybe don't build your whole personality around them π«Ά
πΈ SYNOPSIS πΈ
From Javascript using gjs:
const Guestfs = imports.gi.Guestfs;
var g = new Guestfs.Session();
g.add_drive('disk.img', null);
g.launch();
g.close();
π¦ DESCRIPTION π¦
This manual page documents how to call libguestfs using GObject bindings, especially from Javascript. it's giving "here's how you talk to the C library but make it β¨fancyβ¨"
okay but real talk, there's a catch: the GObject bindings have problems handling 64 bit values. so if your language has native bindings, you should not use the GObject ones. periodt. for example, to use libguestfs from Python you are strongly advised to use the Python native bindings instead (see guestfs-python(3)). that's the move π
This page just documents the differences from the C API and gives some examples. and if you're not familiar with using libguestfs at all, you also need to read guestfs(3) first. no skipping bestie, i see you π
π JAVASCRIPT π
Using gjs, you can write a .js file containing:
const Guestfs = imports.gi.Guestfs;
var g = new Guestfs.Session();
g.add_drive('disk.img', null);
g.launch();
g.close();
and then run it using:
gjs program.js
that's literally it. iconic. slay β¨
π SEE ALSO π
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), http://libguestfs.org/.
the whole friend group fr fr π«Ά
π AUTHORS π
Richard W.M. Jones (rjones at redhat dot com) β the main character honestly, thank you king π
π COPYRIGHT π
Copyright (C) 2012-2025 Red Hat Inc.
π LICENSE π
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. yes bestie, take them, they're yours, no strings attached π
π BUGS π
To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
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.
bestie if you report a bug without the unedited libguestfs-test-tool(1) output i will find you and i will be so disappointed π please paste it all, no trimming, no vibes-based paraphrasing
and that's the whole page! this was libguestfs-1.58.1, dated 2026-01-19, from the guestfs-gobject(3) era. go forth and bind responsibly, mwah π
πβ¨
π¦ where this page comes from
- fedora 43: libguestfs-gobject-devel 1:1.58.1-1.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms