<div dir="ltr"><p>Hello all,</p>
<p>background: One of my VM stopped working - on startup, I get the message "No bootable device" in the virtual machine.</p>
<p>I would like to inspect the corresponding image with libguestfs-tools.</p>
<p>However, I don't know how to pass the encryption key to the tool. For example:</p>
<p>virt-ls -a /opt/vm_witherror/machine1.qcow2 /<br>
libguestfs: trace: set_verbose true<br>
libguestfs: trace: set_verbose = 0<br>
libguestfs: create: flags = 0, handle = 0x5645c40d6b00, program = virt-ls<br>
libguestfs: trace: add_drive "/opt/vm_witherror/machine1.qcow2" "readonly:true"<br>
libguestfs: creating COW overlay to protect original drive content<br>
libguestfs: trace: get_tmpdir<br>
libguestfs: trace: get_tmpdir = "/tmp"<br>
libguestfs: trace: disk_create "/tmp/libguestfsxECmri/overlay1.qcow2" "qcow2" -1 "backingfile:/opt/vm_witherror/machine1.qcow2"<br>
libguestfs: command: run: qemu-img<br>
libguestfs: command: run: \ create<br>
libguestfs: command: run: \ -f qcow2<br>
libguestfs: command: run: \ -o backing_file=/opt/vm_witherror/machine1.qcow2<br>
libguestfs: command: run: \ /tmp/libguestfsxECmri/overlay1.qcow2<br>
qemu-img: /tmp/libguestfsxECmri/overlay1.qcow2: Parameter 'encrypt.key-secret' is required for cipher<br>
Could not open backing image.<br>
libguestfs: error: qemu-img: /tmp/libguestfsxECmri/overlay1.qcow2: qemu-img exited with error status 1, see debug messages above<br>
libguestfs: trace: disk_create = -1 (error)<br>
libguestfs: trace: add_drive = -1 (error)<br>
libguestfs: trace: close<br>
libguestfs: closing guestfs handle 0x5645c40d6b00 (state 0)<br>
libguestfs: command: run: rm<br>
libguestfs: command: run: \ -rf /tmp/libguestfsxECmri</p>
<p><br>
</p>
<p>Could you please provide an example on how to get such an encrypted disk mounted?</p>
<p>Thanks in advance</p>
<p>Kind regards</p>
<p>Dominik</p>
</div>