Skip to content

XmippDeveloperVMs

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

How to access testing VirtualBox Virtual Machines for Xmipp Developers

All the machines that are available for their download in this wiki, are built in einstein machine, so for Xmipp developer there are other options for connecting to them without needing to download and deploy the environment in the local computer. These options are explained here...

Option 1: Access using vnc server

Step 0: Entering einstein

To launch the VMs first you need to connect einstein from the lab using SSH.

Step 1: Creating a new display

The VNC server will serve you one display. That display is not the one that is being showed in the physical einstein's screen, so you wont interfere with any other work (but for your CPU consumption). If you don't have a previous opened display, you can create a new one with...


vncserver


This will give the following answer:


einstein ~ # vncserver 

New 'X' desktop is einstein:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/einstein:1.log


The sentence "New 'X' desktop is einstein..." is giving you the display number that has been generated for you. Display numbers will be consecutive (:1 :2 :3 :4 ...), and once a display is generated it will remain opened unless you kill it, so please, remember to kill a display when you don't need it anymore.

Step 2: Connecting to the display

Most of the people in the lab haveOpenSuSE or Ubuntu, so connection from both distros is explained here:

To connect the generated display from Ubuntu, you just need to execute from the command line...


vinagre


There you will need to select VNC as the connection method, and in the server URL insert einstein:1 (if generated display has been :1).

FromOpenSuSE the command to execute is....


vncviewer einstein:1


just in case that generated display has been :1.

Of course, you will be prompted to introduce a password. If you think it hard, you will realize that you already know it. If you can't remember, ask the administrator.

Step 3: Launching the selected VM.

To ease the launching process, shortcuts has been placed in the desktop. Just double-clicking them, the selected VM will start. Another way to launch the VM is using the applications -> system -> OracleVirtualBox option in the KDE main menu.

Step 4: Destroying the generated display.

Even if you close the VNC window and shutdown your computer, the generated display you created in Step 1 will remain active. That is not necessary a bad idea. If you want to stop working from your computer but continue later using the same windows and session state that you have, it's a good idea to just close the window and not destroy the display, but if you're not planning to continue working soon with that environment, please don't waste memory and CPU, and destroy your display. To do so, close your VNC viewer, and access again einstein using an ssh connection. From einstein command line execute...


vncserver -kill :1


Of course, that just in case your display is :1.

Additional notes

A VNC display can be accessed by multiple users at the same time, but only the first will have the power to control it, so if you want to share what you're doing in a virtual machine with any other person in the lab, just ask him to connect to the same display. He won't interfere with your session, but will be able to see what you're doing.

Option 2: Access using Remote Desktop Protocol

Step 0: Enabling the RDP server in the

VirtualBox can configure an RDP server for each VM, so you can directly connect to the VM without connecting first to einstein. For that purpose, first, someone has to launch the Virtual Machine in his display. If nobody is logged in and has launched the VM, follow the steps above to connect the VNC and launch in a VNC display the VirtualBox graphic manager. Then using the Settings configuration option of the desired VM, go to Display, and Remote Desktop tab. There you can configure the port where this machine will listen and Null as the authentication method.

Step 1: Connecting to the VM RDP server

Finally, you can close the vncviewer window and proceed with the rdp connection (you can enable de RDP server with the VM already launched, so don't reboot the machine). To do so, launch the following command from your computer:


rdesktop-vrdp einstein:3389


just in case you selected 3389 as the RDP port in the machine configuration.

Step 2: Disabling the VM RDP server

Don't forget to switch off the RDP server once you don't need the VM anymore. Of course, if you launched the VM from the VNC connection, and you don't need the VM anymore, you should also follow the above-described steps to shutdown the vnc server display. If you keep the vncserver where you launched the machine opened, your X session should stay intact, so you can continue your work later without changes.

Option 3: Access using SSH connection

You can also connect to the VirtualBox VM using a ssh -X connection.

Step 0: connecting to einstein via ssh -X

Connect to einstein using the command...


ssh -X user@einstein


where user has to be a user inside the vboxusers group in einstein. If your user is not in the vboxusers group, please ask the administrator to do it.

Step 1: launching the VM directly from the command line

If you know your VM name, you can directly launch it from the command line using the command:


VBoxManage startvm "Ubuntu 12.04"


just in case the VM name is Ubuntu 12.04.

Step 2: launching the VM from the VirtualBox manager

From the ssh session, execute


VirtualBox


Then, the VirtualBox manager will appear, and you will be able to launch your desired machine graphically

-- Main.IgnacioFoche - 2013-01-29

Clone this wiki locally