-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iso_url path doesn't work for windows network paths #2377
Comments
These worked for me: Windows 7 x64 SP1 |
I submitted a PR (#2906) that got things working more predictably when running on windows, and specifying a unc path. I just checked the following types: file:///absolute/path Any other file:// uri schemes that you can think of? |
There are some more examples on wikipedia. |
From looking through the wikipedia reference: one thing which is weird is none of these uri schemes that developers have implemented over the years try to differentiate between a \UNC\path and a /absolute/path/ as per posix. (I suppose one could use a unc:// scheme or something but that's going down some untreaded territory.) I can implement file:///c:/absolute/path since wikipedia gives that as another example, I can also implement '|', but that's a valid (if not uncommon) character on most filesystems. Any other ones that you think people might care about? |
No, thank you. I'm sure we can add more if/when needed. :) |
New in go 1.6, url.Parse now considers the '' character illegal when specified in the hostname. Unfortunately due packer's usage of DownloadableURL in common/config.go, file paths are pre-formatted as a uri. So unless it's decided to explicitly treat Another option is to implement explicit support for the "smb" scheme which means one might as well implement "ftp" (#478) or any of the other protocols such as "smb". However, since Really, the issue (maybe not an issue) is that packer is intentionally using the uri to store the path combined with meta-information about the path. So, If one wants to support #478 for "ftp" as well as "smb" or any other scheme, common/config.go and common/download.go should probably be consolidated. So, in config.go any instances of url.Parse would end up being removed until it's been "normalized" and any instance of |
I wrote PR #2906 that actually fixes this by splitting up smb into |
I have just upgraded from 0.10.2 to 0.12.3, I am on a Windows host. my iso_url is "////hostname/shared_folder/windows10.iso" I am now getting errors that it cannot download the iso, what should the url look like now? |
@smugerdan: what version of go are you using, >=1.6? If using If your situation allows for you to patch packer, you can manually apply PR #2906. This allows you to specify your smb path via |
@arizvisa sorry for the delay in replying, I have had a chance to test in 1.0.0 and it has been fixed. For what it is worth I have got the following format to work from a windows share:
|
seems this has been fixed, so closing. |
Improved support for downloading and validating a uri containing a Windows UNC path or a relative file:// scheme
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Tried a few variations:
file://share/iso/en_windows_server_2012_r2_vl_with_update_x64_dvd_6052766.iso
file:///share/iso/en_windows_server_2012_r2_vl_with_update_x64_dvd_6052766.iso
\share\iso\en_windows_server_2012_r2_vl_with_update_x64_dvd_6052766.iso
Each variation results in an error when I try to build: "The system cannot find the path specified."
The first variation is the one I expected to work. The 2nd I believe is technically invalid, and I wasn't really expecting the UNC path to be supported.
Using packer v0.8.
The text was updated successfully, but these errors were encountered: