X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfish.pod;h=0870b9ee88e33dc5be48c463049f210cf6f0cf9e;hp=d83a61ca5549042aa9372ebad11b7fa5f680b661;hb=1154aff2c68b7ac156713c7fd66b5aa8907a3cb2;hpb=394c8bec21d47b74567a4148fdbf87318c301441 diff --git a/guestfish.pod b/guestfish.pod index d83a61c..0870b9e 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -8,6 +8,10 @@ guestfish - the libguestfs filesystem interactive shell guestfish [--options] [commands] + guestfish -i libvirt-domain + + guestfish -i disk-image(s) + =head1 EXAMPLES =head2 From shell scripts @@ -40,8 +44,7 @@ Remove C (in reality not such a great idea): guestfish --add disk.img \ --mount /dev/VolGroup00/LogVol00 \ --mount /dev/sda1:/boot \ - rm /boot/grub/menu.lst : \ - sync : exit + rm /boot/grub/menu.lst =head2 As an interactive shell @@ -55,6 +58,14 @@ Remove C (in reality not such a great idea): > help +=head2 As a script interpreter + + #!/usr/bin/guestfish -f + alloc /tmp/output.img 10M + run + sfdisk /dev/sda 0 0 0 , + mkfs ext2 /dev/sda1 + =head1 DESCRIPTION Guestfish is a shell and command-line tool for examining and modifying @@ -81,6 +92,37 @@ Displays detailed help on a single command C. Add a block device or virtual machine image to the shell. +=item B<-f file> | B<--file file> + +Read commands from C. To write pure guestfish +scripts, use: + + #!/usr/bin/guestfish -f + +=item B<-i> | B<--inspector> + +Run virt-inspector on the named libvirt domain or list of disk +images. If virt-inspector is available and if it can identify +the domain or disk images, then partitions will be mounted +correctly at start-up. + +Typical usage is either: + + guestfish -i myguest + +(for an inactive libvirt domain called I), or: + + guestfish --ro -i myguest + +(for active domains, readonly), or specify the block device directly: + + guestfish -i /dev/Guests/MyGuest + +You cannot use I<-a> or I<-m> in conjunction with this option, and +options other than I<--ro> might not behave correctly. + +See also: L. + =item B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]> Mount the named partition or logical volume on the given mountpoint. @@ -114,6 +156,10 @@ able to hit the tab key to complete paths on the guest filesystem, but this causes extra "hidden" guestfs calls to be made, so this option is here to allow this feature to be disabled. +=item B<-V> | B<--version> + +Display the guestfish / libguestfs version number and exit. + =back =head1 COMMANDS ON COMMAND LINE