search for: get_drive_slot

Displaying 20 results from an estimated 23 matches for "get_drive_slot".

2015 Aug 28
7
v2v: -i libvirtxml: Map empty network or bridge name to a default (RHBZ#1257895).
When importing from VMware via the libvirt driver, the libvirt driver can add an empty source bridge name: <interface type='bridge'> <mac address='00:01:02:03:04:05:06'/> <source bridge=''/> </interface> Replicate what we do on the -i ova path, and map these to "eth0", "eth1" etc. This also includes a bunch
2016 Jun 22
1
[PATCH 1/2] v2v: Fix conversion of floppy removable devices (RHBZ#1309706).
...sertions(+), 14 deletions(-) diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index 24e3b74..552bd9f 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -319,6 +319,7 @@ let parse_libvirt_xml ?conn xml = | Some s when String.is_prefix s "sd" -> get_drive_slot s 2 | Some s when String.is_prefix s "vd" -> get_drive_slot s 2 | Some s when String.is_prefix s "xvd" -> get_drive_slot s 3 + | Some s when String.is_prefix s "fd" -> get_drive_slot s 2 | Some s -> warning (f_&...
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...--- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -290,10 +290,10 @@ let parse_libvirt_xml ?conn xml = let target_dev = xpath_string "target/@dev" in match target_dev with | None -> None - | Some s when string_prefix s "hd" -> get_drive_slot s 2 - | Some s when string_prefix s "sd" -> get_drive_slot s 2 - | Some s when string_prefix s "vd" -> get_drive_slot s 2 - | Some s when string_prefix s "xvd" -> get_drive_slot s 3 + | Some s when String.is_prefix s "hd"...
2015 Jul 01
12
[PATCH 1/9] v2v: Stable bus and slot numbers for removable drives (RHBZ#1238053).
This patch series adds stable bus and slot numbers for removable drives (CDs and floppies) when the guest is converted using virt-v2v or virt-p2v. Previously we were a bit random about this. After this patch series, the bus and slot numbers and preserved if at all possible. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1238053 Rich.
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.
2017 Jun 29
0
[PATCH] v2v: Allow -i libvirtxml to open network disks over http or https.
...libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 4ac9b51a5..ed2266232 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -23,6 +23,7 @@ open Common_utils open Types open Xpath_helpers +open Utils type parsed_disk = { p_source_disk : source_disk; @@ -43,12 +44,38 @@ let get_drive_slot str offset = warning (f_"could not parse device name ‘%s’ from the source libvirt XML") str; None +(* Create a JSON URI for qemu referring to a remote CURL (http/https) + * resource. See also [v2v/vCenter.ml]. + *) +let create_curl_qemu_uri driver host port path = + le...
2019 Apr 09
1
[PATCH] v2v: Implement the --bandwidth* options to control network bandwidth.
This is built on top of the following patch series: https://www.redhat.com/archives/libguestfs/2019-April/msg00054.html Rich.
2017 Jun 15
0
[PATCH v6 10/41] mllib, v2v: Split out OCaml utils bindings ‘common/mlutils’.
..._libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 56f9ea297..285cf2f44 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -18,6 +18,7 @@ open Printf +open C_utils open Std_utils open Common_utils open Common_gettext.Gettext @@ -39,7 +40,7 @@ and parsed_source = *) let get_drive_slot str offset = let name = String.sub str offset (String.length str - offset) in - try Some (Utils.drive_index name) + try Some (drive_index name) with Invalid_argument _ -> warning (f_"could not parse device name ‘%s’ from the source libvirt XML") str; None diff -...
2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...rs into a 'json:' protocol string. *) let qemu_uri = "json: " ^ JSON.string_of_doc json_params in diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index 231931f..24e3b74 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -47,8 +47,7 @@ let get_drive_slot str offset = None let parse_libvirt_xml ?conn xml = - if verbose () then - printf "libvirt xml is:\n%s\n" xml; + debug "libvirt xml is:\n%s" xml; let doc = Xml.parse_memory xml in let xpathctx = Xml.xpath_new_context doc in diff --git a/v2v/input_ova.ml b...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.
2019 Jul 19
12
[PATCH v3 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00115.html This also has links to earlier versions. v3: - The 01/11 patch in v2 included a bunch of unnecessary plus one necessary change to how input_password is passed around. I moved the necessary change into the final patch (implementing SSH password authentication) and dropped the rest. - The 01/11
2019 Jul 11
11
[PATCH v2 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
Originally posted here: https://www.redhat.com/archives/libguestfs/2019-April/thread.html#00054 https://www.redhat.com/archives/libguestfs/2019-April/msg00076.html https://www.redhat.com/archives/libguestfs/2019-April/msg00126.html This is a rebase on top of current master branch with no other changes. The first patch in the old series was pushed a while back, and the last "TEMPORARY"
2019 Sep 20
15
[PATCH v4 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v3 posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00200.html v4: - The first patch in the v3 series was just a trivial doc whitespace fix so I pushed it. - There's a new patch using the nbdkit-retry-filter. This is not actually upstream in nbdkit but we know enough about how it will work. - Rebased against master and reran the tests. Rich.
2017 Jan 25
0
[PATCH v2 2/7] lib: Move utilities to new directory common/utils.
...ibvirtxml.ml @@ -35,7 +35,7 @@ and parsed_source = | P_dont_rewrite (* Turn string like "hda" into controller slot number. See also - * src/utils.c:guestfs_int_drive_index which this function calls. + * common/utils/utils.c:guestfs_int_drive_index which this function calls. *) let get_drive_slot str offset = let len = String.length str in diff --git a/v2v/test-harness/Makefile.am b/v2v/test-harness/Makefile.am index 1a1a1a7..e2ba15c 100644 --- a/v2v/test-harness/Makefile.am +++ b/v2v/test-harness/Makefile.am @@ -38,6 +38,7 @@ if HAVE_OCAML_PKG_LIBVIRT # installed copy of libguestfs. O...
2019 Apr 08
12
[PATCH 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
This series (except the last one) changes virt-v2v to use nbdkit for several input modes: -i vmx -it vddk: No change in functionality, as this already uses nbdkit-vddk-plugin, but the code is refactored for the other modes to use. -i libvirtxml: Use nbdkit-curl-plugin instead of qemu curl. vCenter: Use nbdkit-curl-plugin instead of qemu curl. xen: Use nbdkit-ssh-plugin instead of qemu
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...ch the number of guest disk images (for this guest: %d)") (List.length targets); let mp, uuid = diff --git a/v2v/parse_libvirt_xml.ml b/v2v/parse_libvirt_xml.ml index 2dee274bf..4ac9b51a5 100644 --- a/v2v/parse_libvirt_xml.ml +++ b/v2v/parse_libvirt_xml.ml @@ -40,7 +40,7 @@ let get_drive_slot str offset = let name = String.sub str offset (String.length str - offset) in try Some (Utils.drive_index name) with Invalid_argument _ -> - warning (f_"could not parse device name '%s' from the source libvirt XML") str; + warning (f_"could not parse d...
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only code motion (or supposed to be). A new directory, common/, is created for all of the common code which is currently shared in random ways between parts of the project. And src/ becomes lib/ (the largest change, but mostly mechanical). In full this series makes the following changes: src/libprotocol -> common/protocol
2017 Jan 25
10
[PATCH v2 0/7] Rename src/ to lib/ and move common code to common/
Previous patch series was posted here: https://www.redhat.com/archives/libguestfs/2017-January/msg00059.html v2 simply extends this patch series to cover the extra directories common/edit, common/progress, common/windows and common/parallel. The only remaining item is to consider whether we should rename mllib to something else, mlcommon was my suggestion. Rich.
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html I believe this addresses everything raised in comments on that patch series. Rich.
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -