Cause:
VMs with encrypted disks fail migration.
Consequence:
VM fails to migrate.
Workaround (if any):
De-encrypt VM disks prior to VM migration.
Result:
Post disk de-encryption successful VM migration.
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:
Comment 3Richard W.M. Jones
2018-12-04 08:33:47 UTC
(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.)
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: