X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Fguestfish.pod;h=193329099333f35a56171b2777bacd8a4b7900a3;hp=8daebc8781193d20459162b0edab31eb46cfe55d;hb=b5c287bcd456bdb02d8ec0443483df34f4fd6b5d;hpb=1a9aa565b38eafe48621bc2fe42d35ea6a907708 diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 8daebc8..1933290 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -16,9 +16,9 @@ guestfish - the libguestfs Filesystem Interactive SHell guestfish -d libvirt-domain - guestfish -i libvirt-domain + guestfish -a disk.img -i - guestfish -i disk.img [disk.img ...] + guestfish -d libvirt-domain -i =head1 WARNING @@ -75,13 +75,14 @@ Edit C interactively: --mount /dev/sda1:/boot \ edit /boot/grub/grub.conf -=head2 Using virt-inspector +=head2 Mount disks automatically -Use the I<-i> option to get virt-inspector to mount -the filesystems automatically as they would be mounted -in the virtual machine: +Use the I<-i> option to automatically mount the +disks from a virtual machine: - guestfish --ro -i disk.img cat /etc/group + guestfish --ro -a disk.img -i cat /etc/group + + guestfish --ro -d libvirt-domain -i cat /etc/group =head2 As a script interpreter @@ -102,7 +103,7 @@ a single ext2-formatted partition: To list what is available do: - guestfish -N list | less + guestfish -N help | less =head2 Remote control @@ -170,28 +171,28 @@ scripts, use: =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. +Using L code, inspect the disks looking for +an operating system and mount filesystems as they would be +mounted on the real virtual machine. Typical usage is either: - guestfish -i myguest + guestfish -d myguest -i (for an inactive libvirt domain called I), or: - guestfish --ro -i myguest + guestfish --ro -d myguest -i (for active domains, readonly), or specify the block device directly: - guestfish -i /dev/Guests/MyGuest + guestfish -a /dev/Guests/MyGuest -i + +Note that the command line syntax changed slightly over older +versions of guestfish. You can still use the old syntax: -You cannot use I<-a>, I<-m>, I<-N>, I<--listen>, I<--remote> or -I<--selinux> in conjunction with this option, and options other than -I<--ro> might not behave correctly. + guestfish [--ro] -i disk.img -See also: L. + guestfish [--ro] -i libvirt-domain =item B<--keys-from-stdin> @@ -224,13 +225,24 @@ or you can use the L program. Disable autosync. This is enabled by default. See the discussion of autosync in the L manpage. -=item B<-N type> | B<--new type> | B<-N list> +=item B<-N type> | B<--new type> | B<-N help> Prepare a fresh disk image formatted as "type". This is an alternative to the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a preformatted disk with a filesystem and adds it. See L below. +=item B<--progress-bars> + +Enable progress bars, even when guestfish is used non-interactively. + +Progress bars are enabled by default when guestfish is used as an +interactive shell. + +=item B<--no-progress-bars> + +Disable progress bars. + =item B<--remote[=pid]> Send remote commands to C<$GUESTFISH_PID> or C. See section @@ -705,7 +717,7 @@ for an ext4 filesystem on a 1GB disk instead. To list the available types and any extra parameters they take, run: - guestfish -N list | less + guestfish -N help | less Note that the prepared filesystem is not mounted. You would usually have to use the C command or add the @@ -728,6 +740,31 @@ Create a blank 200MB disk: guestfish -N disk:200M +=head1 PROGRESS BARS + +Some (not all) long-running commands send progress notification +messages as they are running. Guestfish turns these messages into +progress bars. + +When a command that supports progress bars takes longer than two +seconds to run, and if progress bars are enabled, then you will see +one appearing below the command: + + > copy-size /large-file /another-file 2048M + / 10% [#####-----------------------------------------] 00:30 + +The spinner on the left hand side moves round once for every progress +notification received from the backend. This is a (reasonably) golden +assurance that the command is "doing something" even if the progress +bar is not moving, because the command is able to send the progress +notifications. When the bar reaches 100% and the command finishes, +the spinner disappears. + +Progress bars are enabled by default when guestfish is used +interactively. You can enable them even for non-interactive modes +using I<--progress-bars>, and you can disable them completely using +I<--no-progress-bars>. + =head1 GUESTFISH COMMANDS The commands in this section are guestfish convenience commands, in @@ -761,9 +798,6 @@ The editor is C<$EDITOR>. However if you use the alternate commands C or C you will get those corresponding editors. -NOTE: This will not work reliably for large files -(> 2 MB) or binary files containing \0 bytes. - =head2 glob glob command args...