| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Also add this option, if necessary, when testing for virtio-serial
support.
When the workaround is enabled, we specify machine type 'pc'.
|
| |
|
|
|
|
| |
This is just code refactoring.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible for the pcre library to return a variable number of captures for
a single regular expression. e.g.:
^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$
This will return either 1 or 2 captures depending on whether the device has a
partition suffix. The current match wrappers don't allow for this, and require
that a predictable number of matches are returned.
This change updates match, match1, match2, and match3 to ignore the specific
number of matches returned. Instead, any returned captures are assigned to the
given arguments, and any remaining arguments are set to NULL.
|
|
|
|
|
|
|
|
|
|
|
| |
We currently use a heuristic to guess how drive names we find
referenced in the guest map to drive names in the appliance. If this
heuristic fails it can cause inspection to fail.
This change adds a new 'name' option to add_drive_opts, which allows
the user to explicitly pass the name of a drive to libguestfs if it is
known. This change also updates the fstab-parsing inspection code to
use this information if it is available.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a NFC on its own, but provides a place-holder for drive metadata which
can be used after launch.
Fixes by RWMJ:
- Fix the tests: this requires a new internal function 'debug-drives'
that dumps out the g->drives information so it can be checked in
two of the tests. Previously these tests used 'debug-cmdline'.
- Test file existence / use_cache_off in the add_drive_opts function,
not when launching qemu in the child process.
- Call free along error paths.
- Add comments.
|
|
|
|
|
| |
The regular expression matching disk name assumed that there was only a single
letter suffix. This change handles a naming scheme for any number of disks.
|
| |
|
| |
|
|
|
|
|
|
| |
For now, only detect the tool, but support from reading
installed package could be added later ( may require either
a package of pkgsrc, or a smaller tool to read the db ).
|
|
|
|
|
|
|
|
| |
While testing on Fedora 16, I noticed that Linux will mount the disk
without trouble by using automatically ufstype=old, and yet do not
let us read the directories. So we should start directly with usftype=ufs2,
and if it fail, try 44bsd, as used for netbsd and openbsd ( as seen on
http://wiki-static.aydogan.net/How_to_mount_FFS_partition_under_Linux ).
|
|
|
|
| |
Like Ubuntu one, it may not be always present.
|
|
|
|
| |
This would also erronously detect SLES as Opensuse.
|
|
|
|
|
|
| |
Ths logo is present on Lucid Lynx, but may not always be installed, like
in case of a minimal installation ( or server ). While Edubuntu and Kubuntu
have different logo, I didn't check where it would be placed.
|
| |
|
|
|
|
|
| |
Mainly this is a documentation change. However a sample of
DTrace-compatible userspace probes are also added.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
These calls allow you to change the number of virtual CPUs assigned to
the appliance.
This also adds a --smp option to virt-rescue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These APIs let you copy compressed files or devices out from the disk
image.
Compression is useful for large images which are mostly zeroes. We
cannot currently do sparseness detection, and compression gives us a
form of zero detection for free.
Example usage:
$ guestfish --ro -a /dev/vg_pin/F16x64 -i \
compress-out gzip /etc/passwd /tmp/passwd.gz
$ file -z /tmp/passwd.gz
/tmp/passwd.gz: ASCII text (gzip compressed data, was "passwd", from
Unix, last modified: Sun Aug 28 14:40:46 2011)
|
|
|
|
|
|
|
|
|
| |
See:
https://bugzilla.redhat.com/show_bug.cgi?id=502058#c15
https://bugzilla.redhat.com/show_bug.cgi?id=698842#c8
This updates commit 79e66f89e2f6c27486476d7857da58feb491bf5c.
|
| |
|
|
|
|
|
|
|
|
|
| |
Originally this was disabled to work around RHBZ#502058. That bug was
never officially fixed, but it may have fixed itself.
In the meantime, KVM has broken ordinary PIC support (RHBZ#723822).
Since APIC is the most common way that regular Linux and Windows
guests run it makes sense to remove this hack.
|
| |
|
|
|
|
|
|
|
| |
This means "the device that holds /etc/fstab", so map it correctly.
This fixes support for ttylinux and also some other guests that use
/dev/root instead of a real device name.
|
| |
|
| |
|
|
|
|
| |
This event is generated whenever a libguestfs function is called.
|
| |
|
|
|
|
| |
pclose can return > 0 when the status of the command was non-zero.
|
|
|
|
|
| |
Note that errno is probably not set to a useful value here, so there
is not much point recording it.
|
|
|
|
| |
In particular pclose returns a status > 0 if the command fails.
|
| |
|
|
|
|
|
| |
This refactors the code in test_qemu slightly to ensure that
FILE *fp is not leaked on error paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default event handler in libguestfs was simply writing all debug
output directly to stderr. However if the output contains
non-printable characters such as terminal control codes then these
would also be sent directly.
With newer SeaBIOS there is a lame attempt to implement a splash
screen using terminal control codes, thus when libguestfs tries to
display debugging output it would cause the screen to clear and debug
output to be lost.
This commit causes all non-printing characters to be escaped.
(\n and \r characters from the appliance are treated somewhat
specially).
Furthermore, instead of using write(2), use buffered stderr calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function was used to print the qemu and
febootstrap-supermin-helper command lines.
Unfortunately in the qemu case it was used incorrectly: it called the
internal debug function (ie. event API callback) from the forked qemu
subprocess, which meant that higher level event callbacks might have
been invoked from the child process.
To fix this, convert the qemu case into a new function called
print_qemu_command line which just prints the command line directly to
stderr. This is called after stderr has been redirected into the pipe
to the main process. Thus the qemu command line will be marshalled
into the event API along with other qemu and appliance output.
After fixing this, only one use of guestfs___print_timestamped_argv
remained, for printing the febootstrap-supermin-helper command line.
This is converted to a local function print_febootstrap_command_line.
Also print_febootstrap_command_line is now called before we fork
febootstrap-supermin-helper, so that messages no longer overlap.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously any disk that had /autoexec.bat or /boot.ini or /ntldr
would be picked up as a candidate for a Windows root disk. If further
checking could not find any systemroot (eg. /windows) then this would
result in complete failure of inspection.
In particular, this got confused by Hp_recovery partitions which have
/autoexec.bat, but don't have a systemroot in one of the usual places
(they have /MiniNT instead).
What we do now is to properly investigate all possible systemroot
places before deciding this is a Windows systemroot, so the subsequent
failure cannot occur.
(Thanks to lorimar for reporting this bug).
|
|
|
|
| |
It always has done. The documentation was wrong.
|