diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-24 11:54:48 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-24 11:54:48 +0100 |
commit | e1c62f6332ae07cb6f95130dcc9852701d085e2b (patch) | |
tree | a6ec72d4fdcf78259b63c2cec2afe9a9812ad2e2 /inspector | |
parent | 46551d9c51193a4bca2e1b249b8c5f111e1dc7b5 (diff) | |
download | libguestfs-e1c62f6332ae07cb6f95130dcc9852701d085e2b.tar.gz libguestfs-e1c62f6332ae07cb6f95130dcc9852701d085e2b.tar.xz libguestfs-e1c62f6332ae07cb6f95130dcc9852701d085e2b.zip |
Added guestfish -i option to run virt-inspector.
You can invoke guestfish with:
guestfish -i libvirt-domain
guestfish -i disk-image(s)
Diffstat (limited to 'inspector')
-rwxr-xr-x | inspector/virt-inspector.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/inspector/virt-inspector.pl b/inspector/virt-inspector.pl index 1d8a84b4..717ccb61 100755 --- a/inspector/virt-inspector.pl +++ b/inspector/virt-inspector.pl @@ -145,7 +145,7 @@ If you select I<--fish> then we print a L<guestfish(1)> command line which will automatically mount up the filesystems on the correct mount points. Try this for example: - eval `virt-inspector --fish guest.img` + guestfish $(virt-inspector --fish guest.img) I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so that the filesystems are mounted read-only. @@ -299,7 +299,7 @@ L<guestfish(1)> command line parameters, so that you can go in afterwards and inspect the guest with everything mounted in the right place. For example: - eval `virt-inspector --ro-fish guest.img` + guestfish $(virt-inspector --ro-fish guest.img) ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot =cut @@ -905,18 +905,17 @@ if ($output eq "fish" || $output eq "ro-fish") { my $root_dev = $osdevs[0]; - print "guestfish"; if ($output eq "ro-fish") { - print " --ro"; + print "--ro "; } - print " -a $_" foreach @images; + print "-a $_ " foreach @images; my $mounts = $oses{$root_dev}->{mounts}; # Have to mount / first. Luckily '/' is early in the ASCII # character set, so this should be OK. foreach (sort keys %$mounts) { - print " -m $mounts->{$_}:$_" if $_ ne "swap"; + print "-m $mounts->{$_}:$_ " if $_ ne "swap"; } print "\n" } |