Monday, November 17, 2008

Resizing VDI Windows Sessions

Hello again,

Here is a juicy morsel from my pilgrimage into the world of Virtual Desktop Infrastructure (VDI).

This is a variation on Maurice Bonotto's blog post on Resizing Windows Sessions entry. The primary difference is that I added the necessary step of killing the active RDP connection (uttsc session) so that the RDP connection will be re-created at the proper resolution.

Place the following contents into a script named /opt/SRSS-Addons/utresize.
#!/bin/sh
# utaction script to resize VDI desktop
PATH=$PATH:/opt/SUNWut/bin:/opt/SUNWut/sbin:/usr/X11/bin

dtuDev=`basename $DTDEVROOT`
newRes=`grep RESOL /var/opt/SUNWut/dispinfo/$dtuDev|cut -d= -f2|cut -d: -f2`

# Determine the current settings. If the resolution hasn't changed,
# don't do anything. However, if it has, change X11 pallet, xrandr,
# and reset the RDP connection.
oldRes=`xrandr | grep "^*" | sed -e "s/ x /x/g" | awk '{ print $2 }'`

if [ "$newRes" != "$oldRes" ]
then
# utxconfig defines the X11 pallet size
utxconfig -r $newRes

# xrandr (X11 Resize and Rotate) changes the X11 resolution of
# the DTU session.
xrandr -s $newRes

# For VDI, the RDP session needs be re-established at the new
# resolution. There isn't a clean way to do that. So we, just
# kill the existing RDP connection (uttsc)
pkill uttsc-bin
fi

Then add the following line to the top of the vda script found here:
/etc/opt/SUNWkio/sessions/vda/vda
/opt/SUNWut/bin/utaction -i -c /opt/SRSS-Addons/utresize &

When you insert your token (aka Java Card) into a Desktop Unit (DTU) that has a different resolution that your current DTU, it will seem like the SunRay is rebooting. This is because the script has killed the RDP (uttsc) session. Also, when the Windows login screen comes up, the login screen may not yet represent the proper resolutioin. However, after you login it will resize to the proper resolution.

Enjoy!

Brad



Thursday, October 9, 2008

Wireless Options for Thin Clients

Hello all,

It has been a while since my last post. Part of the reason why is because I am expanding my focus to include the broader spectrum of Sun's virtualization portfolio. Click here for a brief video overview. This blog post relates to the desktop virtualization part of the portfolio.

Sun's desktop virtualization solution breaks down into three layers. The bottom layer is the virtualization layer. This is where your desktop lives. Your desktop may live on a shared server like a Windows Terminal server, a Solaris server, or even a Linux server. Or your desktop may be contained within a virtual machine running on top of a physical server. Or your desktop may just run on a physical blade server, or even just a plain old desktop. Most likely though in order to get the full benefits of the desktop virtualization solution, your desktop will be running within a datacenter.

The next layer is the session management layer. In this layer, we manage your desktop session so that you can access it from just about any device. Session management enables you to go from one device to another and pick up right where you left off on your desktop. This awesome feature is called hotdesking.

The third and last layer is the access layer. This layer represents the thing that you interact with. It could be a thin device like a SunRay, or a browser on your Mac desktop, or even microbrowser in your mobile phone or PDA.

With that brief overview, the real purpose of this blog is to talk about the various wireless options for thin client devices of the access layer of Sun's virtual desktop solution.

Sun's SunRay thin clients do not currently offer native wireless support. However, there are several wireless/Ethernet bridge devices available that you can use to put a SunRay thin client on a wireless network. I did a brief market survey this morning to find out what devices are available for this task. Here are the results of my survey.

ProductModelCompanyPrice
Wireless Pocket Router/AP w/ Client ModeDWL-G730APD-Link$64.99
High Speed Mode Wireless Pocket Access PointWL-330gEAsus$89.76
5 Port 802.11G Enet Bridge Adptr PoeWET200Linksys$161.69
Wireless-G Ethernet BridgeWET54GLinksys$120.07

The DWL-G730AP and WL-330gE are very compact devices that appear to be great options for demos. The WET200 is nice if you want to connect up to 5 SunRay's through a single wireless device. This might be great for an Internet Cafe that can't or doesn't want to run Ethernet cables through their facility.

If you prefer a notebook form factor, the Tadpole division of General Dynamics offers the Tadpole M1400 Ultra Thin Client. You can either call Sun or General Dynamics for pricing on this thin client device. The only con with this device that I can see is that doesn't offer wireless encryption. If you need wireless security, then consider using one of the Wireless/Ethernet bridges mentioned earlier.

Have a great day!

Brad


Monday, September 8, 2008

Having fun in Colorado...


The CMA SE and Sales team at business planning meeting.



Brad



Tuesday, July 29, 2008

The Mac Debate...

I have been a long time unix guy. As far as the desktop experience goes, I have been Windoze free for many years. My current favorite unix-based desktop of the day is Ubuntu Gutsy. It has held up well and been very flexible for all of my dynamic needs.

Several guys that I work with have been trying to talk me into getting a Mac. I personally had never played much with Mac until of late. So I thought I would jot down the pros and cons that relate to my personal needs and perceptions.

Before I get to my notes though, I want to throw out their once again that I am a total newbie to Mac land. Not knowing the Mac way of doing things my have put me at a disadvantage from an evaluation standpoint.

Pros:

  • Very sleek, light weight and very quiet.
  • Great native multimedia iMovie, iPhoto, and iDVD.
  • Wireless profile and network management is very simple and easy to use.
  • Auto sync with external displays (projectors in particular for presentations).
  • Nice built in camera.
  • Fusion's unity for integrating Windows applications seamlessly into the OS X desktop.
  • Fusion 2.0's unity for linux for integrating Linux applications seamlessly into the OS X desktop.
  • I like the magnetic power cord design.


Cons:

  • Expensive relative to other Core Duo systems. I can buy from Dell a 15" 2GHz Core Duo Inspiron 1525N with 4GB of RAM, a 2Megapixel camera, bluetooth and a 250GB SATA drive for $944. A comparable 15" MacBook Pro costs no less than $2,699.
  • Uninstallation is not easy. OS X needs serious help in this department. On ubuntu, I can effortlessly uninstall any program and the programs that depend on that program with apt-get or the gui equivalent. This blog post said that there basically isn't a good uninstaller tool for OS X.
  • I am really used to the Gnome/KDE way of quickly getting to an application through a menu.
  • No ability (that I have found) to add applications or applets to the top bar. For example, I really like the performance meeter that I have on my Ubuntu desktop.
  • No page up, page down or insert keys.
  • No right mouse button for easy copy/paste. I know its a Mac but that doesn't diminish the fact that the right mouse button is very convenient.
  • The DVD player doesn't have FF or RR. Very disappointing.
  • I am hooked on evolution v2.12 as a mail client. So it is hard to consider anything else. So the lack of a current version of evolution for mac is hard. Perhaps Fusion 2.0 will come to Mac's rescue. ;-)
  • The Dock is cool but a bit annoying once it gets full. It can also be annoying when an application is below the Dock.


I am curious to know what others think. Please also feel free to give me pointers on the Mac way of doing things.

Thanks in advance,
Brad



DSEE6 SMF Fun...

I was recently asked how to configure the Solaris 10 Service Management Facility (SMF) to NOT restart directory server, should directory be stopped by dsadm, by kill or if DS quit on its own. In my pursuit of this configuration, I realized that there isn't a single resource that details some of my favorite uses of SMF relative to directory server. Toward that end, I decided to throw this blog entry for your benefit.


Great SMF Resources
If you are just getting started on learning SMF, here are some great resources to get you going.

Where To Find SMF Templates For DS
Directory Server Sample SMF Template:

  /dsee6-install-dir/ds6/install/tmpl_smf.manifest

Directory Proxy Server Sample SMF Template:

  /dsee6-install-dir/dps6/install/tmpl_smf.manifest


How To Disable SMF Auto-restart
1. Save frmi into variable
# fmri="svc:/application/sun/ds:default"

2. Dump the fmri xml to a file
# svccfg export ${fmri} > /ds-fmri.xml

3. Modify /ds-fmri.xml adding the following after the <stability... property.

<property_group name='startd' type='framework'>
   <propval name='duration' type='astring' value='transient'/>
</property_group>

4. Delete the current entry with sccfg
# svccfg delete ${fmri}

5. Import the updated fmri xml file...
# svccfg import /ds-fmri.xml

6. Enable the fmri...
# svccfg enable ${fmri}

Note that if you stop or kill ds outside of svcadm (e.g. smf) the state will not change from 'online'. Here is sample output from my system.

# svcs ds
STATE STIME FMRI
online 13:35:04 svc:/application/sun/ds:default

Reference:
Service Management Facility master restarter


How To Partially Disable Auto Restart
If you installed from native packages with the Java Enterprise System distribution, enable the server to restart when the operating system reboots.

# dsadm enable-service --type SMF /ds_instance

Note that that with this feature, "dsadm stop /ds_instance" will stop DS and disable the service so that the restarter won't try to re-start ds. However, if DS is killed or dies, the restarter will attempt to re-start DS.

Reference:
Creating and deleting a directory server instance


How To Start DS Using libumem
If for troubleshooting purposes, you want to switch to the object-caching memory allocation library (libumem), use the following to make the change in SMF:
# svccfg -s svc:/application/sun/ds:default setenv LD_PRELOAD_32 libumem.so
# svccfg -s svc:/application/sun/ds:default setenv LD_PRELOAD_64 /usr/lib/64/libumem.so

Then, refresh and restart the DS instance in order for this change to take effect.
# svcadm refresh svc:/application/sun/ds:default
# svcadm restart svc:/application/sun/ds:default

Use the following to see the changes:
# svcprop ds| grep LD_
start/environment astring LD_PRELOAD_32=libumem.so LD_PRELOAD_64=/usr/lib/64/libumem.so


How To Start DS On Fixed Priority Scheduler
If you would like to start DS with the fixed priority scheduler instead of the default fare share scheduler, simply insert the appropriate priocntl command into the exec_method string of the start method. Here is the excerpt of our working fmri example.
<exec_method
type="method"
name="start"
exec="/opt/SUNWdsee/ds6/bin/dsadm start --exec /dsAtt"
timeout_seconds="600">

Here is what it looks like after we have added priocntl:
<exec_method
type="method"
name="start"
exec="priocntl -e -c FX /opt/SUNWdsee/ds6/bin/dsadm start --exec /ds"
timeout_seconds="600">

To actually make the change, use the method described above in "How To Disable SMF Auto-restart"

Now, you can see from the process listing that the schedule used is the FX scheduler.
# ps -c -p 6033
PID CLS PRI TTY TIME CMD
6033 FX 0 ? 0:00 ns-slapd


Set NDD Settings On System Boot
After installing DS, one of the first things that you need to do is optimize the system wide TCP/IP settings for directory server. You can determine the settings that make the most sense for your system by running idsktune. Take those settings and plug them into a script that will be called on system boot once by SMF. Details on this procedure are well documented in the Deployment Planning Guide.

I hope that you find this information useful.

Blessings to you and yours.

Brad



Friday, February 29, 2008

Zones Automation In The Real World Part Deux

Thank you to everyone that contributed great ideas and use cases in response to my previous blog. As promised, here are the links to the slide deck that I assembled from your great feedback. For those that don't know what I am talking about, this is a slide deck that gives practical use cases and examples of how zones can be used in the real world. Click here for the Open Document Presentation version and here for the Portable Document Format version.

I hope you have a very blessed day!

Brad



Wednesday, February 20, 2008

QA Testing With The Zone Manager

One of the great things that I love to do at Sun is work on Directory Services. I have worked on directory server as an architect and consultant in Sun Professional Services, as an engineer in Directory Deployment Engineering, and now as an architect in the Communications Market Area of Software Sales.

In each of these roles, one of the aspects of keeping up with the product is evaluating it for myself. In engineering I also did quite a bit of Quality Assurance (QA) testing as well. David in his comment asked if The Zone Manager could be used for QA testing. I responded that The Zone Manager is an ideal tool for that very purpose.

For this post, I thought it would be cool to give you a basic QA setup script that I have used to test the zip install, CLI setup and web admin setup of DSEE 6.2. With the following invocation of The Zone Manager, I add a sparse zone named dsee, disable all un-necessary services, setup TCP/IP and name services, read-only mount /data, remotely install tomcat5 from Blastwave, and finally runs my ds setup script.
# zonemgr -a add -n dsee6 -z /zones -P sundsee6 -s lock \
-G tomcat5 -I "192.168.0.10|bfe0|24|dsee6" -r /data \
-C /etc/resolv.conf -C /etc/nsswitch.conf \
-X "/data/scripts/dsSetup.sh ds1 sundsee6"
Note that the ds1 parameter passed to the script is the instance name given to the ds instance setup by the script. Also sundsee6 is the password given for the DSCC console and the rootdn user (cn=Directory Manager)of the directory server instance.

The dsSetup.sh script installs DSEE6 from the zip file located in /data/images, sets up a directory server instance named ds1, and sets up the Directory Service Console (DSCC).

Once dsSetup.sh finishes running, you can login to the DSCC via the URL: http://192.168.0.10:8080/dscc

Here is a screen shot of the DSCC login page.


Here is a screen shot of what it looks like once you have logged in.


There are lots of great things to see in the new directory console. However, one of my absolute favorites is the ability to see the replication topology. Kudos once again to engineering for that tremendous feature.



The value of zones and The Zone Manager relative to software quality assurance is that you can in a repeatable and automated way create a fresh new image of Solaris configured to your specifications, install your product and test it any way you like. Tear down the zone and repeat the process for every build of your software product. Some may think this is overkill. However if your software installs packages, changes system configuration files, or in any way doesn't cleanly clean up after itself during un-installation you have no way of guaranteeing that each QA run starts from the same starting point.

David, I hope that you find this QA example useful.

Regards,
Brad