Getting started with CREODIAS: Advanced tasks and tips related to Virtual Machines
Unlike previous articles of our “Getting started” mini guides, this one is dedicated to various tasks and useful hints related to virtual machines management and maintenance.
SSH access and keys
When using Linux machines, the management of SSH keys is a crucial task in terms of security.
A simple typical example is when a virtual machine has to be accessed by several users. Sharing SSH public key is bad practice. Each user should access the shared VM with their own key. In this way, if necessary, it is possible to easily lock access for this user. Moreover, using Linux "last" command the user can get logins history with source IP addresses.
When working SSH access, you can just paste public key for selected person into a new line to file "~/.ssh/authorized_keys", but it is not always available. In such case, please follow this instruction: How to add SSH key from Horizon web console on CREODIAS
To generate SSH keypair we recommend two procedures described in these manuals:
- How to create key pair in OpenStack Dashboard on CREODIAS
- Generating an SSH keypair in Linux on CREODIAS
Please select which better fits your preferences and workflow.
Not very common but possible case is when you create a new VM without adding keypair to this instance, or you delete all keys when editing "~/.ssh/authorized_keys" file. This way a new or the existing machine is inaccessible.
You can find general guidelines on what to do in such case in this document:
What if I Forgot to Add the SSH Key to my VM - or Deleted it?
Using own virtual machine images
CREODIAS contains a collection of operating systems images that should cover most use cases. However, you may upload your favorite Linux distribution, or more probably, use ready image with all software, requirements and dependencies installed and tested.
You can upload your image:
- using GUI How to upload custom image to CREODIAS cloud using OpenStack Horizon dashboard
- with a command line interface How to upload your custom image using OpenStack CLI on CREODIAS
Using snapshots
The easiest way to multiply ready configuration and resources is to duplicate VM instance using snapshots.
You will find core information in the following documents:
Images created with the above procedure may also be used for migration.
OpenStack instance migration using command line on CREODIAS
Limit cost of temporary unused virtual machines
Not all virtual machines created are needed all the time and keeping them available but unused consume our credits when we are in the "Pay Per Use" model. To avoid this and release some resources, you can shelve instances.
Please note that as for shelved instances, you pay for the image storage only.
Author: Mateusz Ślaski, Sales Support Engineer, CloudFerro