Description of problem: Got bellow error when do encypted migration: # virsh migrate rhel7-min qemu+ssh://10.0.138.168/system --live --verbose --p2p --tls error: internal error: unable to execute QEMU command 'object-add': Unable to access credentials /etcpki/qemu/ca-cert.pem: No such file or directory Version-Release number of selected component (if applicable): libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64 How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
(In reply to Fangge Jin from comment #0) > Description of problem: > Got bellow error when do encypted migration: > # virsh migrate rhel7-min qemu+ssh://10.0.138.168/system --live --verbose > --p2p --tls > error: internal error: unable to execute QEMU command 'object-add': Unable > to access credentials /etcpki/qemu/ca-cert.pem: No such file or directory > > > > Version-Release number of selected component (if applicable): > libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64 Can you please check your /etc/libvirt/qemu.conf and the default_tls_x509_cert_dir option ? What's the output of grep "default_tls_x509_cert_dir.*=" /etc/libvirt/qemu.conf ? Thanks.
Caused by the following hunk of commit 068efae5b1a9ef : @@ -201,7 +233,11 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) * This will then be used as a fallback if the service specific * directory doesn't exist (although we don't check if this exists). */ - cfg->defaultTLSx509certdir = g_strdup(SYSCONFDIR "/pki/qemu"); + if (root == NULL) { + cfg->defaultTLSx509certdir = g_strdup(SYSCONFDIR "pki/qemu"); + } else { + cfg->defaultTLSx509certdir = g_strdup_printf("%s/etc/pki/qemu", root); + } cfg->vncListen = g_strdup(VIR_LOOPBACK_IPV4_ADDR); cfg->spiceListen = g_strdup(VIR_LOOPBACK_IPV4_ADDR); You can see that the '/' is dropped from the strdup.
https://www.redhat.com/archives/libvir-list/2020-June/msg00605.html
Fixed upstream: commit 8f58a4003532d5fffdadf2adc659c94eba3fa21a Author: Peter Krempa <pkrempa> Date: Tue Jun 16 12:36:55 2020 +0200 virQEMUDriverConfigNew: Add slash to cfg->defaultTLSx509certdir for non-embedded driver Commit 068efae5b1a9ef accidentally removed the slash. https://bugzilla.redhat.com/show_bug.cgi?id=1847234 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Andrea Bolognani <abologna>
Verified with libvirt-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:8.3 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5137