migration: Fix connect sock issue #6371
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Failed to run virtiofsd/swtpm command on target host which lead to 'Permission denied' error. So update case.
Before:
Command '/bin/virsh attach-device avocado-vt-vm1 /var/tmp/xml_utils_temp_0g89yjed.xml' failed. stdout: b'\n' stderr: b"error: Failed to attach device from /var/tmp/xml_utils_temp_0g89yjed.xml\nerror: internal error: unable to execute QEMU command 'chardev-add': Failed to add chardev 'chr-vu-fs0': Failed to connect to '/var/vm001-vhost-fs.sock': Permission denied\n"
VM 'avocado-vt-vm1' failed to start: error: Failed to start domain 'avocado-vt-vm1' error: internal error: process exited while connecting to monitor: 2025-06-09T16:59:09.005669Z qemu-kvm: -chardev socket,id=chrtpm,path=/var/tmp/guest-swtpm.sock: Failed to connect to '/var/tmp/guest-swtpm.sock': Permission denied(exit status: 1)
After:
(1/1) type_specific.io-github-autotest-libvirt.migration.migration_with_virtiofs.migration_with_externally_launched_virtiofs_dev.with_precopy: STARTED
(1/1) type_specific.io-github-autotest-libvirt.migration.migration_with_virtiofs.migration_with_externally_launched_virtiofs_dev.with_precopy: PASS (205.86 s)
(1/1) type_specific.io-github-autotest-libvirt.migration_with_vtpm.migration_with_external_tpm.persistent_and_p2p: STARTED
(1/1) type_specific.io-github-autotest-libvirt.migration_with_vtpm.migration_with_external_tpm.persistent_and_p2p: PASS (220.01 s)