Commit 875951a8 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/vmware: Enable VNC

parent dca27957
...@@ -14,6 +14,7 @@ type vmxTemplateData struct { ...@@ -14,6 +14,7 @@ type vmxTemplateData struct {
GuestOS string GuestOS string
DiskName string DiskName string
ISOPath string ISOPath string
VNCPort uint
} }
type stepCreateVMX struct{} type stepCreateVMX struct{}
...@@ -29,16 +30,21 @@ func (stepCreateVMX) Run(state map[string]interface{}) multistep.StepAction { ...@@ -29,16 +30,21 @@ func (stepCreateVMX) Run(state map[string]interface{}) multistep.StepAction {
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["vnc_port"] = vncPort
return multistep.ActionContinue return multistep.ActionContinue
} }
...@@ -104,6 +110,8 @@ powerType.suspend = "soft" ...@@ -104,6 +110,8 @@ 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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment