From 132e1f6ffb696085c395cda40c5a079101c92f9a Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 16 Feb 2022 15:59:47 +0200 Subject: fix: how luksFormat is called Sponsored-by: author --- vmdb/plugins/luks_plugin.py | 14 +++++++++++--- 1 file 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, -- cgit v1.2.1