Created attachment 1484095 [details] virt-v2v logs Description of problem: Migration of VM with Encrypted Disk Fails- Tested with RHEL7 Server Minimal install LUKS Encrypted Disk. Version-Release number of selected component (if applicable): 5.9.4.7 How reproducible: 100% Steps to Reproduce: 1.Add VMware and RHV provider 2.Configure Conversion host for migration 3.Create a VM which has LUKS Encryption on its disk 4.Create infra mapping and migration plan to migrate this VM Actual results: Migration Fails with Error : libguestfs: trace: v2v: vfs_type = "crypto_LUKS" getline: Inappropriate ioctl for device libguestfs: trace: v2v: close See attached Log file Expected results: Migration of Encrypted Disk VM should be supported or appropriate error should be displayed to user in CF. Probably block migration of such VM. Additional info:
virt-v2v is asking for an encryption passphrase to decrypt the disk. However as there is no console it gets an error when reading it: https://github.com/libguestfs/libguestfs/blob/b0c11adee755018208d946fd104fdfc9f0da8de3/common/options/keys.c#L77 You can pass keys to virt-v2v using the virt-v2v --keys-from-stdin option, but it will require additional support in the wrapper.
(In reply to Richard W.M. Jones from comment #3) > You can pass keys to virt-v2v using the > virt-v2v --keys-from-stdin option, but it will require additional > support in the wrapper. This is correct, however it is very inconvenient to use: you need to write to stdin the passphrases in the correct order of the LUKS volumes. I introduced upstream a new --key command line parameter in all the tools (virt-v2v included) to help with this process: https://github.com/libguestfs/libguestfs/commit/4b1e5b0c3f900b0f197885e85f8c917caff3c339 Maybe this needs a --machine-readable capability? (Also to help virt-p2v to use it.)