Virtual Desktop Infrastructure (VDI) with OpenNebula and Guacamole - Admin Guide

Solution Verified in:

  • OpenNebula: 6.4

This step-by-step tutorial will help administrators to provision virtual desktops, using a VDI solution provided by OpenNebula and Guacamole integration

Requirements

Configuring Guacamole

This section is for setting up the relations between guacamole connection groups, users, and OpenNebula templates. 

You will first need to create a Connection Group for the deployed virtual machines, as well as user accounts for the users that will log in:

  • Connect to guacamole http://<server_ip>:8080/guacamole with default username and password (guacadmin/guacadmin).
  • Go to settings, and create a new connection group in connection tabs and name it "Windows".  Set the Type to 'Balancing'. Take note of the Connection Group ID contained in the URL.

guacamole_windows_connection_group.png

guacamole_windows_connection_group_definition.png

  • Create a user in the Guacamole Interface in the Settings -> Users tab.
  • If the hook script is set up for auto-login, make sure you create the user with the same username and password as the Windows account.

guacamole_users_tab.png

  • When creating the user, remember to assign the user to the Windows connection group.

guacamole_demo_user.png

Windows Template Creation

Once you've already imported/created a Windows Image (detailed in this guide), you'll need to create the template that will trigger hooks to create connection inside Guacamole.  Either create the template through sunstone or write the following to a file, and update the necessary disk and resource details:

NAME="Windows"
CPU = "4"
DISK = [
  DEV_PREFIX = "vd",
  IMAGE = "Windows10",
  IMAGE_UNAME = "oneadmin" ]
GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]
INPUT = [
  BUS = "usb",
  TYPE = "tablet" ]
MEMORY = "16384"
MEMORY_UNIT_COST = "MB"
NIC = [
  NETWORK = "vnet",
  NETWORK_UNAME = "oneadmin",
  SECURITY_GROUPS = "0" ]
NIC_DEFAULT = [
  MODEL = "virtio" ]
OS = [
  BOOT = "disk0" ]
CONTEXT = [
  GUAC_GROUP = "1",
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]" ]

 

  • The custom var "GUAC_GROUP" in the CONTEXT section is set to the group integer identifier (not the label) corresponding to the Windows group previously created in Guacamole.
  • To create the VM template, run the following command:
onetemplate create win_template.txt
  • You can then instantiate this Windows template to verify functionality:
onetemplate instantiate Windows10

Launching Virtual Desktops

This section of the guide is for administrators who will be deploying the pool of VMs on OpenNebula for the Guacamole VDI end users to connect to. We will be using OneFlow to automatically power VMs on and off to reduce resource usage outside of working hours. Additional configuration of the services can be found in the documentation around OneFlow. Launching a set of VDIs requires creating a OneFlow Service Template(Step 1), instantiating the OneFlow Service Template (Step 2) and creating a Guacamole Account (Step 3).

Alternatively to Step 1 and 2, you can manually instantiate the Windows Template (or any other template you want to offer to your VDI users).

Step 1. Creating the OneFlow Service Template

First, we will need to create the service template that will be used to deploy our pool of VDIs in Step 2. This step needs to be perform only once, and you can then instantiate as many VDI pools as you need.

  1. Navigate to Templates -> Services -> + -> Create. 
  2. Fill out the Name and Description
  3. Expand Network Configuration and add necessary networks
    • Ensure the guacd guacamole service has network connectivity to the VMs on one of these networks!
  4. Expand the Service Scheduled Actions and add poweroff and resume actions for the times necessary.
    • Selecting the Periodic option will help with recurring 
  5. Name the existing role and input the number of VMs in the pool. This will be the number of VDIs spawned by this Service Template on instantiation (Step 2).
  6. Select the Windows template you'll be using
  7. Expand Role Network and select the network(s)
  8. Click the Create button

Screen_Shot_2022-09-07_at_2.39.33_PM.png

 

Step 2. Instantiating the OneFlow Service Template

Now, we will need to instantiate this template we just created to spawn the virtual machines (ie, VDIs). This can be done each time you need to spawn the VDI pool (which contains as many VDIs as specified in the OneFlow Service Template built in Step 1).

  1. Navigate to Templates -> Services, select the Windows Pool we just created, then click + -> Instantiate
  2. Fill out the Service Name
  3. Select the Network(s) according to the Role Networks
  4. Select Instantiate

Screen_Shot_2022-09-07_at_3.01.18_PM.png

At this point, the Service will be instantiated and will start deploying the Windows Virtual Machines, which you can view the progress of under Instances -> VMs.  Once the VMs have completed booting, they should be available in the Guacamole VDI interface.

Once the pool of virtual machines has fully booted and is accessible, Users should be able to log in to the Guacamole web interface and start consuming Virtual Desktops from this.

guacamole_login.png

windows_demo_welcome.png

windows_demo.png

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.