Setting up the lab in Ravello – Part 1 : the jumphost

[et_pb_section bb_built=”1″ _builder_version=”3.0.47″ collapsed=”off” next_background_color=”#000000″][et_pb_row custom_padding=”25px|0px|27px|0px” _builder_version=”3.0.47″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” collapsed=”off”][et_pb_column type=”4_4″][et_pb_post_title comments=”off” _builder_version=”3.0.106″ title_font=”||||||||” title_font_size=”35px” title_font_size_last_edited=”on|phone” meta_font=”||||||||” text_orientation=”center” text_shadow_style=”preset3″]

 

[/et_pb_post_title][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

In these series we will create a lab with multiple components, a jumphost, vcsa, esxi, a vsan enabled cluster, nsx and maybe more. The aim of the series is to learn about deploying all components onto the Ravello cloud.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Part 1: Creating the Jumphost

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Part one of the series will be about creating the jumphost. I’m looking at a linux system as we do not need any license to run it and it is already available in Ravello

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Creating the Ravello Application

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

The first step is to create an application. We will create a 0.1 version of the LAB:

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Create-Application.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Creating the Jumphost VM in the Application

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Drag a ‘Xubuntu Desktop 14.04.1 with qemu-kvm pre-installed’ onto the Canvas. Once the VM has been dragged onto the Canvas, there will be an error: ‘Key pair must be supplied’

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Xubuntu-VM-error-1.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

You can see that the error has its source on the General tab. To correct this a Key Pair must be created.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Xubuntu-VM-error-2.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

On the General tab – Cloud Init Configuration – Key Pair

Select the Option: Create a Key Pair

In the following screenshot you can see that I already created a Key Pair

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Xubuntu-Key-Pair.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Once created the private key will be available for download. To be able to use the private key with a ssh session from putty, you will need to convert the key.pem to key.ppk. Open puttygen and load the key.pem file and save the file as key.ppk.

Now that we have created our key pair we can save the VM and the error should disappear.

On the System tab, change the # CPU to 2 and the memory to 3 GB.

On the Disks and NICs tab we leave everything as is.

On the Services tab, Add Supplied Service. We will use this Service to connect to the VM via RDP.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Add-Supplied-Service-1.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

A second service will be added. I changed the name to RDP and chose protocol RDP which sets the Port to 3389.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Add-Supplied-Service-2.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

We are ready to publish the application:

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Publish-LAB-1.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Publish-LAB-2.png” align=”center” _builder_version=”3.0.106″]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

Change the ‘Schedule application to stop in:’ countdown timer to ‘04:00hr’. This will give us the time to update and change the VM to our needs.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Publish-LAB-3.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

Publish will power on the VM. When Powered on we will have access to the Console. Powering on the VM takes a couple of minutes.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/VM-is-Started.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Customizing the Jumphost VM

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

Upgrades

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

The Console will open in a new tab. The initial password for this VM is ‘ravelloCloud’.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/VM-Console.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

The first thing we will do is upgrade the VM to the latest release available. Open the ‘Byobu Terminal’.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/Byobu-Terminal.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

Run the command ‘sudo apt-get update && sudo apt-get upgrade’ and confirm you want to upgrade all proposed packages. I tried do-release-upgrade first, which failed because of an apt dependency.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

sudo apt-get update && sudo apt-get upgrade

[/et_pb_text][et_pb_code _builder_version=”3.0.106″ /][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/apt-update.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

Now we are ready to upgrade to the lastest release. Confirm to all new version configuration files from the package maintainer. In the end all obsolete packages can be removed and reboot when finished.

[/et_pb_text][et_pb_image src=”https://blog.vconsultants.be/wordpress/wp-content/uploads/2018/04/do-release-upgrade.png” align=”center” _builder_version=”3.0.106″ animation_style=”fade”]

 

[/et_pb_image][et_pb_text _builder_version=”3.0.106″]

Run the command ‘sudo apt-get dist-upgrade’ and confirm you want to upgrade all proposed packages. Now your system will be fully up-to-date.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

XRDP 0.9.x

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Install xrdp 0.9.x so that we can connect via RDP. This will be a more pleasant way of working.

We will add a PPA (Personal Package Archive) to add the package source location to the /etc/apt/sources.list file. This will enable updates through the apt update process. We will install the latest version of xrpd from this location. At the time of writing the version integrated is in the ubuntu sources is 0.6.x. The latest stable version has quite some enhancements like shared clipboard support.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

sudo add-apt-repository ppa:hermlnx/xrdp
sudo apt-get update
sudo apt-get install
xrdp xrdp -v

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

The version installed at the time of writing is 0.9.4

Create xsession file with contents xfce4-session. The latest xrdp version should be detecting the desktop environment by default but in my case it did’t and wouldn’t work without the following xsession file.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

cd $HOME
echo xfce4-session > ~/.xsession

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Generate new certificate and key

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Update XRDP to use the new certificates

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

cd /etc/xrdp sudo vi xrdp.ini

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Change the following lines to use the certificate and key generated

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

certificate=/home/ubuntu/cert.pem
key_file=/home/ubuntu/key.pem
cd /etc/X11/
sudo vi wrapper.config

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Change the following line

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

allowed_users=anybody

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Reboot the VM Now you can access the VM through RDP. You will need to confirm the self-signed cert as it has not been signed by a trusted root CA.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Powershell Core

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Import the public repository GPG keys

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Register the Microsoft Ubuntu repository

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Update the list of products

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

sudo apt-get update

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Install PowerShell

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

sudo apt-get install -y powershell

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Start PowerShell

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

pwsh

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

PowerCLI 10

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Install the PowerCLI module from the PowerShell Gallery

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

Install-Module -Name VMware.PowerCLI -scope CurrentUser

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Verify PowerCLI version

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

Get-PowerCLIVersion

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

OPTIONAL: Opt-out from the Customer Experience Improvement Program (CEIP)

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

Set-PowerCLIConfiguration -scope user -ParticipateCeip $false

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

OPTIONAL: Do not display the warning about using self-signed certificates

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

OPTIONAL: Visual Studio Code

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

Installing Microsoft Visual Studio Code can be usefull for creating scripts that will/could be used within the environment.

[/et_pb_text][et_pb_text _builder_version=”3.0.106″ text_font=”Abhaya Libre||||||||” text_font_size=”15px” background_color=”rgba(12,113,195,0.13)” custom_margin=”|10px||10px” custom_padding=”10px||5px|”]

curl https://packages.microsoft.com/keys/microsoft.asc | gpg –dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg sudo sh -c ‘echo “deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main” > /etc/apt/sources.list.d/vscode.list’
sudo apt-get update
sudo apt-get install code # or code-insiders

[/et_pb_text][et_pb_text _builder_version=”3.0.106″]

The next part will be setting up the ESXi machines and VCSA.

[/et_pb_text][et_pb_divider _builder_version=”3.3.1″ /][et_pb_text _builder_version=”3.3.1″]

Many thanks to:

[/et_pb_text][et_pb_text _builder_version=”3.3.1″]

Dale Scriven – http://vhorizon.co.uk/using-ravello-cloud-for-the-bandwidth-embarrassed/
Roman Dodin (@ntdvps) – https://netdevops.me/2017/installing-xrdp-0.9.1-on-ubuntu-16.04-xenial/
Microsoft – https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-macos-and-linux?view=powershell-6#ubuntu-1604
Microsoft – https://code.visualstudio.com/docs/setup/linux
Ravello for providing the vExpert Free Service Account – https://cloud.ravellosystems.com

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section bb_built=”1″ fullwidth=”off” specialty=”off” prev_background_color=”#000000″][et_pb_row][/et_pb_row][/et_pb_section]