summaryrefslogtreecommitdiff
path: root/vmdb/plugins/luks_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'vmdb/plugins/luks_plugin.py')
-rw-r--r--vmdb/plugins/luks_plugin.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/vmdb/plugins/luks_plugin.py b/vmdb/plugins/luks_plugin.py
index 2ed132b..b736bea 100644
--- a/vmdb/plugins/luks_plugin.py
+++ b/vmdb/plugins/luks_plugin.py
@@ -67,15 +67,23 @@ class CryptsetupStepRunner(vmdb.StepRunnerInterface):
)
assert 0
- vmdb.runcmd(["cryptsetup", "-q", "luksFormat", dev, key_file])
vmdb.runcmd(
[
"cryptsetup",
- "open",
+ "-q",
+ "luksFormat",
"--type",
"luks2",
- "--key-file",
"--allow-discards",
+ dev,
+ key_file,
+ ]
+ )
+ vmdb.runcmd(
+ [
+ "cryptsetup",
+ "open",
+ "--key-file",
key_file,
dev,
crypt_name,