UDA2.0 Test Drive

I’ve always been using UDA1.4 for my ESX deployments up until ESX3.5. Now when it comes to vSphere the UDA1.4 isn’t a good fit anymore, because it doesn’t support ESX4. Luckily Carl Thijssen, the mastermind behind the UDA, released a 2.0 beta version  a couple of months ago, which, with a little help from Mike Laverick, also supports ESX4.

I always wanted to test drive this new beta version, but couldn’t find the time for it. But since I recently got my new lab environment in place, I thought it would be time to start using the new UDA2.0 for installing ESX4 onto my lab servers. Up until now the latest version is build5. So that is the version I’ve been using for testing.

I’m not going to take you by hand and walkthrough the installation process of the UDA, because Mike Laverick wrote a very good piece of documentation on Installing & Configuring the UDA.

When going through the installation process, I encountered a couple of problems which I whish to share with you.

Unzipping the zip on ESX3.5

When trying to unzip the zip file on the ESX 3.5 service console the unzip process suddenly crashed for no apparent reason. I haven’t been able to extract the zip file on the service console, so I had to extract the zip file on a Windows box and copy the extracted files to ESX using SCP. After that everything went fine. As an alternative I could have used VMware converter to import the UDA files.

Mounting a Windows share

When I tried to mount a windows share, I received an error that the system was unable to contact the remote server. So I had to use the IP address instead of the remote server’s FQDN. I don’t think that this has something to do with the UDA, but probably this is due to a lack of a decent DNS setup in my environment. So if you encounter problems mounting a remote share, try to use the server’s ip address instead.

Mounting the ESX4 ISO on a Windows share

One of the improvements of the new UDA is that you can now store your ISO files on Windows- or NFS shares too, next to storing them on virtual disks. And of course all is supported by the new and improved web interface. When I tried to mount the ESX4 ISO from the mounted Windows share, I received an error. It turned out that it requires you to have at least Modify rights on the Windows share to successfully mount the ESX4 ISO. After changing my permissions on the Windows share from Read-Only to Modify, I was able to successfully mount the ESX4 ISO

Sub-template bug

Another great improvement is that you now can use sub-templates. Instead of creating a separate template for every host in your environment, you can now create one master template and provide this with variables enclosed in [squarebrackets]. These variables are defined in the sub-template file.

However when modifying this sub-template file, I received an “Invalid fieldname found” error when hitting the Save button. When you look closely to the error message you’ll see an extra newline after the fieldname, which puts the closing quotation mark on a separate line. After searching the web I found out that this is supposed to be a problem related to Internet Explorer and I was advised to use Firefox instead. But this was not an option for me, so I had to dig into this a little deeper.

It all has to do with how the browser uses line breaks. IE and Opera both use \r\n as a line break, but Firefox only uses \n. Now since the web interface is provided by javascript, the problem is somehow obvious, because javascript requires \n as a line break.

Time to dig into the UDA to find the java code that handles the sub-template validation. After a quick investigation I found the file at /var/public/www/js/validatesubtemplates.js. When viewing the code the problem became obvious to me when I saw the following line of code:

lines.replace(/(\x0a\x0d|\x0d\x0a)/g,"\n");

This line of code replaces all \r\n and \n\r occurrences with \n. Although the outcome of this code is correct it does not change its source. This is the default behaviour of the replace method. So we need to change this line of code into:

lines=lines.replace(/(\x0a\x0d|\x0d\x0a)/g,"\n");

This way the content of the lines parameter is overwritten by the outcome of the replace method. After changing this code, editing the sub-templates file in Internet Explorer just went fine.

UDA “hacks”

When searching the web for the UDA2.0 I found some other interesting hacks for the UDA2.0.

Gabrie van Zanten posted an article on how to add a countdown timer to the template menu. This makes it possible to skip the PXE boot process and continue with a normal boot. Read all about this hack here.

Joep Piscaer posted an interesting article on how to use the UDA to do a manual installation using the GUI without supplying a DVD. Read all about this hack here.

Other UDA2.0 articles I found:

Arne Fokkema: http://ict-freak.nl/2009/06/24/virtual-appliance-uda-2-0-beta

Bouke Groenescheij: http://www.jume.nl/articles/vmware/125-following-the-uda-20-beta-found-workarounds

UDA Links:

UDA2.0 beta: http://www.ultimatedeployment.org/uda20beta.html

UDA Forum: http://www.ultimatedeployment.org/forum

Mike Laverick’s UDA page: http://www.rtfm-ed.co.uk/?page_id=366

VMware Communities thread on UDA: http://communities.vmware.com/thread/43958;jsessionid=F6F7657369131F0FFE9DEB2936C0E72A?start=510&tstart=0

No related posts.

0 Comments on “UDA2.0 Test Drive”

Leave a Comment