I have a VM running under KVM hypervisor on a CentOS 7.3 server that was created with a LUKS-encrypted root partition. There are two partitions in the VM: /dev/sda1 is the boot partition and is unencrypted and /dev/sda2 is the encrypted partition with the root filesystem. The VM, when started, prompts for the pass phrase, which, when entered, decrypts the partition and boots the OS. That all works correctly.
What I would like to do is, with the VM not running, use guestmount to mount the VM's virtual disk as a mount point on the hypervisor's server and, thus, be able to manipulate the files on the filesystem. The command I'm using is
> guestmount -d encrypted_vm -i /mnt/vm
Upon issuing this command, I'm prompted for the passphrase, which I enter. An error message then appears stating that it couldn't find an OS which makes me wonder if it even tried to decrypt the disk.
Am I missing something or this is something which is just not supported?