0

I am performing a remote headless build on a Ubuntu 16.04.05 server using packer.

When the build starts, I get the informative message

vmware-iso: The VM will be run headless, without a GUI. If you want to
vmware-iso: view the screen of the VM, connect via VNC with the password "somepass" to
vmware-iso: vnc://127.0.0.1:5914

However when trying using a vncviewer to access this remotely by accessing :5914 I get a connection refused error;

What is more,

$ nc -zv <my_host_name> 5914
nc: connect to <my_host_name> port 5914 (tcp) failed: Connection refused

Any suggestions?

edit: It seems that VMWare is somehow configured so that its VNCServer (?) listens only on localhost:

pkaramol@<my_host_name> :~/.vmware$ sudo ss -l | grep 5904
tcp    LISTEN     0      5      127.0.0.1:5904                  *:*   
0

If SSH is available on your host, you can try using VNC with a secure tunnel to your client:

<client> $ sudo ssh -C -L 9999:localhost:5904 pkaramol@<my_host_name_or_ip>
<client> $ vncviewer localhost::9999

Depending on your setup, you may not need sudo or the the -C (compression) option. Also you can replace 9999 by a port you like.

PS: Sorry, but without right to comment I was not able to clarify.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.