Skip to content
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

Can't download local VBoxGuestAdditions on Windows #5801

Closed
GMC-I-Messtechnik opened this issue Jan 18, 2018 · 3 comments
Closed

Can't download local VBoxGuestAdditions on Windows #5801

GMC-I-Messtechnik opened this issue Jan 18, 2018 · 3 comments

Comments

@GMC-I-Messtechnik
Copy link

Since packer v1.1.2 it is not possible to download or copy the VBoxGuestAdditions.

My host platform is Windows 7 amd64.`

Packer v1.1.3 says:

==> virtualbox-iso: Downloading or copying Guest additions
    virtualbox-iso: Downloading or copying: file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
    virtualbox-iso: Error downloading: CreateFile /Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso: Das System kann den angegebenen Pfad nicht finden.
==> virtualbox-iso: Guest additions download failed.
Build 'virtualbox-iso' errored: Guest additions download failed.

Since Packer v1.1.1 the url of the iso changed.
v1.1.1

Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso

v1.1.2 and v1.1.3

Downloading or copying: file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso

After the scheme ("file:") there were three slashes. Now there are only 2 slashes!
This change combined with the change in common/download.go from commit 4fb8a27 ("remove the actual offending code") leads to an error under windows!

packer v1.1.3.exe: Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"C:", Path:"/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso", RawPath:"", ForceQuery:false, Ra
wQuery:"", Fragment:""}
packer v1.1.3.exe: [DEBUG] Using local file: /Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso

As you can see in the Log, the url with two slashes needs the combination of host and path for finalpath.
With three slashes there wasn't such a problem as the path was /C:/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso and got corrected by the removed lines (finalPath = finalPath[1:]).

@SwampDragons
Copy link
Contributor

I think this has been addressed on our master branch; see #5761 for context. Can you try building master (or using the packer binary uploaded in the comments of that PR) to see if that solves your issue?

@GMC-I-Messtechnik
Copy link
Author

Yes, PR #5761 fixed this issue.
Thanks for your work (and sorry for that duplicate).

@ghost
Copy link

ghost commented Apr 2, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants