Bug 1920400 - virt-qemu-run can not parse root dir containing space char
Summary: virt-qemu-run can not parse root dir containing space char
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.4
Assignee: Michal Privoznik
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-26 09:06 UTC by yafu
Modified: 2021-11-16 08:09 UTC (History)
7 users (show)

Fixed In Version: libvirt-7.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 07:51:32 UTC
Type: Bug
Target Upstream Version: 7.1.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4684 0 None None None 2021-11-16 07:51:58 UTC

Description yafu 2021-01-26 09:06:57 UTC
Description of problem:
virt-qemu-run can not parse root dir containing space char

Version-Release number of selected component (if applicable):
libvirt-daemon-7.0.0-2.module+el8.4.0+9520+ef609c5f.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virt-qemu-run -d -v /tmp/vm3.xml -r /tmp/test\ test/
virt-qemu-run: 78: initializing libvirt 3511
virt-qemu-run: 2380: initializing signal handlers
virt-qemu-run: 2411: preparing event loop thread
virt-qemu-run: 2488: opening qemu:///embed?root=/tmp/test test/
virt-qemu-run: cannot open qemu:///embed?root=/tmp/test test/: internal error: Unable to parse URI qemu:///embed?root=/tmp/test test/

2.

3.

Actual results:


Expected results:


Additional info:

Comment 1 Michal Privoznik 2021-02-12 16:42:51 UTC
Patch proposed upstream:

https://listman.redhat.com/archives/libvir-list/2021-February/msg00772.html

Comment 2 Michal Privoznik 2021-02-12 17:01:00 UTC
Merged upstream as:

859f7e2072 qemu_shim: URI escape root directory

v7.0.0-448-g859f7e2072

Comment 6 yafu 2021-05-26 08:20:29 UTC
Verified with libvirt-daemon-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64.

Test steps:
1.Start a guest by 'vrit-qemu-run' with a root dir containing space char:
# virt-qemu-run  -v /root/vm1.xml -r /tmp/test\ test/
virt-qemu-run: 79: initializing libvirt 8910
virt-qemu-run: 2668: initializing signal handlers
virt-qemu-run: 2783: preparing event loop thread
virt-qemu-run: 2873: opening qemu:///embed?root=%2Ftmp%2Ftest%20test%2F
virt-qemu-run: 39346: fetching guest config /root/vm1.xml
virt-qemu-run: 39457: starting guest /root/vm1.xml
virt-qemu-run: 1086625: guest running, Ctrl-C to stop now

2.Check the qemu process and could see the qemu process started by step 1:
# ps aux | grep -i qemu-kvm
qemu        8935 95.0  1.2 5397352 797228 ?      SLl  04:19   0:36 /usr/libexec/qemu-kvm -name guest=vm1,debug-threads=on -S -object {"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/test test//lib/qemu/domain-1-vm1/master-key.aes"} -machine pc-q35-rhel8.4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,...

Comment 8 errata-xmlrpc 2021-11-16 07:51:32 UTC
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


Note You need to log in before you can comment on or make changes to this bug.