In some situations, we want to be able to skip an encrypted disk automatically, without waiting for a passphrase from the user for this disk. For instance, it maybe be required by hosting service providers that use automatic guest reconfiguration but cannot have passphrases for encrypted guest disks. So this option can be part of "--in-place" because it is usually used in automatic mode. But this feature can also be implemented as a separate command line option, for example, "--skip-encrypt" Signed-off-by: Maxim Davydov <maxim.davydov at virtuozzo.com> --- v2v/v2v.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 68817da04..052c9f3ed 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -105,7 +105,7 @@ let rec main () g#launch (); (* Decrypt the disks. *) - inspect_decrypt g cmdline.ks; + if not cmdline.in_place then inspect_decrypt g cmdline.ks; (* Inspection - this also mounts up the filesystems. *) (match conversion_mode with -- 2.25.1
Richard W.M. Jones
2021-Dec-11 21:47 UTC
[Libguestfs] [PATCH] v2v: skip decryption of VM disks
On Sun, Dec 12, 2021 at 12:22:42AM +0300, Maxim Davydov wrote:> In some situations, we want to be able to skip an encrypted disk > automatically, without waiting for a passphrase from the user for this > disk. For instance, it maybe be required by hosting service providers that > use automatic guest reconfiguration but cannot have passphrases for > encrypted guest disks. So this option can be part of "--in-place" because > it is usually used in automatic mode. But this feature can also be > implemented as a separate command line option, for example, > "--skip-encrypt" > > Signed-off-by: Maxim Davydov <maxim.davydov at virtuozzo.com> > --- > v2v/v2v.ml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/v2v/v2v.ml b/v2v/v2v.ml > index 68817da04..052c9f3ed 100644 > --- a/v2v/v2v.ml > +++ b/v2v/v2v.ml > @@ -105,7 +105,7 @@ let rec main () > g#launch (); > > (* Decrypt the disks. *) > - inspect_decrypt g cmdline.ks; > + if not cmdline.in_place then inspect_decrypt g cmdline.ks; > > (* Inspection - this also mounts up the filesystems. *) > (match conversion_mode withHello Maxim, which version of virt-v2v would this be applied to? I have (temporarily) disabled in-place conversions upstream but intend to re-enable it soon, before 2.0 is released. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html