virt-copy-out(1)

πŸ’– virt-copy-out(1) πŸ’–

okay so bestie, welcome to the virt-copy-out page β€” that's the command name, and this is its manual page (section 1 of the libguestfs docs, iykyk). she's a lil shell script with main character energy and she's here to get your files OUT of a VM. let's go πŸŽ€


✨ NAME ✨

virt-copy-out β€” copy files and directories out of a virtual machine disk image. literally that's her whole job and she ate πŸ’…


🌸 SYNOPSIS 🌸

virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir

virt-copy-out -d domain /file|dir [/file|dir ...] localdir

so you point her at a disk image with -a or at a libvirt domain with -d, then hand her one or more /file|dir paths inside the guest, and finally a localdir on your side where the goodies land 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

virt-copy-out copies files and directories out of a virtual machine disk image or a named libvirt domain. no cap, that's it. 🧚

you can give one or more filenames and directories on the command line β€” stack 'em up, she's not scared. directories are copied out recursively, so the whole tree comes with you. πŸ’–


🌈 EXAMPLES 🌈

download the home directories from a virtual machine:

mkdir homes
virt-copy-out -d MyGuest /home homes

see how it's done?? mkdir homes to make the landing spot, then -d MyGuest says "this guest", /home says "grab that", and homes says "put it here". iconic. ✨


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

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

so for anything more complex than a trivial copy, you are probably better off using guestfish directly β€” she's the real one, this is just her cute lil front-facing cousin. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

since the shell script just passes options straight to guestfish, read guestfish(1) to see the full list of options. like, all of them. go read it, she's worth it. πŸ“–πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

the whole squad fr fr 🫢πŸ”₯


πŸ’– AUTHORS πŸ’–

Richard W.M. Jones (rjones at redhat dot com) β€” the legend, the blueprint, 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.

bestie the all-caps warranty bits are NOT a vibe check you can skip β€” no warranty, fr fr. read the license. πŸ’€

πŸ› 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. πŸ“‹βœ¨
the "complete, unedited" part is serious β€” do not trim the output, the maintainers need the whole thing. πŸ™

and that's the page, bestie!! πŸ¦‹ this was virt-copy-out(1) from libguestfs-1.61.3, dated 2026-09-16 β€” go forth and copy responsibly, love u, bye!! πŸ’–πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from