reset password

Using Virtual Machine (VM)

1. Information about VM

You should receive an email containing the following information:

(a) The address of the host (i.e. the server that runs the VM).

(b) A VNC port number and password.

VNC is a protocol similar to Remote Desktop Connection (a.k.a. RDP) on Windows -- it allows you to interact with the screen of a remote computer as if you are sitting in front of it. You'll need a VNC client to connect to the VM. There are many VNC client software you can choose from, like TightVNC and RealVNC, and Mac OS X users can use the built-in Screen Sharing program (so I've heard).

(c) A list of port mappings between the VM and the host, e.g. "22/4022 80/4080", which means port 22 and 80 on the VM are mapped to port 4022 and 4080 on the host, respectively.

The reason we need to have port mapping (a.k.a. port forwarding) is because a VM only has a private IP address therefore cannot be accessed directly from the outside world. The situation is, in fact, like a home network where you have a router and a number of devices (i.e. computers, smart phones and such) behind the router. In a typical home network, only the router has a "real" IP address assigned by your internet service provider, while your devices only have private IP addresses assigned by the router. In our case with VMs, the server plays the role of the router, and the VMs are the devices behind the router. In both cases, the devices can access the outside world using a mechanism called Network Address Translation (NAT), but in order for the outside world to connect to services running on the VMs, additional configuration of port mapping is needed.

For example, suppose you want to run a Tomcat server at port 8080 on your VM, and your VM has an IP address 192.168.0.100. Normally we can simply go to the URL http://192.168.0.100:8080 to access the Tomcat server, but because 192.168.0.100 is a private IP address, this won't work. Instead, we have to map a port on the host, say port 4088, to port 8080 on the VM -- what this means is that any data sent to port 4088 of the host will be automatically forwarded to port 8080 of the VM. In other words, to access the Tomcat running at port 8080 on the VM, a user needs to go to the URL http://<host>:4088 where <host> is the name or IP address of the host server.

Due to security concerns, there are additional restrictions on how VMs can be accessed over the network. In particular, you should be able to access your VM on campus over both wired and wireless network. If you are off-campus, you have to use VPN to connect to your VM.

Exactly what you can do with the VM depends on the type of the VM. The following sections will give more details on each type of VM.

2. Ubuntu Server

The current Ubuntu Server VM uses Ubuntu Server 16.04.4 LTS. The VM has two virtual CPUs, 2GB memory, and a 40GB disk. The following package options were selected during installation:

  • LAMP Server
  • Mail Server
  • PostgreSQL Database
  • Standard System Utilities
  • OpenSSH Server

And the server is configured to automatically receive and install security updates.

A user with sudo privilege was created -- the username and password of the user, as well as the password for the MySQL root user, should be included in the email sent to you. After you login in for the first time, please change the user's password using the "passwd" command. You may create additional accounts for your team members if necessary.

Ubuntu Sever does not have a GUI interface, so you'll need to get comfortable with using command line, especially the apt-get command for managing software package, and a console-based text editor like vi or nano for editing configuration files. You may find this guide on setting up an Ubuntu server helpful.

This page has been viewed 9106 times.