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 Descriptor2) Create the Session exec scriptvi /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"
3) Select Kiosk Mode Configurationmkdir /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
#Endchmod 755 /etc/opt/SUNWkio/sessions/simple-vdi/start-vdi.sh
4) Register Cards and assign VM nameOpen SR Admin GUI
Select Advanced->Kiosk
Click Edit
Select Static Assigned VDI from the Session type drop down.
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.

