Cloud
Administrating Virtual System
Virtual Machine
Once you have created your VM, you can administrate it.
- To connect the VM as root:
$ stratus-connect-instance id
- To install packages (example with a VM running Scientific Linux):
root@vm $ yum install gcc-gfortran make gnuplot
- To create Smith user (only key pair is allowed for connexion):
root@vm $ useradd smith root@vm $ su smith smith@vm $ cd smith@vm $ mkdir .ssh smith@vm $ touch ~/.ssh/authorized_keys smith@vm $ chmod 600 ~/.ssh/authorized_keys
Put the ~/.ssh/id_rsa.pub
of Smith (local) in ~/.ssh/authorized_keys
(VM).
- To connect as Smith:
$ ssh -i ~/.ssh/id_rsa smith@ip
If error appends (Permission denied (publickey).
), clean the local known_hosts
file:
local $ vi ~/.ssh/known_hosts
onevm-XX.lal.in2p3.fr ssh-rsa ...
- To transfert files (from MV to local):
$ scp -i ~/.ssh/id_rsa smith@ip:Rep/*.txt .
Virtual Cluster
- To create a Virtual Cluster, you need to run a specific disk image including NFS and ip6tables.
- To use the OpenMPI MPI library, you need to export binaries and libraries in your VM shell:
PATH=/usr/lib64/openmpi/bin LD_LIBRARY_PATH=/usr/lib64/openmpi/lib
- To take back the user's key pair:
$ scp root@ip:/home/smith/.ssh/id_rsa* .
- To obtain informations on the cluster nodes:
root@vm $ cat /etc/hosts # Cluster nodes 134.158.75.1 vm-1.lal.stratuslab.eu master 134.158.75.2 vm-2.lal.stratuslab.eu worker-0 134.158.75.3 vm-3.lal.stratuslab.eu worker-1 134.158.75.4 vm-4.lal.stratuslab.eu worker-2 root@vm $ cat .shosts vm-1.lal.stratuslab.eu root vm-2.lal.stratuslab.eu root vm-3.lal.stratuslab.eu root vm-4.lal.stratuslab.eu root
- To obtain informations on the MPI configuration file:
root@vm $ cat /tmp/machinefile 134.158.75.1 slots=1 134.158.75.2 slots=1 134.158.75.3 slots=1 134.158.75.4 slots=1