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
a7aa20c8
Commit
a7aa20c8
authored
Sep 10, 2014
by
Ross Smith II
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for VMware Fusion 7 Pro [GH-1478]
parent
f36b20ca
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
15 deletions
+12
-15
builder/vmware/common/driver.go
builder/vmware/common/driver.go
+2
-2
builder/vmware/common/driver_fusion6.go
builder/vmware/common/driver_fusion6.go
+6
-9
builder/vmware/common/driver_player6_windows.go
builder/vmware/common/driver_player6_windows.go
+1
-1
builder/vmware/common/driver_player_unix.go
builder/vmware/common/driver_player_unix.go
+1
-1
builder/vmware/common/driver_workstation10_windows.go
builder/vmware/common/driver_workstation10_windows.go
+1
-1
builder/vmware/common/driver_workstation_unix.go
builder/vmware/common/driver_workstation_unix.go
+1
-1
No files found.
builder/vmware/common/driver.go
View file @
a7aa20c8
...
...
@@ -158,7 +158,7 @@ func normalizeVersion(version string) (string, error) {
return
fmt
.
Sprintf
(
"%02d"
,
i
),
nil
}
func
compareVersions
(
versionFound
string
,
versionWanted
string
)
error
{
func
compareVersions
(
versionFound
string
,
versionWanted
string
,
product
string
)
error
{
found
,
err
:=
normalizeVersion
(
versionFound
)
if
err
!=
nil
{
return
err
...
...
@@ -171,7 +171,7 @@ func compareVersions(versionFound string, versionWanted string) error {
if
found
<
wanted
{
return
fmt
.
Errorf
(
"VMware
WS version %s, or greater, is required. Found version: %s"
,
versionWanted
,
versionFound
)
"VMware
%s version %s, or greater, is required. Found version: %s"
,
product
,
versionWanted
,
versionFound
)
}
return
nil
...
...
builder/vmware/common/driver_fusion6.go
View file @
a7aa20c8
...
...
@@ -11,7 +11,9 @@ import (
"strings"
)
// Fusion6Driver is a driver that can run VMware Fusion 5.
const
VMWARE_FUSION_VERSION
=
"6"
// Fusion6Driver is a driver that can run VMware Fusion 6.
type
Fusion6Driver
struct
{
Fusion5Driver
}
...
...
@@ -25,7 +27,7 @@ func (d *Fusion6Driver) Clone(dst, src string) error {
if
strings
.
Contains
(
err
.
Error
(),
"parameters was invalid"
)
{
return
fmt
.
Errorf
(
"Clone is not supported with your version of Fusion. Packer "
+
"only works with Fusion
6 Professional. Please verify your version."
)
"only works with Fusion
%s Professional or above. Please verify your version."
,
VMWARE_FUSION_VERSION
)
}
return
err
...
...
@@ -56,7 +58,7 @@ func (d *Fusion6Driver) Verify() error {
return
err
}
versionRe
:=
regexp
.
MustCompile
(
`(?i)VMware [a-z0-9-]+ (\d+
\.\d+\.\d+)\s
`
)
versionRe
:=
regexp
.
MustCompile
(
`(?i)VMware [a-z0-9-]+ (\d+
)\.
`
)
matches
:=
versionRe
.
FindStringSubmatch
(
stderr
.
String
())
if
matches
==
nil
{
return
fmt
.
Errorf
(
...
...
@@ -64,10 +66,5 @@ func (d *Fusion6Driver) Verify() error {
}
log
.
Printf
(
"Detected VMware version: %s"
,
matches
[
1
])
if
!
strings
.
HasPrefix
(
matches
[
1
],
"6."
)
{
return
fmt
.
Errorf
(
"Fusion 6 not detected. Got version: %s"
,
matches
[
1
])
}
return
nil
return
compareVersions
(
matches
[
1
],
VMWARE_FUSION_VERSION
,
"Fusion Professional"
)
}
builder/vmware/common/driver_player6_windows.go
View file @
a7aa20c8
...
...
@@ -31,5 +31,5 @@ func playerVerifyVersion(version string) error {
}
log
.
Printf
(
"Detected VMware Player version: %s"
,
matches
[
1
])
return
compareVersions
(
matches
[
1
],
version
)
return
compareVersions
(
matches
[
1
],
version
,
"Player"
)
}
builder/vmware/common/driver_player_unix.go
View file @
a7aa20c8
...
...
@@ -64,5 +64,5 @@ func playerVerifyVersion(version string) error {
}
log
.
Printf
(
"Detected VMWare Player version: %s"
,
matches
[
1
])
return
compareVersions
(
matches
[
1
],
version
)
return
compareVersions
(
matches
[
1
],
version
,
"Player"
)
}
builder/vmware/common/driver_workstation10_windows.go
View file @
a7aa20c8
...
...
@@ -31,5 +31,5 @@ func workstationVerifyVersion(version string) error {
}
log
.
Printf
(
"Detected VMware WS version: %s"
,
matches
[
1
])
return
compareVersions
(
matches
[
1
],
version
)
return
compareVersions
(
matches
[
1
],
version
,
"Workstation"
)
}
builder/vmware/common/driver_workstation_unix.go
View file @
a7aa20c8
...
...
@@ -75,5 +75,5 @@ func workstationVerifyVersion(version string) error {
}
log
.
Printf
(
"Detected VMware WS version: %s"
,
matches
[
1
])
return
compareVersions
(
matches
[
1
],
version
)
return
compareVersions
(
matches
[
1
],
version
,
"Workstation"
)
}
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