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
6c44d721
Commit
6c44d721
authored
Oct 28, 2014
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1403 from notogawa/issue-1334
Fixes #1334, Add power on retry to ESXi Driver.
parents
e422a454
eacae832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
builder/vmware/iso/driver_esx5.go
builder/vmware/iso/driver_esx5.go
+15
-1
No files found.
builder/vmware/iso/driver_esx5.go
View file @
6c44d721
...
@@ -57,7 +57,21 @@ func (d *ESX5Driver) IsRunning(string) (bool, error) {
...
@@ -57,7 +57,21 @@ func (d *ESX5Driver) IsRunning(string) (bool, error) {
}
}
func
(
d
*
ESX5Driver
)
Start
(
vmxPathLocal
string
,
headless
bool
)
error
{
func
(
d
*
ESX5Driver
)
Start
(
vmxPathLocal
string
,
headless
bool
)
error
{
return
d
.
sh
(
"vim-cmd"
,
"vmsvc/power.on"
,
d
.
vmId
)
for
i
:=
0
;
i
<
20
;
i
++
{
err
:=
d
.
sh
(
"vim-cmd"
,
"vmsvc/power.on"
,
d
.
vmId
)
if
err
!=
nil
{
return
err
}
time
.
Sleep
((
time
.
Duration
(
i
)
*
time
.
Second
)
+
1
)
running
,
err
:=
d
.
IsRunning
(
vmxPathLocal
)
if
err
!=
nil
{
return
err
}
if
running
{
return
nil
}
}
return
errors
.
New
(
"Retry limit exceeded"
)
}
}
func
(
d
*
ESX5Driver
)
Stop
(
vmxPathLocal
string
)
error
{
func
(
d
*
ESX5Driver
)
Stop
(
vmxPathLocal
string
)
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