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
068e94c3
Commit
068e94c3
authored
Jun 07, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/vmware: Don't step VNC stuff in createVMX
parent
d55bf3f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
builder/vmware/step_create_vmx.go
builder/vmware/step_create_vmx.go
+3
-11
No files found.
builder/vmware/step_create_vmx.go
View file @
068e94c3
...
@@ -14,7 +14,6 @@ type vmxTemplateData struct {
...
@@ -14,7 +14,6 @@ type vmxTemplateData struct {
GuestOS
string
GuestOS
string
DiskName
string
DiskName
string
ISOPath
string
ISOPath
string
VNCPort
uint
}
}
// This step creates the VMX file for the VM.
// This step creates the VMX file for the VM.
...
@@ -25,35 +24,30 @@ type vmxTemplateData struct {
...
@@ -25,35 +24,30 @@ type vmxTemplateData struct {
//
//
// Produces:
// Produces:
// vmx_path string - The path to the VMX file.
// vmx_path string - The path to the VMX file.
// vnc_port uint - The port the VM is configured to listen on for VNC.
type
stepCreateVMX
struct
{}
type
stepCreateVMX
struct
{}
func
(
stepCreateVMX
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
func
(
stepCreateVMX
)
Run
(
state
map
[
string
]
interface
{})
multistep
.
StepAction
{
config
:=
state
[
"config"
]
.
(
*
config
)
config
:=
state
[
"config"
]
.
(
*
config
)
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
vmx
_p
ath
:=
filepath
.
Join
(
config
.
OutputDir
,
config
.
VMName
+
".vmx"
)
vmx
P
ath
:=
filepath
.
Join
(
config
.
OutputDir
,
config
.
VMName
+
".vmx"
)
f
,
err
:=
os
.
Create
(
vmx
_p
ath
)
f
,
err
:=
os
.
Create
(
vmx
P
ath
)
if
err
!=
nil
{
if
err
!=
nil
{
ui
.
Error
(
fmt
.
Sprintf
(
"Error creating VMX: %s"
,
err
))
ui
.
Error
(
fmt
.
Sprintf
(
"Error creating VMX: %s"
,
err
))
return
multistep
.
ActionHalt
return
multistep
.
ActionHalt
}
}
var
vncPort
uint
=
5900
tplData
:=
&
vmxTemplateData
{
tplData
:=
&
vmxTemplateData
{
config
.
VMName
,
config
.
VMName
,
"ubuntu-64"
,
"ubuntu-64"
,
config
.
DiskName
,
config
.
DiskName
,
config
.
ISOUrl
,
config
.
ISOUrl
,
vncPort
,
}
}
t
:=
template
.
Must
(
template
.
New
(
"vmx"
)
.
Parse
(
DefaultVMXTemplate
))
t
:=
template
.
Must
(
template
.
New
(
"vmx"
)
.
Parse
(
DefaultVMXTemplate
))
t
.
Execute
(
f
,
tplData
)
t
.
Execute
(
f
,
tplData
)
state
[
"vmx_path"
]
=
vmx_path
state
[
"vmx_path"
]
=
vmxPath
state
[
"vnc_port"
]
=
vncPort
return
multistep
.
ActionContinue
return
multistep
.
ActionContinue
}
}
...
@@ -120,8 +114,6 @@ powerType.suspend = "soft"
...
@@ -120,8 +114,6 @@ powerType.suspend = "soft"
proxyApps.publishToHost = "FALSE"
proxyApps.publishToHost = "FALSE"
replay.filename = ""
replay.filename = ""
replay.supported = "FALSE"
replay.supported = "FALSE"
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "{{ .VNCPort }}"
scsi0.pciSlotNumber = "16"
scsi0.pciSlotNumber = "16"
scsi0.present = "TRUE"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
scsi0.virtualDev = "lsilogic"
...
...
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