Pages

Friday, June 29, 2012

VMware View Composer, Linked Clones, DHCP & DNS Issues

***Update***

With the release of View 5.1, floating (stateless) linked-clones now retain their MAC addresses unlike previous versions of View. In effect, this issue should no longer occur if you are running View 5.1 or newer.

The Scenario

You have an automated VMware View Composer floating linked-clone pool in an environment using Windows Active Directory DHCP and DNS, and whenever you remove or recompose linked-clone desktops it leaves the old (outdated) DNS records in place, and looking in DHCP you see more than one lease for the same computer name. These old records are considered "stale". The DHCP record will eventually drop off after the lease expires, but the DNS entry will persist even after the DHCP lease expires. WHY IS THIS HAPPENING?!?

The Why

I want to start this off by saying this problem doesn't seem to be 100% uniform across all VMware View Composer implementations. It seems to have to do with a given organization's/company's security configurations within AD, DHCP and DNS. With that said, below and even above, is what I witnessed while at a customer recently. Now, onto the explanation...

The above scenario is being caused in part because floating linked-clone pools do not retain their MAC addresses when destroyed, so they will get a new IP address when rebuilt. Yet the new VM is created using the same name as the previous VM and would need to be able to modify the existing DNS record that still persists. In some cases the applied security settings on the DNS server will prevent DNS records from being modified by just any account/client.  In the scenario I witnessed, the now stale DNS record that was created by the DHCP server lease of the original VM is still tied to that lease and the new lease does not get an additional DNS record (while it is possible to have multiple records with the same IP address, each record's NAME property must be unique), and in addition the new VM's computer account (SID) does not have any permission to modify the DNS record, so the DHCP Client cannot update the DNS record like using ipconfig /registerdns, which has no effect on the DNS record.
Note: In the described scenario you may see the old VM's computer account represented in the DNS object's security tab listed as something like "Account Unknown U-I-D-xxxxxx-xxxxxx-xxxxxxx-xxxxxx", which was originally listed as "COMPUTERNAME$" before the AD computer object's SID was changed by the newly created and joined VM. 
Here is the kicker: Even though the DHCP server is set to "Discard A and PTR records when lease is deleted" is checked, the DNS records are persisting after the DHCP lease expires when its time limit is reached.

Additional Points

If no DNS record currently exists for the computer name, then a DNS record gets created when the computer gets a DHCP lease. This works for brand new, never existed desktops being added for the first time. This also works if you manually delete both the DHCP lease AND DNS record, and then renew an IP, but that is not a viable solution in an automated desktop pool world... especially if we are talking about recomposing hundreds of desktops at a time.

One other note, as I found out from the referenced blog post below, if both the DHCP and DNS records are up to date and not stale, performing an ipconfig /release will in fact delete both the DHCP reservation and cleanup the DNS A & PTR records. So I bet you can already guess the solution!

The Resolution

While VMware View Composer does not currently handle this situation automatically (as of View 5.1 anyway), there is a simple fix you can implement easily to resolve the issue. I originally found this solution on this blog post, from more than 1 year ago, down in the comment by "Heather" (wish I knew more about her to thank her for this!). Her solution to this problem was to perform an "ipconfig /release" from the View desktop VM as a shutdown script. She also notes that you need to have the desktop wait for a few seconds or the command runs for zero seconds and it doesn't seem to process successfully.

So create a batch file that looks like the following:
@echo off 
ipconfig /release 
timeout /t 5

Once you have this file created you can place it anywhere that the computer would have access to it. I would recommend placing it in the NETLOGON share on a domain controller for both access and replication across all domain controllers.

You then need to setup linked clone desktops to run this shutdown script in one of several ways:

  • Create an AD GPO with the shutdown script and apply it to the OU that contains all of your linked clones (recommended)
  • Edit the local computer GPO (gpedit.msc) of the parent image to add the shutdown script, create a snapshot and use this for all of your linked clone pools (this allows more granularity, but leaves room for error)
  • Edit each linked clone pool's settings and add the shutdown script to the "Power-off script" field of the Guest Customization tab (again, more granular, but you will need to remember to apply this to any future linked clone pools you create leaving room for error)

The Bottom Line

While this solution worked for the scenario I was faced with, it may not solve all issues that are similar to this. You will definitely need to adequately test any solution before you put it into production, and for goodness sake, TAKE NOTES!!! ;-)

Sunday, June 24, 2012

We Are Becoming The Collective

Waze - Free GPS Navigation with Turn-by-Turn


It just occurred to me that we are becoming "The Collective", like the Borg from Star Trek… and I think it's pretty freakin' cool! Thankfully, so far, most people are not trying to assimilate everyone to a single point-of-view or way of thinking.

Just think about social networking (Facebook, Twitter, Foursquare, etc), and more recently anonymous social traffic sourcing... In apps like Waze, and the yet to release Apple Maps application that was announced at WWDC 2012. We benefit from others simply running the application and that application reporting back statistics such as average speed compared to the posted speed limit. Waze allows users to report incidents such as accidents, police staked out, vehicles on the side of the road, etc. As I drive with Waze open, whether I enter in a destination or not, it can alert me to problems along my current route. If I do plug in a destination it will look for the fastest route with the least number of incidents.
Just the other day I was headed to a professional soccer game at PPL Park in Chester, PA. I already knew how to get there, but it took me through an area that is always congested by a traffic light that can back up traffic for nearly 5 miles at times. Waze routed me off that road and dropped me back on it right at the light where it frees up. While it added more distance to the trip, I was never once stuck in traffic and was able to see the long line I would have sat in when I came back to the main road. That's just one instance where it felt like "The Collective" made me more intelligent.


For news and information based situations, I am able to follow people that I know have similar tastes as me and that I trust their opinion and can be directed to articles that they already read through and "liked" or shared or favorite'ed, etc. I do the same if I am reading through articles/sites. Through this you can be directed to topics that would interest you without having to wade through thousands of stories that may not be of much interest to you. It also speeds those items reaching the right people.


I like where things are headed and can't wait to see what's next! Hopefully I can add something to this movement.

Thursday, June 21, 2012

Incredible Earth-at-night time-lapse video from ISS




This video on YouTube is a time-lapse video of Earth at night as shot from the International Space Station (ISS). You can see all of the lights on Earth as well as storms with lightning that are fairly spectacular. The way the atmosphere lights up as well is impressive. Near the end you get to see the Aurora Australis, like the "Northern Lights" for those of us above the equator, illuminated over the Southern Hemisphere.

In addition, and possibly just as important to the feelings inspired from the video, the music score is *very* powerful and moving. I have to find out who did it and try to download it.

Just noticed this line in the video comments (which have great details on this piece):
**Music: 'Freedom Fighters' by Two Steps from Hell**


- Posted using BlogPress from my iPhone

Microsoft finally surfaced the Surface (new tablet)


Well, Monday June 18th, 2012 has come and gone and Microsoft's secret keynote event http://on.mash.to/MsbEJj did happen. It would seem that Microsoft has put some thought into their new tablet "Surface" they announced Monday, but it remains to be seen how well it might compete with the other tablets on the market running iOS and Android.

Here's a really well done video on YouTube of the Microsoft Surface reveal ad:
http://bit.ly/MDcOWf

Tablets 101

Tablets are not new, nor did they start with Apple's iPad. In fact, there have been Microsoft Windows-based tablets for well over a decade! But those old-school tablets were not purpose built for a touch interface or stripped down to the necessities to run better on slower battery sipping CPUs. They used regular notebook hard drives with spinning media that also sucked battery life. They required special (expensive) pens for the input method (that were easily lost if one was careless). Battery life was abysmal as was performance and user experience. They were, after all, using regular old Windows with some tablet features slapped on top of the standard UI to make it even possible to use. I still have a Motion tablet running Windows 7 (it originally came with XP). The battery life on it was maybe an hour if you were doing anything that remotely taxed the CPU and Hard Drive… you were lucky if you could squeeze 2 hours out of it. And I haven't even mentioned how HOT those tablets got!! It made it so it was hard to hold the thing.

The Apple iPad

I was a nay-sayer when Apple introduced the iPad originally, but then I started to think about why tablets sucked up to that point. It was mostly down to horrible UI and VERY slow performance. What I saw from the original iPad was very snappy performance, and holy cr@p on that 10 hours of battery life! It was something that was unheard of.
Once they were released and I got to play with one I changed my tune and purchased one. It is NOT a laptop replacement for anyone that does heavy lifting with computers, although my wife almost never turns on her computer since she got her iPad (she pretty much only uses the web & email, and of course native iOS apps for everything else). Pages and Numbers on the iPad are actually very well done and pretty powerful considering what it is running on. I have even written long'ish documents on the iPad using an external Bluetooth keyboard (simply for the speed of input, though I am pretty darn fast with the onscreen touch keyboard).

This isn't about Apple

I don't want to turn this post into a fanboi gushing over the iPad… seriously. I just am highlighting these things to point out that Apple, making sacrifices on the full-functionality of their tablet OS (instead of using the full-blown OS X of their notebooks and desktops) and gearing it to a touch-based interface (instead of a mouse-based pointer), finally got the tablet formula right!! Google soon followed with Android tablets (through 3rd parties, which I feel is part of their downfall for adoption). Microsoft is entering the game very late considering that Apple is on their 3rd generation of the iPad and Android tablets have been coming out steadily from 3rd parties.

Will the Surface succeed?

From the very little I have seen, it appears that Microsoft is making efforts to gear the interface to be more "touch-friendly", but the usability overall still remains to be seen. It also seems that the "RT" version, which has an ARM based CPU, will not run legacy x86 apps that were not designed for a touch UI. That is a very GOOD thing for a tablet! However, the "Pro" version seems to be x86 based and will therefore run pretty much all legacy apps that are not designed for a touch-based UI. This will let users down on the usability front I imagine. While it is more flexible, the experience will not be very good in this form factor and small screen with (presumably) higher than normal resolution for such a small screen. I equate this to running my VMware View desktop on my 4.5" Android phone that has a resolution of 1280x800. Everything is so TINY! It's pretty much impossible to work on except for those critical moments I don't have another option.

Conclusion

I do hope that the Surface surprises me like the original iPad did. I want Apple to have more competition out there and have everyone continue to push the envelope on capabilities and usability. In that case, everybody wins! Especially us, the users.

ThinApp Factory Officially Released as a FREE Fling!



For those of you who don't already know, ThinApp Factory is a virtual appliance that has the ability to automate the creation of ThinApp Packages!

Obviously there is a little more to it than importing this appliance and feeding it applications, but this is a great step forward in automating ThinApp packages for Enterprises! 

You can access the software here:
http://bit.ly/MvRzph

Tuesday, June 12, 2012

What language to use?

I have been trying to determine what programming language to use for the graphical user interface (GUI) application that I intend to build to automate applying Windows optimizations for View desktops (see my Projects page). I have almost zero experience with programming, so anything I choose will be nearly net-new for me. My dilemma is that I need to be able to write this application with some level of polish before VMworld 2012 in August 2012.

The logic behind the app is fairly basic and it is more about presenting the information to the user in a friendly, easy to use manner. It will include checkboxes and some radio buttons. These "items" will be directly tied to an associated command line text string that, if selected, will then be placed in a text file to be run as a batch file on a Windows desktop to apply the chosen optimizations.

AutoIt:
A gentleman who works for a VMware partner came up to me at PEX 2012 to let me know that he had taken my Windows optimization guide and created a very simple GUI using AutoIt. I started to look at using AutoIt for my purposes, which should work, but it does seem to be fairly limited and may not offer me much room to grow the application in the future. Still, it is something I am considering.

C#:
I started to look at Microsoft Visual C# 2010 because of how powerful that language is, but it seems like the learning curve is a little steeper than I have time for. Still, it is something I would like to learn in the not-too-distant future.

Visual Basic:
I am now looking at Microsoft Visual Basic 2010 to create this application. I have some limited experience with VBA (Visual Basic for Applications) from years ago, so I hope this translates into an easier time picking things up. I also found a book that may help me get up to speed fairly quickly and seems to have good ratings from beginners. I realize this will not make me an expert, but it may be just enough to get me started and at least have the correct terms if I go in search of finding help.

Conclusion
For now I think I have settled on Visual Basic and will be heading down that learning path. If it feels too complicated for me to get to where I need to be to reach my deadline, I can always pull out and work with AutoIt or even get someone else to write the thing for me. I hope that I can pull it off myself because it is something I would like to accomplish and have under my belt.

Thursday, June 7, 2012