Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
v2v: Add -o rhv-upload output mode (RHBZ#1557273).
PROBLEMS:
- -of qcow2 does not work, with multiple problems
* needs to set NBD size to something larger than virtual size
- Not tested against imageio which supports zero/trim/flush.
This adds a new output mode to virt-v2v. virt-v2v -o rhv-upload
streams images directly to an oVirt or RHV >= 4 Data Domain using the
oVirt SDK v4. It is more efficient than -o rhv because it does not
need to go via the Export Storage Domain, and is possible for humans
to use unlike -o vdsm.
The implementation uses the Python SDK (‘ovirtsdk4’ module). An
nbdkit Python 3 plugin translates NBD calls from qemu into HTTPS
requests to oVirt via the SDK.
(cherry picked from commit 719a2725714cb3d0ae06cb6aa01e2849ec167bec)- Loading branch information
Showing
15 changed files
with
1,378 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/bash - | ||
| # Embed code or other content into an OCaml file. | ||
| # Copyright (C) 2018 Red Hat Inc. | ||
| # | ||
| # This program is free software; you can redistribute it and/or modify | ||
| # it under the terms of the GNU General Public License as published by | ||
| # the Free Software Foundation; either version 2 of the License, or | ||
| # (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program; if not, write to the Free Software | ||
| # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
|
||
| # Embed code or other content into an OCaml file. | ||
| # | ||
| # It is embedded into a string. As OCaml string literals have virtually | ||
| # no restrictions on length or content we only have to escape double | ||
| # quotes for backslash characters. | ||
|
|
||
| if [ $# -ne 3 ]; then | ||
| echo "embed.sh identifier input output" | ||
| exit 1 | ||
| fi | ||
|
|
||
| ident="$1" | ||
| input="$2" | ||
| output="$3" | ||
|
|
||
| rm -f "$output" "$output"-t | ||
|
|
||
| exec >"$output"-t | ||
|
|
||
| echo "(* Generated by embed.sh from $input *)" | ||
| echo | ||
| echo let "$ident" = '"' | ||
| sed -e 's/\(["\]\)/\\\1/g' < "$input" | ||
| echo '"' | ||
|
|
||
| chmod -w "$output"-t | ||
| mv "$output"-t "$output" |
Oops, something went wrong.