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
c9d0de59
Commit
c9d0de59
authored
Jul 01, 2013
by
Steven Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a computed FullDiskPath config option.
parent
67df7b77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
builder/vmware/builder.go
builder/vmware/builder.go
+4
-0
builder/vmware/step_create_disk.go
builder/vmware/step_create_disk.go
+1
-2
No files found.
builder/vmware/builder.go
View file @
c9d0de59
...
...
@@ -52,6 +52,7 @@ type config struct {
PackerBuildName
string
`mapstructure:"packer_build_name"`
PackerDebug
bool
`mapstructure:"packer_debug"`
FullDiskPath
string
``
RawBootWait
string
`mapstructure:"boot_wait"`
RawShutdownTimeout
string
`mapstructure:"shutdown_timeout"`
...
...
@@ -114,6 +115,9 @@ func (b *Builder) Prepare(raws ...interface{}) error {
b
.
config
.
ToolsUploadPath
=
"{{ .Flavor }}.iso"
}
// Store the full path to the disk file.
b
.
config
.
FullDiskPath
=
filepath
.
Join
(
b
.
config
.
OutputDir
,
b
.
config
.
DiskName
+
".vmdk"
)
// Accumulate any errors
var
err
error
errs
:=
make
([]
error
,
0
)
...
...
builder/vmware/step_create_disk.go
View file @
c9d0de59
...
...
@@ -24,8 +24,7 @@ func (stepCreateDisk) Run(state map[string]interface{}) multistep.StepAction {
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
ui
.
Say
(
"Creating virtual machine disk"
)
output
:=
filepath
.
Join
(
config
.
OutputDir
,
config
.
DiskName
+
".vmdk"
)
if
err
:=
driver
.
CreateDisk
(
output
,
fmt
.
Sprintf
(
"%dM"
,
config
.
DiskSize
));
err
!=
nil
{
if
err
:=
driver
.
CreateDisk
(
config
.
FullDiskPath
,
fmt
.
Sprintf
(
"%dM"
,
config
.
DiskSize
));
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error creating disk: %s"
,
err
)
state
[
"error"
]
=
err
ui
.
Error
(
err
.
Error
())
...
...
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