Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Oct 12, 2015
  1. @ptoscano

    builder: fix conversion of double to OCaml (RHBZ#1270011).

    ptoscano authored
    Create the OCaml value for double using caml_copy_double, which is
    the correct way, simplier, and works.
Commits on Oct 9, 2015
  1. @rwmjones

    Version 1.31.16.

    rwmjones authored
  2. @rwmjones
  3. @rwmjones

    v2v: Refactor the map_source_to_uri function.

    rwmjones authored
    Move this function to the VCenter module.  This is easier since it
    doesn't have to do dcPath calculation (see previous commit).
    The readhead parameter is no longer labelled.
  4. @rwmjones

    v2v: Use libvirt-supplied <vmware:datacenterpath> if available.

    rwmjones authored
    In libvirt >= 1.2.20, the VMware libvirt driver supplies the correct
    dcPath to use via <vmware:datacenterpath> in the libvirt XML.  If
    libvirt passes us this element, use it.
    This code still allows the user to override dcPath using the --dcPath
    option on the command line, but that's mainly for safety so we can fix
    any problems in virt-v2v or libvirt in the field.  As we get more
    confident in libvirt and as libvirt 1.2.20 is more widely adopted, we
    will be able to deprecate this parameter entirely.
    Thanks: Matthias Bolte for adding the <vmware:datacenterpath> element
    to libvirt in;a=commit;h=636a99058758a0447482f3baad94de8de3ab1151
  5. @rwmjones

    v2v: Move VCenter functions to library module.

    rwmjones authored
    This refactors useful VCenter functions out of the large
    '' file.
  6. @rwmjones

    v2v: Move curl functions to library module.

    rwmjones authored
    This refactors the curl functions used to talk to vCenter into a
    library module.
  7. @rwmjones

    v2v: Fix bogus comment.

    rwmjones authored
  8. @rwmjones

    inspect: Don't free uninitialized string.

    rwmjones authored
    libguestfs: trace: v2v: read_lines "/etc/os-release"
    libguestfs: trace: v2v: read_lines = ["NAME=Fedora", "VERSION="20 (Heisenbug)"", "ID=fedora", "VERSION_ID=20", "PRETTY_NAME="Fedora 20 (Heisenbug)"", "ANSI_COLOR="0;34"", "CPE_NAME="cpe:/o:fedoraproject:fedora:20"", "HOME_URL=""", "BUG_REPORT_URL=""", "REDHAT_BUGZILLA_PRODUCT="Fedora"", "REDHAT_BUGZILLA_PRODUCT_VERSION=20", "REDHAT_SUPPORT_PRODUCT="Fedora"", "REDHAT_SUPPORT_PRODUCT_VERSION=20"]
    At this point libguestfs segfaulted.
    It seems as if 'major' is not used here, so don't try to free it.
    This fixes commit 32d19e3.
Commits on Oct 8, 2015
  1. @rwmjones

    Version 1.31.15.

    rwmjones authored
  2. @rwmjones

    handle: Free g->identifier on close.

    rwmjones authored
    This fixes commit f6e13ae.
  3. @rwmjones

    v2v: Add xpath_int64 functions, and use them to read memory values.

    rwmjones authored
    On 32 bit platforms, reading the memory values can cause some numbers
    to be read as negative numbers.  Fix this by treating memory values as
    64 bit integers throughout the parsing and calculation.
  4. @rwmjones

    Version 1.31.14.

    rwmjones authored
  5. @rwmjones

    test/qemu: Fix free/close of log file.

    rwmjones authored
    The log file was not being closed at the right time, resulting in the
    process running out of open files.  Also the log filename buffer was
    not freed.
    This fixes commit 7bbf5ca.
  6. @rwmjones

    v2v: Use handle identifier in a few places.

    rwmjones authored
    Set the handle identifier of the main handle to "v2v".
    Whenever we open a second handle for any substantial operation, set
    the handle identifier for that handle too.
    This should make traces clearer.
  7. @rwmjones

    v2v: add test for v2v with virtio-win drivers on iso

    Roman Kagan authored rwmjones committed
    For that, add autofoo machinery to generate the iso out of the fake
    virtio-win drivers introduced in the previous patches, and pass the
    resulting image in $VIRTIO_WIN to v2v in a new test otherwise similar to
    Signed-off-by: Roman Kagan <>
  8. @rwmjones

    v2v:tests: use fake virtio-win drivers

    Roman Kagan authored rwmjones committed
    In order to test the copying of virtio-win drivers into the guest during
    v2v, create a set of fake virtio-win drivers and make use of them in the
    corresponding v2v tests.
    Signed-off-by: Roman Kagan <>
  9. @rwmjones

    tests/qemu: Add qemu-boot --log option.

    rwmjones authored
    This option can be used to direct output from each individual
    boot test to a different file.  Usual usage is:
      qemu-boot --log /tmp/output.% -v -x -n 1000
  10. @rwmjones
  11. @rwmjones

    New APIs: set-identifier, get-identifier

    rwmjones authored
    Add a per-handle identifier.  The main effect of this is to change
    trace output from:
      libguestfs: trace: foo
      libguestfs: trace: ID: foo
    which makes it simpler to follow traces from multi-threaded programs.
  12. @rwmjones

    v2v:test:win: actually check the eventual layout

    Roman Kagan authored rwmjones committed
    v2v/ used to query if the expected
    directories and files were present in the VM upon conversion; however it
    would ignore the results of that query.
    That lead to the test passing even though the checks failed.
    To fix it, parse the output of guestfish and verify that all is-file and
    is-dir commands report the expected "true".
    The approach taken is slightly more elaborate than what is being used in
    other components, but it allows to generate comprehensible reports in
    case of test failure, and facilitates future expansion of the set of
    checks including negative ones.
    Signed-off-by: Roman Kagan <>
  13. @rwmjones

    v2v: add fake rhev-apt.exe

    Roman Kagan authored rwmjones committed
    Without rhev-apt.exe the code path where firstboot scripts are created
    isn't taken, so it isn't tested and v2v/
    is supposed to fail (it actually doesn't but for another reason,
    addressed in a followup patch).
    Signed-off-by: Roman Kagan <>
  14. @rwmjones

    v2v:tests: use fake rhsrvany.exe

    Roman Kagan authored rwmjones committed
    The tests that depend on rhsrvany.exe being available, actually don't
    need it to be the real one: all they want is the file being present.
    So, instead of skipping the tests if the real rhsrvany.exe is not found,
    store a fake one in the repository, and point $VIRT_TOOLS_DATA_DIR at
    its location.
    Signed-off-by: Roman Kagan <>
  15. @ptoscano

    build: use libintl where needed

    ptoscano authored
    Followup of commit a5426cc.
  16. @ptoscano

    fuse: test-fuse: close files even on errors

    ptoscano authored
    Make sure to close the open files even when test_fuse() returns earlier
    because of failures, otherwise the mountpoint is still in use by open
    files when later guestunmount is called on it.
Commits on Oct 7, 2015
  1. @rwmjones
  2. @rwmjones

    Version 1.31.13.

    rwmjones authored
  3. @rwmjones
  4. @rwmjones

    ocaml/examples: Remove all programs in 'make clean'.

    rwmjones authored
    Previously the debug_logging program was not being deleted.
  5. @rwmjones

    Version 1.31.12.

    rwmjones authored
  6. @rwmjones
Commits on Oct 6, 2015
  1. @rwmjones
  2. @rwmjones

    ocaml: Allow Guestfs.t handle to be garbage collected.

    rwmjones authored
    ** NB: This is an API break for OCaml programs using Guestfs.event_callback. **
    Because of the way I implemented Guestfs.event_callback which had the
    Guestfs.t handle as the first parameter, we had to store the (OCaml)
    Guestfs.t handle in the C handle's private data area.  To do that, we
    had to create a global root pointing to the handle.
    This of course meant that the handle could not be garbage collected
    (thanks Roman Kagan for spotting this).
    This changes the API of Guestfs.event_callback so that a handle is no
    longer passed.  The OCaml handle can now be garbage collected again.
    For programs that need the Guestfs.t handle in the callback function
    (which turns out to be *none* of the OCaml programs we have written),
    you can do:
      g#set_event_callback (callback_fn g) [Guestfs.EVENT_FOO];
    In this case, since the closure passed to Guestfs.set_event_callback
    is still registered as a global root, that will capture a reference to
    the handle, so the handle won't be able to be garbage collected until
    you delete the callback.
  3. @rwmjones

    ocaml: Use generational global roots.

    rwmjones authored
    These are considerably more efficient than ordinary global roots, but
    with the caveat that the program is not allowed to modify them without
    calling a special function.  We don't modify them, so this change is
    This requires OCaml >= 3.11, but we have that on RHEL 6
    (since we dropped support for RHEL 5).
    See also:
  4. @rwmjones

    mllib: Replace various ad hoc string_* functions with String.*

    rwmjones authored
    This is just a straight refactoring.  Various ad hoc string_*
    functions that appeared in Common_utils have been renamed and placed
    in the String.* namespace.  The old vs "new" functions are:
    string_prefix  -> String.is_prefix
    string_suffix  -> String.is_suffix
    string_find    -> String.find
    replace_str    -> String.replace
    string_nsplit  -> String.nsplit
    string_split   -> String.split
    string_lines_split -> String.lines_split
    string_random8 -> String.random8
Something went wrong with that request. Please try again.