diff --git a/examples/guestfs-recipes.pod b/examples/guestfs-recipes.pod index 2071b3a93..6683b1517 100644 --- a/examples/guestfs-recipes.pod +++ b/examples/guestfs-recipes.pod @@ -117,6 +117,8 @@ To download to stdout, replace the filename with a C<-> character: To list the filesystems in a disk image, use L. +See also L. + =head1 Edit grub configuration in a VM You can use this to: @@ -409,6 +411,28 @@ and downloading (copying out) files from VMs. L +=head1 Uploading raw filesystem content + +You can use L to upload whole filesystems into a VM, +even into a filesystem which is encrypted or buried inside an LV or +RAID device: + + guestfish --rw -a disk.img run : upload sda1.img /dev/sda1 + + guestfish --rw -d Guest run : upload lv.img /dev/vg_guest/lv_root + +One common problem is that the filesystem isn't the right size for the +target. If it is too large, there's not much you can do with +libguestfs - you have to prepare the filesystem differently. But if +the filesystem needs to expand into the target, you can use guestfish +to resize it to the right size: + + guestfish --rw -d Guest run : \ + upload lv.img /dev/vg_guest/lv_root : \ + resize2fs /dev/vg_guest/lv_root + +(or use C if the filesystem is NTFS). + =head1 Use libguestfs tools on VMware ESX guests The link below explains how to use libguestfs, L and the