builder/vmware: proper port range for VNC

pull/15/head
Mitchell Hashimoto 13 years ago
parent 0596266776
commit 7a5dce0dc9

@ -46,7 +46,7 @@ func (stepConfigureVNC) Run(state map[string]interface{}) multistep.StepAction {
var vncPort uint
portRange := int(config.VNCPortMax - config.VNCPortMin)
for {
vncPort = uint(rand.Intn(portRange) + portRange)
vncPort = uint(rand.Intn(portRange)) + config.VNCPortMin
log.Printf("Trying port: %d", vncPort)
l, err := net.Listen("tcp", fmt.Sprintf(":%d", vncPort))
if err == nil {

Loading…
Cancel
Save