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
dbad9a40
Commit
dbad9a40
authored
Jun 29, 2013
by
Steven Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a method to get the VMware Tools ISO path.
parent
da3b0f54
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
builder/vmware/driver.go
builder/vmware/driver.go
+4
-1
builder/vmware/step_upload_tools.go
builder/vmware/step_upload_tools.go
+3
-3
No files found.
builder/vmware/driver.go
View file @
dbad9a40
...
@@ -24,6 +24,9 @@ type Driver interface {
...
@@ -24,6 +24,9 @@ type Driver interface {
// Stop stops a VM specified by the path to the VMX given.
// Stop stops a VM specified by the path to the VMX given.
Stop
(
string
)
error
Stop
(
string
)
error
// Get the path to the VMware ISO.
ToolsIsoPath
()
string
// Verify checks to make sure that this driver should function
// Verify checks to make sure that this driver should function
// properly. This should check that all the files it will use
// properly. This should check that all the files it will use
// appear to exist and so on. If everything is okay, this doesn't
// appear to exist and so on. If everything is okay, this doesn't
...
@@ -122,7 +125,7 @@ func (d *Fusion5Driver) vmrunPath() string {
...
@@ -122,7 +125,7 @@ func (d *Fusion5Driver) vmrunPath() string {
}
}
// @TODO: Be smarter about guest type before deciding on linux.iso.
// @TODO: Be smarter about guest type before deciding on linux.iso.
func
(
d
*
Fusion5Driver
)
vmware
ToolsIsoPath
()
string
{
func
(
d
*
Fusion5Driver
)
ToolsIsoPath
()
string
{
return
filepath
.
Join
(
d
.
AppPath
,
"Contents"
,
"Library"
,
"isoimages"
,
"linux.iso"
)
return
filepath
.
Join
(
d
.
AppPath
,
"Contents"
,
"Library"
,
"isoimages"
,
"linux.iso"
)
}
}
...
...
builder/vmware/step_upload_tools.go
View file @
dbad9a40
...
@@ -4,10 +4,10 @@ import (
...
@@ -4,10 +4,10 @@ import (
"github.com/mitchellh/multistep"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"github.com/mitchellh/packer/packer"
"log"
"log"
"os"
"fmt"
)
)
a
{
type
stepUploadTools
struct
{}
type
stepUploadTools
struct
{}
func
(
*
stepUploadTools
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
func
(
*
stepUploadTools
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
...
@@ -18,7 +18,7 @@ func (*stepUploadTools) Run(state map[string]interface{}) multistep.StepAction {
...
@@ -18,7 +18,7 @@ func (*stepUploadTools) Run(state map[string]interface{}) multistep.StepAction {
ui
.
Say
(
"Uploading the VMware Tools."
)
ui
.
Say
(
"Uploading the VMware Tools."
)
log
.
Println
(
"Uploading the VMware Tools."
)
log
.
Println
(
"Uploading the VMware Tools."
)
f
,
err
:=
os
.
Open
(
driver
.
vmware
ToolsIsoPath
())
f
,
err
:=
os
.
Open
(
driver
.
ToolsIsoPath
())
if
err
!=
nil
{
if
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"Error opening VMware Tools ISO: %s"
,
err
)
state
[
"error"
]
=
fmt
.
Errorf
(
"Error opening VMware Tools ISO: %s"
,
err
)
return
multistep
.
ActionHalt
return
multistep
.
ActionHalt
...
...
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