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
52fb77a8
Commit
52fb77a8
authored
Nov 07, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/vmware: case-insensitive VMX creation [GH-608]
parent
d138e6a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
CHANGELOG.md
CHANGELOG.md
+4
-0
builder/vmware/ssh.go
builder/vmware/ssh.go
+1
-1
builder/vmware/step_clean_vmx.go
builder/vmware/step_clean_vmx.go
+1
-1
builder/vmware/step_create_vmx.go
builder/vmware/step_create_vmx.go
+5
-3
builder/vmware/vmx.go
builder/vmware/vmx.go
+2
-1
No files found.
CHANGELOG.md
View file @
52fb77a8
...
...
@@ -12,6 +12,10 @@ IMPROVEMENTS:
*
builder/amazon/all: Can now specify a list of multiple security group
IDs to apply. [GH-499]
BUG FIXES:
*
builder/vmware: VMX modifications are now case-insensitive. [GH-608]
## 0.3.11 (November 4, 2013)
FEATURES:
...
...
builder/vmware/ssh.go
View file @
52fb77a8
...
...
@@ -33,7 +33,7 @@ func sshAddress(state multistep.StateBag) (string, error) {
var
ok
bool
macAddress
:=
""
if
macAddress
,
ok
=
vmxData
[
"ethernet0.address"
];
!
ok
||
macAddress
==
""
{
if
macAddress
,
ok
=
vmxData
[
"ethernet0.generated
A
ddress"
];
!
ok
||
macAddress
==
""
{
if
macAddress
,
ok
=
vmxData
[
"ethernet0.generated
a
ddress"
];
!
ok
||
macAddress
==
""
{
return
""
,
errors
.
New
(
"couldn't find MAC address in VMX"
)
}
}
...
...
builder/vmware/step_clean_vmx.go
View file @
52fb77a8
...
...
@@ -60,7 +60,7 @@ func (s stepCleanVMX) Run(state multistep.StateBag) multistep.StepAction {
if
filename
==
isoPath
{
// Change the CD-ROM device back to auto-detect to eject
vmxData
[
filenameKey
]
=
"auto detect"
vmxData
[
match
+
".device
T
ype"
]
=
"cdrom-raw"
vmxData
[
match
+
".device
t
ype"
]
=
"cdrom-raw"
}
}
}
...
...
builder/vmware/step_create_vmx.go
View file @
52fb77a8
...
...
@@ -8,6 +8,7 @@ import (
"log"
"os"
"path/filepath"
"strings"
)
type
vmxTemplateData
struct
{
...
...
@@ -79,6 +80,7 @@ func (s *stepCreateVMX) Run(state multistep.StateBag) multistep.StepAction {
log
.
Println
(
"Setting custom VMX data..."
)
for
k
,
v
:=
range
config
.
VMXData
{
log
.
Printf
(
"Setting VMX: '%s' = '%s'"
,
k
,
v
)
k
=
strings
.
ToLower
(
k
)
vmxData
[
k
]
=
v
}
}
...
...
@@ -86,12 +88,12 @@ func (s *stepCreateVMX) Run(state multistep.StateBag) multistep.StepAction {
if
floppyPathRaw
,
ok
:=
state
.
GetOk
(
"floppy_path"
);
ok
{
log
.
Println
(
"Floppy path present, setting in VMX"
)
vmxData
[
"floppy0.present"
]
=
"TRUE"
vmxData
[
"floppy0.file
T
ype"
]
=
"file"
vmxData
[
"floppy0.file
N
ame"
]
=
floppyPathRaw
.
(
string
)
vmxData
[
"floppy0.file
t
ype"
]
=
"file"
vmxData
[
"floppy0.file
n
ame"
]
=
floppyPathRaw
.
(
string
)
}
// Set this so that no dialogs ever appear from Packer.
vmxData
[
"msg.auto
A
nswer"
]
=
"true"
vmxData
[
"msg.auto
a
nswer"
]
=
"true"
vmxDir
:=
config
.
OutputDir
if
config
.
RemoteType
!=
""
{
...
...
builder/vmware/vmx.go
View file @
52fb77a8
...
...
@@ -24,7 +24,8 @@ func ParseVMX(contents string) map[string]string {
continue
}
results
[
matches
[
1
]]
=
matches
[
2
]
key
:=
strings
.
ToLower
(
matches
[
1
])
results
[
key
]
=
matches
[
2
]
}
return
results
...
...
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