guestfs-internals(1) Virtualization Support guestfs-internals(1) (NAME) guestfs-internals - libguestfs (DESCRIPTION) libguestfs . libguestfs . (ARCHITECTURE) libguestfs ( ) qemu(1) . Qemu . | main program | | | | | child process / appliance | | | | | qemu | RPC | | | libguestfs guestfsd | | | | | | | | Linux kernel | | | | | | | virtio-scsi | Device or | | disk image | "guestfs_launch" guestfs(3) . ( LVM ext2) "guestfsd" . (RPC) "guestfsd" . API libguestfs RPC . () qemu . "". libguestfs . ( qemu libguestfs ). (STATE MACHINE) libguestfs : | guestfs_create / guestfs_create_flags | | ____V_____ / \ | CONFIG | \__________/ ^ ^ \ | \ \ guestfs_launch | _\__V______ | / \ | | LAUNCHING | | \___________/ | / | guestfs_launch | / __|____V / \ | READY | \________/ () : () CONFIG ( ) () LAUNCHING ( ) () READY . "guestfs_kill_subprocess" guestfs(3) ( ) CONFIG . qemu "guestfs_set_path" guestfs(3) CONFIG . API CONFIG LAUNCHING READY . "guestfs_launch" guestfs(3) READY ( ) . "guestfs_launch" guestfs(3) CONFIG LAUNCHING . API "guestfs_mount" guestfs(3) READY . API . . . . (INTERNALS) (APPLIANCE BOOT PROCESS) . libguestfs . libguestfs ( "LIBGUESTFS_DEBUG=1" ). "supermin --build" initrd . /var/tmp/.guestfs- ( "LIBGUESTFS_CACHEDIR" "TMPDIR" ). supermin(1) . qemu qemu . initrd "supermin --build" initrd . initrd . initrd . initrd cpio /var/tmp/.guestfs-/appliance.d/initrd . initrd : supermin: ext2 mini initrd starting up supermin: mounting /sys supermin: internal insmod libcrc32c.ko supermin: internal insmod crc32c-intel.ko (sparse file) ext2 ( ) . /var/tmp/.guestfs-/appliance.d/root . libguestfs qemu ( /dev/vda). qemu ( /dev/vdb ). initrd (chroot) /init . : supermin: picked /sys/block/vdb/dev as root device supermin: creating /dev/root as block special 252:16 supermin: mounting new root on /root supermin: chroot Starting /init script ... "Starting /init script ..." init . . "udev" ("guestfsd") . ("guestfsd") . : verbose daemon enabled virtio-serial qemu . ( ) "GUESTFS_LAUNCH_FLAG" ( ). (COMMUNICATION PROTOCOL) . . qemu RPC XDR ( RFC 1014 RFC 1832 RFC 4506) . common/protocol/guestfs_protocol.x (: ). : "FileIn" "FileOut" / . "FileIn" "FileOut" (chunked encoding) . ( FILEIN/FILEOUT) : total length (header + arguments, but not including the length word itself) struct guestfs_message_header (encoded as XDR) struct guestfs__args (encoded as XDR) (total length) . "GUESTFS_MESSAGE_MAX" ( ) . "guestfs_foo_args" . ("guestfs_proc") . "guestfs_foo_args" . . ( ) . : total length (header + ret, but not including the length word itself) struct guestfs_message_header (encoded as XDR) struct guestfs__ret (encoded as XDR) "guestfs_foo_ret" . "GUESTFS_MESSAGE_MAX" . : total length (header + error, but not including the length word itself) struct guestfs_message_header (encoded as XDR) struct guestfs_message_error (encoded as XDR) "guestfs_message_error" . FILEIN "FileIn" . ( ). . total length (header + arguments, but not including the length word itself, and not including the chunks) struct guestfs_message_header (encoded as XDR) struct guestfs__args (encoded as XDR) sequence of chunks for FileIn param #0 sequence of chunks for FileIn param #1 etc. " " : length of chunk (not including length word itself) struct guestfs_chunk (encoded as XDR) length of chunk struct guestfs_chunk (encoded as XDR) ... length of chunk struct guestfs_chunk (with data.data_len == 0) "data_len" . . FileIn . ( ) FileIn ( ) . () () . . RPC . . "GUESTFS_CANCEL_FLAG" . ( ). ( ) "" . ( ) ( ) . ("GUESTFS_MAX_CHUNK_SIZE") . FILEOUT FileOut FileIn . total length (header + ret, but not including the length word itself, and not including the chunks) struct guestfs_message_header (encoded as XDR) struct guestfs__ret (encoded as XDR) sequence of chunks for FileOut param #0 sequence of chunks for FileOut param #1 etc. ("GUESTFS_LAUNCH_FLAG") . "guestfs_launch" guestfs(3) . . "GUESTFS_PROGRESS_FLAG" . ( "GUESTFS_EVENT_PROGRESS" guestfs(3)) . ( "daemon/proto.c:notify_progress"). . (FIXED APPLIANCE) libguestfs ( libguestfs) . libguestfs "LIBGUESTFS_PATH" . supermin ( "SUPERMIN APPLIANCE" supermin(1)). libguestfs "supermin --build" . " " . libguestfs : o kernel o initrd o root o README.fixed ( ) libguestfs supermin ( qemu "BACKEND" guestfs(3)) initrd . supermin . supermin libguestfs-make-fixed-appliance(1) libguestfs . (SEE ALSO) guestfs(3), guestfs-hacking(1), guestfs-examples(3), libguestfs-test-tool(1), libguestfs-make-fixed-appliance(1), http://libguestfs.org (AUTHORS) Richard W.M. Jones ("rjones at redhat dot com") (COPYRIGHT) Copyright (C) 2009-2025 Red Hat Inc. (LICENSE) (LGPL) 2 ( ) / . . . : Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA (BUGS) libguestfs : https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools libguestfs : https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools : o libguestfs. o libguestfs ( ). o . o libguestfs-test-tool(1) . libguestfs-1.60.1 2026-07-14 guestfs-internals(1)