Quick Start Guide on VM

Terminology

A virtual machine, or VM, is a software program that exhibits the behavior of a separate computer and is capable of running applications and programs within its own environment.

A running virtual machine in OpenStack terminology is called an instance, because it runs within another computing environment – usually known as the host. In an OpenStack project the host will typically be a Nova compute node.

Multiple virtual machines can exist within a single host at one time.

Start a Virtual Machine

  1. Login to the dashboard.

  2. Select the appropriate project from the drop down menu at the top left.

  3. On the Project tab, open the Compute tab and click the Instances category.

  4. Click Launch Instance. In the Launch Instance dialog box, specify the following values:

    • Details tab

      • Instance Name

        Assign a name to the virtual machine.

      • Availability Zone

        Select nova.

      • Count

        Set the number of instances: default is 1.

    • Source tab

      • Select Boot Source

        Choose image, and select an image from the Available list.

    • Flavor tab

      Specify the size of the instance to launch.

    • Networks tab

      • Selected Networks

        To add a network to the instance, click the + in the Available field. Select default, which is a network connected to a router on the external network and allows assinging floating IPs to the VM.

        Warning

        the network default is shared among all projects, hence all the VMs on this network will see each other and receive broadcast packets.

        Do NOT select the network called floating-ip as VMs on this network cannot be attached to external networks.

    • Network Ports tab

      You may skip this.

    • Security Groups tab

      Security groups are a kind of cloud firewall that define which incoming network traffic is forwarded to instances. You may just keep the default security group.

    • Key Pair tab

      Warning

      You will need a Key Pair to be able to access the instance.

      Do either Create Key Pair or ‘Import Key Pair` and then select it or an Available one from the list.

  5. Click Launch Instance at the bottom right, to start the instance.

For more details see steps to create a Virtual Machine in your project.

Access Linux Virtual Machines

Use the following steps when you want to access a running linux virtual machine.

Assign a public IP address to the instance by selecting Associate Floating IP from the Actions menu next to the instance in the Instances tab of the dashboard. Choose any one of the suggested addresses.

To log on to a virtual machine, use the ssh command on your host machine, using the keypair you selected when creating the instance.

Warning

Ensure the keypair file has the proper access rights:

$ chmod 400 MyKey.pem

Invoke ssh specifying the keypair and the IP address of the instance; for example:

$ ssh -i MyKey.pem ubuntu@10.0.0.2

Last login: Tue Jan 12 11:20:28 2016
$

Note

the username (ubuntu in the example) will depend on the name of the image, so for the image named Centos 7 x86_64, the username would be centos, for the image Cirros x86_64 0.3.4, the username will be cirros.

From this point onward, this terminal window is connected to the virtual machine until you exit the virtual machine. All commands go to the VM, not to your computer.

When you first access the VM you will be logged in as user ubuntu. If you need to run commands as administrator, with root privileges, use sudo <command>.

Use the exit command to quit the ssh session.

At this point, the VMs are still running in the background. You can re-issue the ssh command later, to reconnect, or you can stop the virtual machines.

Access Windows Virtual Machines

For accessing virtual machine running Microsoft Windows, you can log into the machine using a Remote Desktop client.

Windows and Mac Versions

The operation of Remote Desktop, as desribed below, is similar across all clients.

On a Mac, download and install the Remote Desktop Connection Client for Mac. The steps to connect to your server are very similar. You can download the software here.

Here you can find more information on configuring and running Remote Desktop Connection for MacOS.

Run the Remote Desktop Connection Client

  1. Open the Remote Desktop Connection Client:
    1. on Windows by clicking Start > All Programs > Accessories > Communications > Remote Desktop Connection.
    2. on MacOS, ensure you have version 8 or later of the Microsoft Remote Desktop app, or download it from here. Start Remote Desktop Connection.
  2. Enter the IP address of the server in the Computer field and click Connect.
  3. (Optional) To set up file transfer or enable your clipboard for copy/paste, click Options. Click the Local Resources tab, select the Clipboard option, click More, and then click Drives.
  4. Save your session by clicking the General tab, then clicking Save As.

Log in to Your Server

Once you have connected, you will see the Windows log in screen. To log in for the first time, enter as User name: Administrator, and leave other fields blank. You will be asked to supply a new password before being able to login.

Track usage for instances

You can track usage for instances for each project. You can track costs per month by showing meters like number of vCPUs, disks, RAM, and uptime for all your instances.

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click Overview category.
  4. To query the instance usage for a month, select a month and click Submit.
  5. To download a summary, click Download CSV Summary.

Create an instance snapshot

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click the Instances category.
  4. Select the instance from which to create a snapshot.
  5. In the actions column, click Create Snapshot.
  6. In the Create Snapshot dialog box, enter a name for the snapshot, and click Create Snapshot.
  7. The Images category shows the instance snapshot.

To launch an instance from the snapshot, select the snapshot and click Launch. Proceed with launching an instance.

Manage an instance

  1. Log in to the dashboard.
  2. Select the appropriate project from the drop down menu at the top left.
  3. On the Project tab, open the Compute tab and click Instances category.
  4. Select an instance.
  5. In the menu list in the actions column, select the state.

You can rebuild an instance. You can also choose to view the instance console log, edit instance or the security groups. Depending on the current state of the instance, you can pause, resume, suspend, soft or hard reboot, or terminate it. Instance resizing is currently not possible.