Point and Shoot VDI

Certainly the most feature rich method to deliver VDI is through the use of a "broker" like the Sun Virtual Desktop Connector. This broker is then connected to VMWare Virtual Center and the combination of the two gives the environment all sorts of features like Pooling, VM Lifecycle management, one-to-one mapping, Dynamic Resource Scheduling, and VMotion.

Not all VDI environments need to have all of these features. Maybe the VM's aren't even hosted in VMWare, or maybe they're not even VM's at all as in the case with blade based PC's. Maybe there is no need for Pooling, just a one-to-one relationship. No need to manage the VM's they're already provisioned through another process.

I like to call this the "Point and Shoot" VDI architecture. It should be dead simple and easy to set up. It doesn't matter where the OS images are, just that they exist on the network and that we are going to assign one VM to one user. Here are the steps to do Point and Shoot VDI using Sun Rays.

NOTE: These examples are for SRSS 4.0

Example 1: VM's assigned to a user. The user is identified by their smart card.

1) Create the Kiosk Descriptor

vi /etc/opt/SUNWkio/sessions/simple-vdi.conf

KIOSK_SESSION_EXEC=$KIOSK_SESSION_DIR/start-vdi.sh
KIOSK_SESSION_LABEL="Static Assigned VDI"
KIOSK_SESSION_DESCRIPTION="Static VM Assignment"
2) Create the Session exec script

mkdir /etc/opt/SUNWkio/sessions/simple-vdi

vi /etc/opt/SUNWkio/sessions/simple-vdi/start-vdi.sh

#!/bin/sh

# Check for Card or Non-Card session
case $SUN_SUNRAY_TOKEN in
pseudo.\*)
# Non-Card Session
zenity --info --text="Please insert your smart card..."
;;
\*)
# Card Session
# Read Other Info Field
REG_OTHER=`/opt/SUNWut/sbin/utuser -o | \\
grep $SUN_SUNRAY_TOKEN | awk -F, '{print $5;}'`

if [ "$REG_OTHER" = "" ]; then
zenity --error --text="This card has not been assigned a VM"
exit 1
else
# Check for VM Availability
/usr/sbin/ping $REG_OTHER 2
if [ "$?" != "0" ]; then
zenity --error --text="VM $REG_OTHER is not available for connection."
exit 1
else
# Call uttsc Kiosk script with VM name
KIOSK_SESSION_DIR=/etc/opt/SUNWkio/sessions/uttsc
export KIOSK_SESSION_DIR
/etc/opt/SUNWkio/sessions/uttsc/uttsc $REG_OTHER
fi
fi
;;
esac
#End

chmod 755 /etc/opt/SUNWkio/sessions/simple-vdi/start-vdi.sh

3) Select Kiosk Mode Configuration

Open SR Admin GUI

Select Advanced->Kiosk

Click Edit

Select Static Assigned VDI from the Session type drop down.

4) Register Cards and assign VM name

Admin GUI - Tokens Tab

Search for currently used tokens.

You may then pick the token and Edit that token's registration.

You must assign a User Name. (This may be free form "Brad Lackey")

Place the VMs DNS name in the Other Information Field.


Example 2: VM's assigned to a DTU. Identified by MAC Address

1) Setup exactly like Example 1, only with a different start-vdi.sh

vi /etc/opt/SUNWkio/sessions/simple-vdi/start-vdi.sh

#!/bin/sh
if [ `uname` = Linux ] ; then
theFlag="-P"
fi

theMACAddr=`cd $theFlag $UTDEVROOT ; /bin/pwd | sed 's/.\*\\(............\\)/\\1/'`
theVM=`/opt/SUNWut/sbin/utdesktop -o | \\
grep $theMACAddr | \\
/usr/bin/awk -F, '{print $2;}'`

if [ "$theVM" != "" ] ; then
# Check for VM Availability
/usr/sbin/ping $theVM 2
if [ "$?" != "0" ]; then
zenity --error --text="VM $REG_OTHER is not available for connection."
exit 1
fi

# Call uttsc Kiosk script with VM name
KIOSK_SESSION_DIR=/etc/opt/SUNWkio/sessions/uttsc
export KIOSK_SESSION_DIR
/etc/opt/SUNWkio/sessions/uttsc/uttsc $theVM
else
zenity --error --text="This Sun Ray has not been assigned a VM."
exit 1
fi

2) Register Desktop and assign VM name

Admin GUI - Desktops Tab

Search for currently connected Desktops.

You may then pick the Desktop and Edit that it's registration.

Place the VMs DNS name in the Location Field.

Comments:

Hi Brad

Thanks for the great blog. I used your example number 1 in this blog for pointing our users to a statically assigned Windows Terminal Server. It is working fine. Do I need to replicate the script over to the other SRSS in my fail over group?

Thanks, PLA

Posted by Patrick L Archibald on October 14, 2008 at 11:33 AM PDT #

you will need to copy the .conf file and script file to all of your servers and put them in the same places. Make sure to set execute permissions on the script file.

Posted by Bradford Lackey on October 15, 2008 at 04:35 AM PDT #

This probably isn't the best place to ask this, but I can't find any other forums.
I'm trying to configure a SunRay Server (4.1) on an OpenSuSE 11 install and for the most part I have everything working, except that the $SUN_SUNRAY_TOKEN variable does not get set. I can write a simple kiosk config which runs an xterm, the SunRay client will startup and give me the xterm window, but when I type 'set | grep -i token', I get nothing.

Where and how is this variable supposed to get set, or am I supposed to somehow set this myself? And if so, how?

Thanks!
-Kevin

Posted by Kevin on November 14, 2008 at 06:33 AM PST #

This Script is giving me Syntax error
Probably not reading the Cards Input my utsuer output example is as below

Payflex.5012d2c500130100,,0,Syed Help Desk,infodc

infodc is the Computer name

Any Suggestions

Sivakumar

Posted by Sivakumar on March 04, 2009 at 12:23 AM PST #

Post a Comment:
Comments are closed for this entry.
About

Think Thin is a collection of bloggers that work with Oracle's Virtual Desktop portfolio of products.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today