Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document guides the cloud users how to create a basic Virtual Machine (VM) instance, configure remote access, and attach external datastore.

Table of Contents
stylesquare
printablefalse

Step 1. Log in to Cloud Dashboard & External Datastore

  • (Fig. 1-1) Log in to Cloud Dashboard with the provided account information
  • (Fig. 1-2) Also confirm the same account information works for External Datastore

Fig. 1-1 Cloud Dashboard : https://cloud.kasi.re.kr

Fig. 1-2 External Datastore (1TB per user) : https://210.219.33.249


Info

User passwords do NOT synchronize automatically between the two systems, i.e., you should manage the password for each system manually.


Step 2. Import Public Key or Create a Key Pair 

  • (Fig. 2-1) Go to Project ComputeKey Pairs of Cloud Dashboard main menu.
  • Import menu, and check if your your keys are registered. You can import the SSH public key (used when you sign up) or create another key pair from the menu.

...

Image Removed

  • which you pasted to the account sign-up form) or Create another key pair.
  • It is recommended to set the Key Pair Name identical to your Cloud username.

Fig. 2-1 Key Pairs

Image Added

Step 3. Create a VM instance

  • (Fig. 3-A) Go to Project Cluster InfraKASI Cluster Templates menu.

  • (Fig. 3-B) Find KASI-SingleVM template (Step A), and click Lauch Cluster Stack button of KASI-SingleVM template (Step B). Choose . Choose Next to go to Lauch Launch Cluster menu.

  • (Step Fig. 3-C) Put a Stack Name and the Password for user. Select an OS Image (e.g., ubuntu-20.04-cloudimg), Flavor (e.g., C2M2D20 = 2 CPUs, 2 GB RAM, 20 GB OS storagedrive), Network (default: kasi-user-network, default), and SSH Keys.
  • Put a Temporary one-time password for root account

    (Note: this

    , and click Launch button.

    Info

    WARNING: The intial password may be

    seen by other users, and must be changed at first-time console log-in), and click Launch button.

...

Step A

Image Removed

...

Step B

Image Removed

...

Step C

Image Removed

  • exposed to other users. You MUST change the password to a secure one right after logging in to the console for the first time.


Fig. 3-A Cluster Template

Image Added

Fig. 3-B Select KASI-SingleVM Template

Image Added

Fig. 3-C Launch Cluster

Image Added

Step 4. Configure the VM instance for remote desktop & external datastore

  • (Fig. 4-A) Go to Project ComputeInstances menu (Step A), and check your VM instance is Running in Running Power State (Step A). From the Actions pull drop-down menulist, choose Console.

  • (Fig. 4-B) Click on the black console screen, and log type in with root as username and temporary password (Step B)you set in the previous step.
  • First, change Change the root password and update the OS. Create a user account (recommended). Install desktop environment & and remote desktop server.

    Code Block
    languagebash
    themeMidnight
    title(Cmd. 4-1) configure VM instance : remote desktop
    linenumberstrue
    ### Change root password
    $ passwd
    ### Update OS
    $ apt update && apt -y dist-upgrade
    ### Create a user account (recommended) : adduser {username}
    $ adduser kasi-user
    ### Grant sudo privilege to the user : usermod -aG sudo {username}
    $ usermod -aG sudo kasi-user
    ### Install dekstop environment (minimal installation is recommended)
    $ apt -y install xfce4 --no-install-recommends
    ### Install remote desktop server (RDP)
    $ apt -y install xrdp
    ### Reboot
    $ reboot


  • (Fig. 4-C) After reboot, log in to the console with the user account, and configure SMB client to mount user's external datastore (Step C).

    Code Block
    languagebash
    themeMidnight
    title(Cmd. 4-2) configure VM instance : external datastore
    linenumberstrue
    ### Install required pacakges : cifs-utils, smbclient
    $ sudo apt -y install cifs-utils smbclient
    ### Create a mount directory
    $ mkdir NAS
    ### Mount external datastore : mount.cifs -o rw,uid={user id},gid={localgroup userid},username={NAS user} {NAS address} {mount directory}
    $ sudo mount.cifs -o rw,uid=kasi-user,gid=kasi-user,username=kasi-user //210.219.33.249/home NAS
    ### For more mount options : man mount.cifs
    ### Check if external datastore is mounted and the user has write permission
    $ df -H ; ls -l
    ### DO NOT forget to log out
    $ exit

...

Step A

Image Removed

...

Step B

Image Removed

...

Step C

Image Removed


  • Info

    You can also mount the external datastore to your local desktop as a network drive : e.g., \\210.219.33.249\home (Windows file manager, address bar), smb://210.219.33.249/home (macOS finder, Go → Connect to Server)


    Info

    WARNING: NEVER leave the console screen logged in. Other users CAN access your console.


Fig. 4-A Find your VM instance

Image Added

Fig. 4-B First-time console log-in (as root)

Image Added

Fig. 4-C Complete VM configuration and LOG OUT

Image Added

Step 5. Remote access to VM instances via SSH tunneling

  • Prepare the SSH keys (the same ones you registered in sign-up form). If you want to register use another key pairspair for remote access, e-mail the SSH public key file to Administrator(chr@kasi.re.kr).

  • (Fig. 5-A) Go to Project ComputeInstances menu, and find from the instance list :
    • private IP address (e.g., 10.0.X.X) of your VM instance
    • public IP address (e.g., 210.219.33.X) of project gateway (e.g., User Project Gateway
    ) from the instance list (Step A
    • )
    .
  • Install Remote Desktop Protocol (RDP) client software to your local computer, and set up the remote connection.

    • (Fig. 5-B) If RDP clients support SSH tunneling – remmina (Linux), MobaXterm (Windows), configure RDP session as follows:
      • Remote host address (10.0.X.X) : VM instance private IP (port 3389)
      • Remote host username : user account you created (root is NOT recommended) or root
      • SSH gateway address (210.219.33.X) : project gateway public IP (port 7774)
      • SSH gateway username : kasi
    • If RDP clients do not support tunneling – CoRD (Mac), Microsoft Remote Desktop (Mac), create a SSH tunneling port in your local desktop first, and connect through the local tunneling port. 

      • SSH tunnel should be kept alive during remote access (i.e., do NOT interrupt the ssh command or close the terminal)

        Code Block
        languagebash
        themeMidnight
        title(Cmd. 5-1) create local RDP port for SSH tunnel
        linenumberstrue
        ### SSH tunneling : ssh -i {private key} -N -L {local RDP port}:{VM instance private ip}:{RDP port = 3389} {tunneling id = kasi}@{gateway ip} -p {ssh port = 7774}
        ### Local RDP port is set to 12345 for the following example, but you can use different port number
        $ ssh -N -L 12345:10.0.100.42:3389 kasi@210.219.33.122 -p 7774  
        ### Open RDP
      connection through localhost:{local RDP port}
      •  client (e.g., Microsoft Remote Desktop) and set the server address to localhost:12345, or use command (e.g, CoRD) : $ open rdp://localhost:12345

...

Step A

Image Removed

...

Step B

Image Removed

...

Step C

Image Removed


  • (Fig. 5-C) Connect to the RDP host. If everthing (e.g., desktop environment, external datastore,...) works fine, you're all set.


Fig. 5-A Find public IP of project gateway instance

Image Added

Fig. 5-B RDP client configuration (MobaXterm)

Image Added

Fig. 5-C Remote dekstop connected to VM instance

Image Added

Step 6. Shut off (or Delete) Instance when you're done

Info

Reminder : User Agreement #1 you signed 

KASI Science Cloud is a shared computing infrastructure designed for on-demand requests from many concurrent research projects. Users should not hold unnecessary resources or leave inactive tasks to preoccupy their group's quota.

  • Shut off Instance, once your daily activities are over and VM instance is to remain idle :
    • by the shell command (e.g., $ sudo poweroff) or 
    • (Fig. 6-A) by Dashboard action : Shut off Instance from the Actions drop-down list (Project ComputeInstances menu)
    • OS drive of the VM will be saved and can be restarted anytime by choosing Start Instance from the Actions drop-down list.
  • Delete Instance, if you do not want to keep the VM's resources anymore :
    • (Fig. 6-B) choose Delete Instance from the Actions drop-down list.
    • OS drive of the VM will be erased and you have to re-create the VM instance from Step 3 above.

Fig. 6-A Shut off Instance

Image Added

Fig. 6-B Delete Instances

Image Added


Related contents

...

Content by Label
showLabelsfalse
max5
spacesHOW
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "HOW"
labelskb-how-to-article

...