| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This commit shouldn't change the semantics of the code.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The progress bar is updated 3 times per second, and is not displayed
at all for operations which take less than two seconds.
You can disable progress bars by using the flag --no-progress-bars,
and you can enable progress bars in non-interactive sessions with
the flag --progress-bars.
A good way to test this is to use the following command:
guestfish --progress-bars \
-N disk:10G \
zero-device /dev/sda
(adjust "10G" to get different lengths of time).
|
|
|
|
|
|
| |
Provide a generic mechanism within guestfish to detect if
output if UTF-8 and to open the termcap (or terminfo) database
for the current terminal type.
|
|
|
|
|
|
|
|
|
|
|
|
| |
If this string was non-empty, then it broke a lot of things because
autoconf and other parts of the build system were expecting this
string to contain a simple MAJOR.MINOR.RELEASE version number.
This requires changes to guestfish and guestmount so they use the
guestfs_version API to fetch the version from the library. (The
Perl tools were already doing it this way). In a way this is more
accurate, because it's no longer hard-coded in the binary, but
fetched from the dynamically linked libguestfs.so.
|
| |
|
|
|
|
|
|
|
| |
Two bits of XDR both contained a definition called 'str' which
means that 'xdr_str' was being exported globally twice. Because
of the linker script this didn't affect us. But it's best to
rename this global so that conflicts cannot arise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't shell out to virt-inspector. Instead, use the new C-based
inspection APIs.
This is much faster.
The new syntax is slightly different:
guestfish -a disk.img -i
guestfish -d guest -i
However, the old syntax still works.
|
|
|
|
|
|
|
|
| |
The -d option lets you specify libvirt domains. The disks from
these domains are found and added, as if you'd named them with -a.
The -c option lets you specify a libvirt URI, which is needed
when we consult libvirt to implement the above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for opening LUKS-encrypted disks, via
three new APIs:
luks_open: Create a mapping for an encrypted disk.
luks_open_ro: Same, but read-only mapping.
luks_close: Close a mapping.
A typical guestfish session using this functionality looks
like this:
$ guestfish --ro -a encrypted.img
><fs> run
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
/dev/vda2
><fs> vfs-type /dev/vda2
crypto_LUKS
><fs> luks-open /dev/vda2 luksdev
Enter key or passphrase ("key"):
><fs> vgscan
><fs> vg-activate-all true
><fs> pvs
/dev/dm-0
><fs> vgs
vg_f13x64encrypted
><fs> lvs
/dev/vg_f13x64encrypted/lv_root
/dev/vg_f13x64encrypted/lv_swap
><fs> mount /dev/vg_f13x64encrypted/lv_root /
><fs> ll /
total 132
dr-xr-xr-x. 24 root root 4096 Jul 21 12:01 .
dr-xr-xr-x 20 root root 0 Jul 21 20:06 ..
drwx------. 3 root root 4096 Jul 21 11:59 .dbus
drwx------. 2 root root 4096 Jul 21 12:00 .pulse
-rw-------. 1 root root 256 Jul 21 12:00 .pulse-cookie
dr-xr-xr-x. 2 root root 4096 May 13 03:03 bin
NOT included in this patch:
- An easier way to use this from guestfish.
- Ability to create LUKS devices.
- Ability to change LUKS keys on existing devices.
- Direct access to the /dev/mapper device (eg. if it contains
anything apart from VGs).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a 'Key' parameter type, used for passing sensitive key material
into libguestfs.
Eventually the plan is to mlock() key material into memory. However
this is very difficult to achieve because the encoded XDR strings
end up in many places. Therefore users should note that key material
passed to libguestfs might end up in swap.
The only difference between 'Key' and 'String' currently is that
guestfish requests the key from /dev/tty with echoing turned off.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing this against a Fedora disk image:
$ ./fish/guestfish --ro -a F13.img -m /dev/sda1 --listen
export GUESTFISH_PID=6033
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- ping-daemon
$ ./fish/guestfish --remote=6033 -- exit
Without this fix the first remote command would fail because
qemu would have already been killed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, the exit status indicates error for non-existent
commands.
$ guestfish -h foo
foo: command not known, use -h to list all commands
$ echo $?
1
$ guestfish help foo
foo: command not known, use -h to list all commands
$ echo $?
1
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Follow the example on other manual pages by making the warning
more prominent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This checks all available optional groups and prints out which
ones are supported by the daemon. Note you must launch the appliance
first.
Example:
><fs> supported
augeas yes
inotify yes
linuxfsuuid yes
linuxmodules yes
linuxxattrs yes
lvm2 yes
mknod yes
ntfs3g yes
ntfsprogs yes
realpath yes
scrub yes
selinux yes
xz yes
zerofree yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This small change uses the gnulib xstrtoll functionality to
enable suffixes on integer parameters in guestfish. For example:
truncate-size /file 1G
(previously you would have had to given the full number).
This also applies to the 'alloc' and 'sparse' commands (and
indirectly to the -N option). The specification for these commands
has changed slightly, in that 'alloc foo 1MB' would now use SI
units, allocating 1000000 bytes instead of a true megabyte. All
existing uses would use 'alloc foo 1M' which still allocates true
megabytes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The guestfs_write call can be used to create small files with
arbitrary 8 bit content, including \0 bytes.
This replaces and deprecates write-file, which cannot be modified
to use BufferIn because of an unfortunate choice in the ABI: the
size parameter to write-file, if zero, means that the daemon tries
to calculate the length of the buffer using strlen. However this
fails if we pass a zero-length buffer using BufferIn because then
the daemon tries to do strlen on a (really) zero length buffer, not
even containing a terminating \0 character, thus segfaulting.
|
|
|
|
|
|
| |
fish.c:1447: error: 'add_history_line' defined but not used [-Wunused-function]
(Reported by Matt Booth)
|
|
|
|
|
| |
Amend commit 1c6ed48bd3cd471dc so the prototype of
'print_shell_quote' function is correct.
|
|
|
|
|
| |
Previously it was falling off the end of the loop if you
called it with an unknown image type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#507810).
This commit fixes a long-standing bug which prevented guestfish -i
and virt-inspector from working on disk images which had a space
in the filename (or other unsafe characters). It works by ensuring
that the strings passed between guestfish -i and virt-inspector are
quoted correctly in both directions.
Note that this commit adds a dependency from virt-inspector to
the perl module String::ShellQuote. We have previously used this
module in virt-make-fs.
|
| |
|
|
|
|
| |
This reverts commit 01fedcde05c930c1413e9fe0909fa1da1f360cdf.
|
| |
|
|
|
|
|
|
| |
This commit makes the launch function static and private to
'fish.c', and changes the generator so the function is no longer
called for the 'run/launch' command.
|