Description of problem: 'virt-qemu-run' failed to start qemu process with relative root dir. If 'virt-qemu-run' does not support relative root dir, it's better to report a clear error and not try to create directory tree in the relative dir. Version-Release number of selected component (if applicable): libvirt-6.6.0-6.module+el8.3.0+8125+aefcf088.x86_64 qemu-kvm-5.1.0-10.module+el8.3.0+8254+568ca30d.x86_64 How reproducible: 100% Steps to Reproduce: 1.#cd /var/tmp/ 2.#mkdir vm1 3.#setenforce 0; virt-qemu-run -d -v /root/xml/vm1.xml -r vm1 virt-qemu-run: 83: initializing libvirt virt-qemu-run: 1670: initializing signal handlers virt-qemu-run: 1684: preparing event loop thread virt-qemu-run: 1759: opening qemu:///embed?root=vm1 virt-qemu-run: 59197: starting guest /root/xml/vm1.xml virt-qemu-run: cannot start VM: can't connect to virtlogd: Unable to open file: vm1/log/qemu/83.log: No such file or directory virt-qemu-run: 1405241: cleaned up, exiting 4.# tree -f vm1 vm1 ├── vm1/cache │ └── vm1/cache/qemu │ └── vm1/cache/qemu/capabilities │ └── vm1/cache/qemu/capabilities/3c76bc41d59c0c7314b1ae8e63f4f765d2cf16abaeea081b3ca1f5d8732f7bb1.xml ├── vm1/lib │ └── vm1/lib/qemu │ ├── vm1/lib/qemu/channel │ │ └── vm1/lib/qemu/channel/target │ ├── vm1/lib/qemu/checkpoint │ ├── vm1/lib/qemu/dump │ ├── vm1/lib/qemu/nvram │ ├── vm1/lib/qemu/ram │ ├── vm1/lib/qemu/save │ └── vm1/lib/qemu/snapshot ├── vm1/log │ └── vm1/log/qemu └── vm1/run └── vm1/run/qemu ├── vm1/run/qemu/autostarted ├── vm1/run/qemu/dbus ├── vm1/run/qemu/driver.pid └── vm1/run/qemu/slirp 19 directories, 3 files 5.#rm -rf vm1 6.# virt-qemu-run -d -v /root/xml/vm1.xml -r vm1 virt-qemu-run: 57: initializing libvirt virt-qemu-run: 1877: initializing signal handlers virt-qemu-run: 1891: preparing event loop thread virt-qemu-run: 1976: opening qemu:///embed?root=vm1 2020-09-30 01:49:31.875+0000: 244223: info : libvirt version: 6.6.0, package: 6.virtcov.el8 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2020-09-17-01:41:02, ) 2020-09-30 01:49:31.875+0000: 244223: info : hostname: dell-per730-36.lab.eng.pek2.redhat.com 2020-09-30 01:49:31.875+0000: 244223: error : virStateInitialize:662 : Initialisation of QEMU state driver failed: Failed to create state dir vm1/run/qemu: Invalid argument virt-qemu-run: cannot open qemu:///embed?root=vm1: Failed to create state dir vm1/run/qemu: Invalid argument virt-qemu-run: 52110: cleaned up, exiting Actual restuls: 'virt-qemu-run' failed to start qemu process with relative root dir. Expected results: Start qemu process with relative root dir successfully. If 'virt-qemu-run' does not support relative root dir, it's better to report a clear error and not try to create directory tree in the relative dir. Additional info:
Patches posted upstream: https://listman.redhat.com/archives/libvir-list/2021-March/msg00010.html
Fixed upstream as: b1fef73225 virConnectOpen: Require root dir to be absolute path v7.1.0-195-gb1fef73225
Verified with libvirt-daemon-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64. Test steps: 1.#cd /var/tmp/ 2.#mkdir vm1 3.#setenforce 0; virt-qemu-run -d -v /root/vm1.xml -r vm1 virt-qemu-run: 73: initializing libvirt 104907 virt-qemu-run: 2022: initializing signal handlers virt-qemu-run: 2126: preparing event loop thread virt-qemu-run: 2218: opening qemu:///embed?root=vm1 virt-qemu-run: cannot open qemu:///embed?root=vm1: unsupported configuration: root path must be absolute virt-qemu-run: 2584: cleaned up, exiting
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:av 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-2021:4684