Difference between revisions of "Using VNC to connect to Virtual Machines"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
 
 
Line 4: Line 4:
 
   RemoteDisplay.vnc.password = "vncpassword"
 
   RemoteDisplay.vnc.password = "vncpassword"
 
   RemoteDisplay.vnc.port = "5900"
 
   RemoteDisplay.vnc.port = "5900"
Make sure to restart the virtual machine.
+
Note: The virtual machine must be stopped and then these lines can be add.  If you do not do this the lines will be erased upon reset of the virtual machine.
 +
 
 
==Using VNC with SSH to connect to guest VM==
 
==Using VNC with SSH to connect to guest VM==
 
Then ssh to the host machine using this command:
 
Then ssh to the host machine using this command:
 
   ssh -L 8080:localhost:5900 hostmachine.unh.edu
 
   ssh -L 8080:localhost:5900 hostmachine.unh.edu
 
Then use any vnc client to connect to localhost:8080 using the password set above.
 
Then use any vnc client to connect to localhost:8080 using the password set above.

Latest revision as of 17:33, 31 December 2010

Setting up VMs for VNC

First add these three lines to the bottom of the .vmx file for that virtual machine:

 RemoteDisplay.vnc.enabled = "TRUE"
 RemoteDisplay.vnc.password = "vncpassword"
 RemoteDisplay.vnc.port = "5900"

Note: The virtual machine must be stopped and then these lines can be add. If you do not do this the lines will be erased upon reset of the virtual machine.

Using VNC with SSH to connect to guest VM

Then ssh to the host machine using this command:

 ssh -L 8080:localhost:5900 hostmachine.unh.edu

Then use any vnc client to connect to localhost:8080 using the password set above.