Skip to content

Setting up virtual machines on the CSC Pouta service

Document Installing virtual machines on CSC Pouta service
Author: Noora Kuikka
Version: 0.3
Date: 24.01.2024

NOTE: IMAGES TO BE ADDED SOON!

Introduction

This is a step-by-step guide instructing users on how to setup and launch virtual machines on the cPouta service, which can be accessed by setting up a project on the CSC server environment.

Setup

  1. Choose an administrator to set up a project on the myCSC website and apply for resources to allocate.

  2. Use your CSC or HAKA account credentials to login to cPouta services at https://pouta.csc.fi.

  3. Choose your project from the top-left drop down menu (if only one project exists, it will be chosen by default).

  4. Before launching the virtual machine, you will need to set up SSH key pairs. This can be done by going to the "Compute" > "Key Pairs" section and using the tool "Create Key Pair".

Name the key, and save it to your home directory.

Depending on your operating system, you can use the following commands to create the necessary .ssh folder and set a password:

Windows Powershell

mkdir ~/.ssh
mv yourkey.pem ~/.ssh/
ssh-keygen.exe -p -f keyname.pem

Linux & Mac

mkdir -p ~/.ssh
chmod 700 .ssh
mv keyname.pem ~/.ssh
chmod 400 ~/.ssh/keyname.pem
Note: On Mac operating systems the key will be named "keyname.cer"

  1. Under the Network > Security Groups menu, click "Manage Rules", then "Add Rule".

From the list, choose "SSH" and click add.

This will allow for inbound connections on port 22 (SSH) under the default rules heading.

For custom rules, you should create a new security group <to be edited>.

  1. To create a new virtual machine, go to to Compute > Images. Choose your preferred image and click "Launch". Name your instance, and under the "Flavor" heading, choose how much in resources to allocate.

Check the "Key Pair" heading to ensure that the public key you created is correctly allocated.

Finally click "Launch Instance" in the bottom right corner to create the new virtual machine.

The created instance can be found under Compute > Instances in the left menu.

  1. The new instance needs to be assigned a floating IP address, this can be done by going into the "Actions" menu and choosing "Allocate Floating IP".

Create a new IP address by clicking the "+" button, and give it a unique description in the following menu. Afterwards, click "Associate".

  1. You should now be able to connect to your virtual machine using SSH from the terminal.

Use the floating (public) IP address you created earlier and the user credentials "cloud-user" to connect from the terminal, e.g:

ssh cloud-user@<public-ip>

In case the above method does not work, try the below steps using the PuTTYGen tool to generate the SSH keys instead.

Alternative steps for generating the SSH key pair

Alternatively you can use the GUI tool PuTTYGen for generating the key pair. Download the tool from: https://www.puttygen.com/download.php?val=49

In the PuTTY key generator, go to "Key -> Parameters for saving key files..."

Change the PPK file version from 3 to 2, and click "OK" to generate a public/private key pair.

Manually copy the generated public key to your clipboard and add a passphrase (optional, but recommended).

Save the private key in a secure location.

In the cPouta web service, under the Key Pairs menu, click "Import Public Key".

Paste the public key from your clipboard to the "Public Key" box and name it before clicking "Import Public Key".

Alternative method for connecting via SSH

Use the PuTTY GUI tool. Under SSH > Auth choose the private key you saved earlier. In the "Session" menu, write the floating IP address you created earlier under the "Host Name" heading.

Choose a name for your session under "Saved Sessions" and open the connection by clicking "Open" at the bottom of the screen.

You should now see the login screen in the virtual machine terminal.

Troubleshooting

  • If encountering issues when attempting to connect via SSH, it is highly recommended to use the alternative methods.
  • Double-check the security group and firewall settings, use the default option for testing.
  • Ensure the virtual machine is labelled as "Running" under the Instances menu.
  • Make sure that a floating IP address has been correctly assigned to the machine.

Sources

https://docs.csc.fi/cloud/pouta/connecting-to-vm/

https://zzpp0920.pages.labranet.jamk.fi/ff-it-guides/csc-cpouta-guide/

https://docs.csc.fi/cloud/pouta/connecting-to-vm/

https://docs.csc.fi/cloud/pouta/launch-vm-from-web-gui/#server-groups

https://docs.csc.fi/cloud/pouta/security/