summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-20 17:56:10 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-20 17:56:10 +0100
commit8aa8eb205b02e1014e5ed9577f4a9da9fd864aba (patch)
treec301a9282c9021aaac2b0efe17a698bf511ece99 /examples
parent840deea12079b05a9f588016af273843d5d6e1b8 (diff)
downloadlibguestfs-8aa8eb205b02e1014e5ed9577f4a9da9fd864aba.tar.gz
libguestfs-8aa8eb205b02e1014e5ed9577f4a9da9fd864aba.tar.xz
libguestfs-8aa8eb205b02e1014e5ed9577f4a9da9fd864aba.zip
recipes: Add section about uploading raw filesystem content.
Diffstat (limited to 'examples')
-rw-r--r--examples/guestfs-recipes.pod24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/guestfs-recipes.pod b/examples/guestfs-recipes.pod
index 2071b3a9..6683b151 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<virt-filesystems(1)>.
+See also L</Uploading raw filesystem content>.
+
=head1 Edit grub configuration in a VM
You can use this to:
@@ -409,6 +411,28 @@ and downloading (copying out) files from VMs.
L<https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content>
+=head1 Uploading raw filesystem content
+
+You can use L<guestfish(1)> 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<ntfsresize> if the filesystem is NTFS).
+
=head1 Use libguestfs tools on VMware ESX guests
The link below explains how to use libguestfs, L<guestfish(1)> and the