|
|
a30de4 |
From a8853952b43e15fd4aa287d235d8583782475531 Mon Sep 17 00:00:00 2001
|
|
|
a30de4 |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
a30de4 |
Date: Mon, 22 May 2017 11:31:45 +0200
|
|
|
a30de4 |
Subject: [PATCH] v2v: add crypto support (RHBZ#1451665)
|
|
|
a30de4 |
|
|
|
a30de4 |
Make use of the additional command line arguments, and API needed to
|
|
|
a30de4 |
decrypt LUKS partitions. This extends to v2v the work done in other
|
|
|
a30de4 |
OCaml tools with commit 6b26a0cce4f1d6264bee88902b8931e39288c901,
|
|
|
a30de4 |
since it seems to be working fine after a basic testing.
|
|
|
a30de4 |
|
|
|
a30de4 |
Related to: RHBZ#1362649
|
|
|
a30de4 |
|
|
|
a30de4 |
(cherry picked from commit 7e6c16f1e7698317991b875f2d7ab3ce9e94c8bb)
|
|
|
a30de4 |
---
|
|
|
a30de4 |
v2v/cmdline.ml | 2 +-
|
|
|
a30de4 |
v2v/v2v.ml | 3 +++
|
|
|
a30de4 |
v2v/virt-v2v.pod | 20 ++++++++++++++++++++
|
|
|
a30de4 |
3 files changed, 24 insertions(+), 1 deletion(-)
|
|
|
a30de4 |
|
|
|
a30de4 |
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
|
|
|
a30de4 |
index db2346a38..6b105886c 100644
|
|
|
a30de4 |
--- a/v2v/cmdline.ml
|
|
|
a30de4 |
+++ b/v2v/cmdline.ml
|
|
|
a30de4 |
@@ -235,7 +235,7 @@ A short summary of the options is given below. For detailed help please
|
|
|
a30de4 |
read the man page virt-v2v(1).
|
|
|
a30de4 |
")
|
|
|
a30de4 |
prog in
|
|
|
a30de4 |
- let opthandle = create_standard_options argspec ~anon_fun usage_msg in
|
|
|
a30de4 |
+ let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true usage_msg in
|
|
|
a30de4 |
Getopt.parse opthandle;
|
|
|
a30de4 |
|
|
|
a30de4 |
(* Dereference the arguments. *)
|
|
|
a30de4 |
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
|
|
a30de4 |
index c1d412295..d03662c84 100644
|
|
|
a30de4 |
--- a/v2v/v2v.ml
|
|
|
a30de4 |
+++ b/v2v/v2v.ml
|
|
|
a30de4 |
@@ -90,6 +90,9 @@ let rec main () =
|
|
|
a30de4 |
|
|
|
a30de4 |
g#launch ();
|
|
|
a30de4 |
|
|
|
a30de4 |
+ (* Decrypt the disks. *)
|
|
|
a30de4 |
+ inspect_decrypt g;
|
|
|
a30de4 |
+
|
|
|
a30de4 |
(* Inspection - this also mounts up the filesystems. *)
|
|
|
a30de4 |
(match conversion_mode with
|
|
|
a30de4 |
| Copying _ -> message (f_"Inspecting the overlay")
|
|
|
a30de4 |
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
|
|
|
a30de4 |
index 7ed5c5d86..77b6f514f 100644
|
|
|
a30de4 |
--- a/v2v/virt-v2v.pod
|
|
|
a30de4 |
+++ b/v2v/virt-v2v.pod
|
|
|
a30de4 |
@@ -191,6 +191,17 @@ Save the overlay file(s) created during conversion. This option is
|
|
|
a30de4 |
only used for debugging virt-v2v and may be removed in a future
|
|
|
a30de4 |
version.
|
|
|
a30de4 |
|
|
|
a30de4 |
+=item B<--echo-keys>
|
|
|
a30de4 |
+
|
|
|
a30de4 |
+When prompting for keys and passphrases, virt-v2v normally turns
|
|
|
a30de4 |
+echoing off so you cannot see what you are typing. If you are not
|
|
|
a30de4 |
+worried about Tempest attacks and there is no one else in the room you
|
|
|
a30de4 |
+can specify this flag to see what you are typing.
|
|
|
a30de4 |
+
|
|
|
a30de4 |
+Note this options only applies to keys and passphrases for encrypted
|
|
|
a30de4 |
+devices and partitions, not for passwords used to connect to remote
|
|
|
a30de4 |
+servers.
|
|
|
a30de4 |
+
|
|
|
a30de4 |
=item B<-i> B<disk>
|
|
|
a30de4 |
|
|
|
a30de4 |
Set the input method to I<disk>.
|
|
|
a30de4 |
@@ -257,6 +268,15 @@ For I<-i disk> only, this specifies the format of the input disk
|
|
|
a30de4 |
image. For other input methods you should specify the input
|
|
|
a30de4 |
format in the metadata.
|
|
|
a30de4 |
|
|
|
a30de4 |
+=item B<--keys-from-stdin>
|
|
|
a30de4 |
+
|
|
|
a30de4 |
+Read key or passphrase parameters from stdin. The default is
|
|
|
a30de4 |
+to try to read passphrases from the user by opening F</dev/tty>.
|
|
|
a30de4 |
+
|
|
|
a30de4 |
+Note this options only applies to keys and passphrases for encrypted
|
|
|
a30de4 |
+devices and partitions, not for passwords used to connect to remote
|
|
|
a30de4 |
+servers.
|
|
|
a30de4 |
+
|
|
|
a30de4 |
=item B<--machine-readable>
|
|
|
a30de4 |
|
|
|
a30de4 |
This option is used to make the output more machine friendly
|
|
|
a30de4 |
--
|
|
|
a30de4 |
2.14.3
|
|
|
a30de4 |
|