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
da3b0f54
Commit
da3b0f54
authored
Jun 29, 2013
by
Steven Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload the linux.iso to /tmp/linux.iso.
parent
d4aea92f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
builder/vmware/builder.go
builder/vmware/builder.go
+1
-0
builder/vmware/driver.go
builder/vmware/driver.go
+5
-0
builder/vmware/step_upload_tools.go
builder/vmware/step_upload_tools.go
+35
-0
No files found.
builder/vmware/builder.go
View file @
da3b0f54
...
...
@@ -222,6 +222,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&
stepRun
{},
&
stepTypeBootCommand
{},
&
stepWaitForSSH
{},
&
stepUploadTools
{},
&
stepProvision
{},
&
stepShutdown
{},
&
stepCleanFiles
{},
...
...
builder/vmware/driver.go
View file @
da3b0f54
...
...
@@ -121,6 +121,11 @@ func (d *Fusion5Driver) vmrunPath() string {
return
filepath
.
Join
(
d
.
AppPath
,
"Contents"
,
"Library"
,
"vmrun"
)
}
// @TODO: Be smarter about guest type before deciding on linux.iso.
func
(
d
*
Fusion5Driver
)
vmwareToolsIsoPath
()
string
{
return
filepath
.
Join
(
d
.
AppPath
,
"Contents"
,
"Library"
,
"isoimages"
,
"linux.iso"
)
}
func
(
d
*
Fusion5Driver
)
runAndLog
(
cmd
*
exec
.
Cmd
)
(
string
,
string
,
error
)
{
var
stdout
,
stderr
bytes
.
Buffer
...
...
builder/vmware/step_upload_tools.go
0 → 100644
View file @
da3b0f54
package
vmware
import
(
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"log"
)
a
{
type
stepUploadTools
struct
{}
func
(
*
stepUploadTools
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
comm
:=
state
[
"communicator"
]
.
(
packer
.
Communicator
)
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
driver
:=
state
[
"driver"
]
.
(
Driver
)
ui
.
Say
(
"Uploading the VMware Tools."
)
log
.
Println
(
"Uploading the VMware Tools."
)
f
,
err
:=
os
.
Open
(
driver
.
vmwareToolsIsoPath
())
if
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"Error opening VMware Tools ISO: %s"
,
err
)
return
multistep
.
ActionHalt
}
if
err
:=
comm
.
Upload
(
"/tmp/linux.iso"
,
f
);
err
!=
nil
{
state
[
"error"
]
=
fmt
.
Errorf
(
"Error uploading VMware Tools: %s"
,
err
)
return
multistep
.
ActionHalt
}
return
multistep
.
ActionContinue
}
func
(
*
stepUploadTools
)
Cleanup
(
map
[
string
]
interface
{})
{}
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