mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-install: Fix --location nfs:// (bz 1011177)
This commit is contained in:
parent
827e4cd9e5
commit
8ba600a8e7
@ -404,9 +404,8 @@ class DistroInstaller(Installer):
|
||||
is_local = not self.conn.is_remote()
|
||||
if _is_url(val, is_local):
|
||||
self._location_is_path = False
|
||||
self._location = _sanitize_url(val)
|
||||
logging.debug("DistroInstaller location is a network source.")
|
||||
return val
|
||||
return _sanitize_url(val)
|
||||
|
||||
try:
|
||||
d = self._make_cdrom_dev(val)
|
||||
|
@ -208,6 +208,9 @@ class _MountedImageFetcher(_LocalImageFetcher):
|
||||
else:
|
||||
mountopt = "ro,loop"
|
||||
cmd = [mountcmd, "-o", mountopt, self.location, self.srcdir]
|
||||
|
||||
logging.debug("mount cmd: %s", cmd)
|
||||
|
||||
ret = subprocess.call(cmd)
|
||||
if ret != 0:
|
||||
self.cleanupLocation()
|
||||
@ -235,7 +238,7 @@ def _fetcherForURI(uri, scratchdir=None):
|
||||
fclass = _HTTPImageFetcher
|
||||
elif uri.startswith("ftp://"):
|
||||
fclass = _FTPImageFetcher
|
||||
elif uri.startswith("nfs://"):
|
||||
elif uri.startswith("nfs:"):
|
||||
fclass = _MountedImageFetcher
|
||||
else:
|
||||
if os.path.isdir(uri):
|
||||
|
Loading…
Reference in New Issue
Block a user