Skip to content

FAQs

How do I download the ScienceCloud RC file for command line clients and API authentication?

Instructions how to download and/or create an RC file for command line clients and/or API authentication can be found here.

Is it possible to download an image/snapshot from ScienceCloud in order to use it on a different cloud or on my local machine?

Yes, it is possible, but a specific command is needed: glance. The glance command line allows you to upload/download images directly to openstack, but it is not installed by default an all Linux distributions.

It is beyond the goal of this short how to explaining how to install and use glance, but roughly speaking you are supposed to:

  • create a new virtualenv with

    virtualenv ~/openstack
    
  • enable it

    source ~/openstack/bin/activate
    
  • install openstack client

    pip install python-openstackclient
    
  • load your Science Cloud credentials from the RC file (See ScienceCloud RC file)

    source your-openrc.sh
    
  • using the proper username, password and tenant, list the images on hobbes:

    openstack image list
    

    the output should be something like:

    +--------------------------------------+----------------------------------------------------+  
    | ID | Name   
    +--------------------------------------+----------------------------------------------------+  
    | c16ff297-8a8d-4152-8655-c1d8e0775460 | CentOS 7 - x86\_64 (2015-06-28)                    |  
    | 584561c3-fc4a-472c-a278-14cdd4d313e3 | cirros-0.3.3                                       |  
    | b102d4c2-f313-47c5-965f-7af4e46cbcba | Debian 8.1.0 - x86\_64 (2015-06-06)                |  
    | de2b8677-b320-4e97-9e5a-658e003b1b82 | Fedora 22 - x86\_64 (2015-05-21)                   |  
    | 2518cdc6-1f68-4d38-8187-1a92b226f4cb | Matlab-R2015a - ubuntu 14.04 x86-64 - (2015-08-17) |  
    | 4de74ce4-3644-4baa-8230-b8a8dc05885d | Ubuntu 12.04 - x86\_64 (2015-07-29)                |  
    | acebe825-e0d4-44ee-a1dc-a831561a2ea9 | ubuntu-server-14.04                                |  
    +--------------------------------------+----------------------------------------------------+
    

  • choose the image you want to download and run

    openstack image save --file /path/to/image.img IMAGE-ID

The image should now be found at /path/to/image.img.

How do I configure my VM to use CET/Zurich local time?

If issuing the "date" command the clock on your virtual machine seems to lag behind one or two hours (depending on daylight saving period) that mean that the timezone you are currently using is UTC.

If you are running Ubuntu or Debian you can change the setting and have all time information displayed in the CET/Zurich timezone by issuing:

sudo dpkg-reconfigure tzdata

a dialog window will then ask you to pick your preferred timezone.

If you are running Fedora or CentOS you should run

sudo ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime

You can check the outcome of the command issuing:

date

How do I convert an image to RAW before uploading it to ScienceCloud?

If you are using Linux, the following command will do it:

qemu-img convert -O raw <orig-image> <new-image>

Since a raw image is not compressed, uploading an image with 20GB of virtual size will actually transfer 20GB of data to ScienceCloud. As a consequence, we strongly advice you to create images with very small virtual disks. As usual, the disk will be resized automatically when an instance is started from that image.

How do I upload an image to ScienceCloud?

  • Convert the image to RAW format (see previous FAQ)
  • Load your Science Cloud credentials from the RC file (See ScienceCloud RC file)
  • Run the following openstack command

    openstack image create --disk-format raw --container-format bare --private --file /path/to/image.img your-new-image
    
  • Sit back and have a cup of coffee.

Why can't I upload an image from the Web Interface using remote location as the Image Source?

Upload from location doesn't work because we are using newer API for the Glance service, which doesn't allow automatic download of images.

You need to download the image on your local computer and upload it using the "Image file" as Image Source.

Why I can no longer use SSH to connect to my running instances?

"I am using putty to get to my VM. I had no problems with it yesterday. Now, I am getting an error message: Connection time out. Any explanation?"

If your instance has an IP address in uzh-only network, you have to use the UZH VPN to access it.

Why the record in "Attached To" of my volume does not match the /dev/vd{x} inside the image?

A mismatch between what is reported in the "Attached To" field on the ScienceCloud GUI and how the disk is seen inside the instance may occur. This may happen if the following sequence of operations have been performed:

  • a volume has been created
  • it has been then attached to an instance followed by a file system creation & mount
  • the volume has been detached without being unmounted
  • another volume has been attached.

In order to have the consistency back between the "Attached To" filed and the disk inside the instance a reboot has to be performed.

Why is my snapshot so large?

If you think of a snapshot as an USB stick, the size of the snapshot is the size of the USB stick, and not of the data actually contained in it.

A snapshot is created by copying the virtual disk used as root disk of an instance, therefore its size is always equal to the size of the root disk of the flavor used. In ScienceCloud, all flavors have a root disk of 100GB, therefore all snapshots will have a size of 100GB.

Images, instead, are usually much smaller because are created using smaller virtual disks (moreover, they are usually not created as snapshot within OpenStack).

Why does the snapshot I took have size "0" ? Is it normal?

Yes, if you took a snapshot of a VM started from a volume: in this case your actual snapshot will be visible in the "Volumes" menu under "Volume Snapshots", and a placeholder of size "0" will be created in the "Images" list containing the necessary metadata to allow you to start a new VM from the snapshot. When you start a VM from this snapshot a new volume will be created from the "volume snapshot", and the new VM will use it as root disk.

If the volume is big or simply quite full the volume creation can take more time than a VM creation process is allowed to use, and thus the process will fail.

As a workaround a Volume can be manually created from the chosen "Volume Snapshot" and once the process has successfully ended a new VM can be started from the newly created Volume.

What is the difference between a "soft" and a "hard" reboot for an instance?

You can perform a "soft" or "hard" reboot of a running instance. A "soft" reboot attempts a graceful shut down and restart of the instance. A "hard" reboot power cycles the instance.

A "soft" reboot is the equivalent of running "ctrl+alt+del" on a physical machine or issuing the "shutdown -r now" command. It sends a signal that the operating system interprets as a request to cleanly reboot. As a consequence, if the operating system is stuck for some reason a "soft" reboot might not work.

An "hard" reboot is the equivalent of switching the power off and on again. This might have nasty consequences: for instance, it can cause a corruption of the filesystem, and as such it should be used as a last resort if a "soft" reboot does not work.

More information could be found at Openstack documentation: Reboot an Instance page.

How can I prevent my instance from being accidentally deleted?

A way to prevent this is by "locking" your instance. In order to do so you have to use the drop down menu on the right side of the information menu for your instance in the OpenStack GUI and select "Lock Instance".

Important note: A lock on an instance will prevent you from doing a series of other actions as well (e.g., reboot, attach a volume, resize, etc.).

How can I share my snapshot/image with other projects?

If you want to share your snapshot/image with only a given project(s), you need to use the OpenStack CLI (command line interface).

How do I connect to a running instance from my Windows system?

If you're using  a Windows-based system to control and connect to ScienceCloud and its instances, you need to use tools like Putty and Puttygen to connect to a running Linux-based instance. Another option is the Windows Subsystem for Linux (WSL). Instructions on how to import a keypair and how to connect to a running instance could be found here.

How do I transfer files to my running instances from my Windows system?

Copying files to your OpenStack instance on Windows

I resized my instance and now I get a message stating "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!". What do I do / Is this a problem?

It is a perfectly normal behaviour: when an instance gets resized the cloud_init script regenerates the host keys, and when you connect to the host after the resizing your client expects them to be the same as before. To fix the problem take a close look at the warning message:

host:~ user$ ssh <IP_ADDRESS> -l ubuntu
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
ae:af:10:63:64:17:41:68:98:a1:a5:22:7f:49:fa:6f.
Please contact your system administrator.
Add correct host key in <PATH_TO_YOUR_HOME_DIR>/ .ssh/known_hosts to get rid of this message.
Offending RSA key in _ <PATH_TO_YOUR_HOME_DIR>/_.ssh/known_hosts:2
RSA host key for <IP_ADDRESS> has changed and you have requested strict checking.
Host key verification failed.

You can either delete the offending line from the known_hosts file or run:

ssh-keygen -R <IP_ADDRESS>

which will remove the host key corresponding to the instance IP address from your known_host file.

Once you reconnect to your instance you will be prompted to accept a new host key and upon doing that no warning message should display.

I resized/rebooted my instance but now I cannot find the files stored on attached volume — what should I do?

You can modify the amount of used resources (vCPU, RAM) of an instance by simply assigning a different flavor to it. The resize operation needs to reboot your instance and if you haven't setup an automount of the volume, you will not able to access the files stored in the attached volume until you mount it manually.

In order to setup the automatic volume mount at boot, you can follow the instructions on How to automatically mount a volume at instance startup.

What happens if I try to resize my instance to a temporarily unavailable flavor ?

The procedure will stop in its early steps displaying an error message. The running VM will be unaffected by the resize attempt.

How do I enable GUI forwarding on MacOS?

Running programs on ScienceCloud that use a GUI requires XQuartz to be installed when connecting from a MacOS based personal computer. Once installed, you can enable GUI forwarding with the -XY option. I.e., when connecting via SSH from the command line terminal on your personal computer, you would use ssh -XY <username>@<ScienceCloud_IP_Address>.

How do I connect to an SMB network attached storage device (NAS) from a ScienceCloud instance?

Follow these steps to mount an SMB based NAS on a ScienceCloud instance.

  1. Install cifs-utils.
    • On Ubuntu and Debian run:
      sudo apt install cifs-utils
      
    • On CentOS run:
      sudo yum install cifs-utils
      
  2. Make a directory (named smbdir in this example) into which you will mount the share:
    sudo mkdir /mnt/smbdir
    
  3. Mount the share to the instance with read/write permissions using:

    sudo mount -t cifs -o rw,user=<uzh_username>,uid=<instance_username> //<nas_address> /mnt/smbdir
    

    • <uzh_username> is the UZH shortname that has been granted access to the share
    • <instance_username> is the username specific to the instance (e.g., ubuntu on an Ubuntu instance)
    • <nas_address> is the address to the share

    Note

    If inputted correctly, you will be prompted for the password that corresponds to the inputted UZH username, and the share will then be accessible in the specified directory once the correct password is provided.

  4. To unmount the share use:

    sudo umount /mnt/smbdir
    

Why is my docker-compose starting so slowly?

Sometimes the entropy value on the base operating system can be too low. This setting can cause docker-compose to hang for a few minutes. You can check this value by running: cat /proc/sys/kernel/random/entropy_avail

If the value is less than 1000, then this is potentially the issue. To help solve the problem, consider installing the haveged package using:

sudo apt update
sudo apt install haveged

Then reboot your VM in the ScienceCloud dashboard using the "Soft Reboot Instance" option (which is located via the dropdown arrow next to the "Create Snapshot" button). Thanks to Raphael Walker for this tip.

Why do I receive the error "no valid host was found"?

This error occurs when a user attempts to launch a new VM using a hardware flavor that is currently unavailable in the ScienceCloud. You can find a near-real-time list of available flavors here. To bypass the error, simply select another flavor that is reported as available.


Last update: March 21, 2022