Cloud Service K5 – Console Access to Virtual Servers

Fujitsu’s Cloud Service K5 now has the ability for users to access the console of a Virtual Server through a web browser. This means you no longer need to have a Global IP to SSH or RDP on to the Virtual Server.

To access the console of the Virtual Server you will need to make an API call to retrieve the URL to access it. Follow these steps to access the console of  a Virtual Server:

Step 1: Authenticate

The first step you will need to do is to authenticate to the Cloud Service K5 Identity API and scope to the Project the Virtual Server is in. If you are unsure how to do this have a look at the following GitHub Repository:

https://github.com/fujitsuk5/K5-Auth-API

Step 2: Request URL for Console Access

The next step is to call an API to request a URL to access the Console of the Virtual Server. The API you need to make a POST  request to is as follows:

https://compute.region_name.cloud.global.fujitsu.com/v2/project_id/servers/server_id/actions

Replace region_name  with the K5 region you are accessing (eg uk-1), replace project_id  with the Project ID the Server resides in and replace server_id  with the ID of the Server you want to get the Console for.

As part of the request you will also need to send the following JSON body to instruct K5 to give you the URL for the Virtual Server Console:

{“os-getVNCConsole”: {“type”: “novnc”}}”

An example CURL request:

Curl –X “POST” –d “{“get_vnc_console”: {“type”: “novnc”}}” –H “X-Auth-Token:” –H “Accept:application/json” –H “Content-Type:application/json” https://compute.region_name.cloud.global.fujitsu.com/v2/project_id/server/server_id/actions

A successful response would return something similar to the following:

{“console”:{“url”:”https://console-a.uk-1.cloud.global.fujitsu.com/vnc_auto.html?token=84bcca56″,”type”:”novnc”}}

Step 3: Connect to the URL

Extract the URL from the response and enter it in to a Web Browser to access the Console of the Virtual Server.

Important Notes about Console Access

  1. The URL returned is only valid for 10 minutes
  2. The URL returned is only valid for a single use
  3. The maximum session time is 30 minutes

Also, you will need to have a user account created on the Linux Servers that does not require a Key Pair file to log in if you want to access the Console of those Virtual Servers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s