virt-tar-out(1)

πŸ’– virt-tar-out β€” bestie's guide to packing a VM directory into a tarball πŸ’–

okay so real talk, this is virt-tar-out from libguestfs (the Virtualization Support corner of the man pages ✨) and it's literally out here doing one (1) job: scooping a directory out of a virtual machine disk image and smooshing it into a tarball. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

like, three ways to run it, pick your fighter:

virt-tar-out -a disk.img /dir files.tar

virt-tar-out -d domain /dir files.tar

virt-tar-out -d domain /dir - | gzip --best > files.tar.gz

πŸ¦‹ DESCRIPTION πŸ¦‹

virt-tar-out packs a virtual machine disk image directory into a tarball. say it with me: directory in, tarball out. slay. πŸ’…

the first parameter is the absolute path of the virtual machine directory. the second parameter is the tar file to write. and if you want to be all mysterious and pipe-y about it, use - to write to standard output. iykyk. 🌈

πŸ“ EXAMPLES πŸ“

downloading the home directories from a guest, because sometimes you just need to yank someone's /home out of a VM, no judgement:

virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz

πŸ’€ JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH πŸ’€

ngl bestie, this command is just a simple shell script wrapper around the guestfish(1) tar-out command. that's the tea. β˜•

so for anything more complex than a trivial copy, you are probably better off using guestfish directly. like, virt-tar-out is the cute lil shortcut, and guestfish is the whole entire toolbox. 🫢

✨ OPTIONS ✨

since the shell script just passes options straight to guestfish, read guestfish(1) to see the full list of options. yeah, that's genuinely the whole section β€” the options live over there, go visit them, they miss you. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

🧚 AUTHORS 🧚

Richard W.M. Jones (rjones at redhat dot com) β€” icon, legend, the moment. ⭐

Copyright (C) 2011-2025 Red Hat Inc.

🌸 LICENSE 🌸

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

fr fr please actually read the license, it's not just decorative πŸŽ€

πŸ› 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.
"complete, unedited output" means COMPLETE and UNEDITED, bestie, don't be out here trimming the logs, the maintainers can tell 😭

and that's the page!! πŸ’– this lil cutie is libguestfs-1.61.3, dated 2026-09-16, and it says virt-tar-out(1) at the bottom like a little signature. go pack some directories, you absolute main character. πŸ‘‘βœ¨

πŸ“¦ where this page comes from