Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
d9c3aed4
Commit
d9c3aed4
authored
Nov 19, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/virtualbox: use VBOX_INSTALL_PATH to find VBoxManage
parent
6867c4f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
CHANGELOG.md
CHANGELOG.md
+2
-0
builder/virtualbox/builder.go
builder/virtualbox/builder.go
+24
-3
No files found.
CHANGELOG.md
View file @
d9c3aed4
...
...
@@ -16,6 +16,8 @@ IMPROVEMENTS:
IDs to apply. [GH-499]
*
builder/amazon/all: AWS API requests are now retried when a temporary
network error occurs as well as 500 errors. [GH-559]
*
builder/virtualbox: Use VBOX
\_
INSTALL
\_
PATH env var on Windows to find
VBoxManage. [GH-628]
*
post-processor/vagrant: skips gzip compression when compression_level=0
*
provisioner/chef-solo: Encrypted data bag support [GH-625]
...
...
builder/virtualbox/builder.go
View file @
d9c3aed4
...
...
@@ -10,6 +10,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"time"
)
...
...
@@ -485,9 +486,29 @@ func (b *Builder) Cancel() {
}
func
(
b
*
Builder
)
newDriver
()
(
Driver
,
error
)
{
vboxmanagePath
,
err
:=
exec
.
LookPath
(
"VBoxManage"
)
if
err
!=
nil
{
return
nil
,
err
var
vboxmanagePath
string
if
runtime
.
GOOS
==
"windows"
{
// On Windows, we check VBOX_INSTALL_PATH env var for the path
if
installPath
:=
os
.
Getenv
(
"VBOX_INSTALL_PATH"
);
installPath
!=
""
{
log
.
Printf
(
"[DEBUG] builder/virtualbox: VBOX_INSTALL_PATH: %s"
,
installPath
)
for
_
,
path
:=
range
strings
.
Split
(
installPath
,
";"
)
{
path
=
filepath
.
Join
(
path
,
"VBoxManage.exe"
)
if
_
,
err
:=
os
.
Stat
(
path
);
err
==
nil
{
vboxmanagePath
=
path
break
}
}
}
}
if
vboxmanagePath
==
""
{
var
err
error
vboxmanagePath
,
err
=
exec
.
LookPath
(
"VBoxManage"
)
if
err
!=
nil
{
return
nil
,
err
}
}
log
.
Printf
(
"VBoxManage path: %s"
,
vboxmanagePath
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment