From: nanliu <nanliu@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, nanliu <nanliu@redhat.com>
Subject: [PATCH] docs/system: Clarify local filename escaping in device URLs
Date: Thu, 20 Nov 2025 09:49:36 +0800 [thread overview]
Message-ID: <20251120014936.414413-1-nanliu@redhat.com> (raw)
The documentation currently lacks explicit information on how to escape
a local filename if it contains characters that cause it to be parsed
as a protocol (e.g., containing a ':').
Use two methods to avoid this:
1. use the explicit prefix ``file:`` (e.g. ``-cdrom file:foo:bar.iso``).
2. use a path with ``./`` in it (e.g. ``-cdrom ./foo:bar.iso``)
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3072
Signed-off-by: nanliu <nanliu@redhat.com>
---
docs/system/device-url-syntax.rst.inc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url-syntax.rst.inc
index 43b5c2596b..e7aa2be721 100644
--- a/docs/system/device-url-syntax.rst.inc
+++ b/docs/system/device-url-syntax.rst.inc
@@ -43,6 +43,14 @@ These are specified using a special URL syntax.
LIBISCSI_CHAP_PASSWORD="password" \\
|qemu_system| -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
+ Note on path parsing: If a local filename used with a device
+ option (e.g., ``-cdrom``) contains a colon (``:``), QEMU may
+ interpret it as a URL protocol; use the explicit prefix ``file:``
+ (e.g. ``-cdrom file:foo:bar.iso``) or a path with ``./`` in it
+ (e.g. ``-cdrom ./foo:bar.iso``) to ensure correct local file
+ resolution, and avoid using ``file://`` which may lead to
+ incorrect path resolution.
+
``NBD``
QEMU supports NBD (Network Block Devices) both using TCP protocol as
well as Unix Domain Sockets. With TCP, the default port is 10809.
--
2.51.1
reply other threads:[~2025-11-20 1:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251120014936.414413-1-nanliu@redhat.com \
--to=nanliu@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).