今天用nfs://host/dir的格式安装失败了。后来看了python-virtinst-0.400.3-5.el5包里面DistroInstaller.py文件的源码,发现其中有一步是转换NFS URL的格式:
def _sanitize_url(url):
"""
Do nothing for http or ftp, but make sure nfs is in the expected format
"""
if url.startswith("nfs://"):
# Convert RFC compliant NFS nfs://server/path/to/distro
# to what mount/anaconda expect nfs:server:/path/to/distro
# and carry the latter form around internally
url = "nfs:" + url[6:]
# If we need to add the : after the server
index = url.find("/", 4)
if index == -1:
raise ValueError(_("Invalid NFS format: No path specified."))
if url[index - 1] != ":":
url = url[:index] + ":" + url[index:]
return url
于是按照它那个写成nfs:host:/dir 就成功了。估计是转换脚本没有正常运行造成的