Wednesday, September 16, 2015

Setting up Windows 2012 R2 server as Session Host server without installing a full RDS farm


If you are looking to setup a simple remote desktop session host server on windows 2012 R2 server like you were able to do in Windows 2008 R2 Server or pervious versions continue reading this article.

Pre-requisites
A valid Remote desktop License server

Here's a high-level process.

1. Stand up a Windows 2012 R2 server

2. Install the Remote Desktop Services Session Host Server role from the server manager.

3. Once a Windows 2012 R2 server is setup with the Session Host remote desktop services role (Remember to restart after the installation), go to Windows Registry.

4. Update the value of "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\LicensingMode" to "2" for per device or "4" per user

5. Create a Multi_SZ value under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" with the name "SpecifiedLicenseServers" and specify the FQDN of the license server as the value. i.e. RDLicense.abc.com

6. Restart the Server

7. Open RD Licensing Diagnoser from Administrative Tools > Remote desktop

8. It should not show any problems.

Thursday, May 3, 2012

Monitoring and Systems Management

I have been evaluating opensource software applications for Network and System Monitoring for quite a sometime. As most of the organizations do not authorise budget for monitoring software and the preasure is often put on IT to deal with the uptime SLA's.

I evaluated Nagios, Icinga and Zenoss. Icinga is a fork of nagios and is backward compatible. Zenoss on the other hand has two versions community version for free and Enterprise verion at a cost. Icinga and Zenoss community version has its own pros and cons. 

However, Zenoss has a appealing interface with integration to goolgle maps and is equiped with real time graphs. Zenoss also have numerous plugins (zenpacks) that supports different hardware models. Most of all zenoss is agentless !!!. Which makes it a more prudent option in a data centre environment. The application owners wouldn't want any other software agents installed on the servers and agents cannot be installed without the concent from the application vendors. Therefore the agentless option is the way forward. Icinga on the other hand needs a agent to be installed does't provide out of the box performance graphs.

Both softwares are good but the goal was to find the best out of the best. In my humble opinion the winer is Zenoss. The zenoss VMware appliance makes it easy easy to start and run zenoss withing minutes!!!

Sunday, October 16, 2011

Oracle IAS SSL "Page Cannot be Displayed" error on IE

I have been strugling for a while trying to figure out a strange issue with a SSL certificate. The web site in concern runs on Oracle IAS and the SSL certificate is setup on oracle wallet manager. It was previously configured to use a self-signed certificate and it worked on all the browsers (IE, FireFox, Chrome, etc...). However, after setting up a VeriSign EV certificate the web site did not load on some Windows XP IE browsers (IE6, IE7 and IE8). All the other browsers did not have any problem loading the web site. My first guess was that it was an issue with Microsoft patches related to VerSign EV (Extended Validation) since the web site was loaded after installing all the windows patches on the PC's that had the issue. Yet, as the website was accessed by outsiders we had to find a solution that does not require any changes to client computers. Thanks to google, I found the below document which described the exact problem and the solution.


www.ru.nl/publish/pages/528719/oraclewalletmanager_.doc

Monday, July 18, 2011

Enabling VNC on Centos/Redhat

Few of my friends asked how to enable VNC access to Linux servers (RHEL/CENTOS). Therefore, I thought it would be helpful to provide the easiest way I figured out to configure VNC server.

1. open a ssh session to the server

2. vi /etc/sysconfig/vncservers
uncomment  the lines that starts with VNCSERVERS= and VNCSERVERARGS[2]
modify the user ID with the user ID you wish to provide access ("root"). exit vi editor.

3. enter vncpasswd and provide a password for VNC access

4. Start and stop VNC Server so that the xstartup file will get created.
enter vncserver :2 to start VNC Server
enter vncserver -kill :2 to kill the vnc server

5. vi xstartup
uncomment the 2 lines that start with unset SESSION... and exec /etc...

6. enter /sbin/chkconfig vncserver on command to start the service on boot.

7. open a VNC client and enter the <IP>:2 then you'll ask for the password set under step 3. 

Monday, July 11, 2011

Extending VLAN cpabilities to VMWare

I have been looking for a solution to have multiple VLANs on the VMWare ESXi server. The server which was allocated to the VMs had only 4 NIC's and we had to setup virtual servers from 5 VLANs. The solution was described in the VMWare ESXi documentation as well. The terminology is called VST (Virtual Switch Tagging).

Since we had 4 NIC ports we connected 3 links from the switch as trunk ports (dot1q, need to make the switch configuration) initially. The other port is kept for the VMWare ESXi management access. This is important to setup the VST in the ESXi server via the vSphere client. Once the ESXi is setup you can include this port also to the NIC load balance team. Following is the list of activities to perform.

Connect to the ESXi server via vSphere Client
Select the server from the left pane and Navigate to the configuration tab
Click on networking under hardware pane
Then click properties > select the VM Network and hit edit
On General tab, change VLAN ID to All(4095)
Navigate to NIC Teaming tab and tick the load balancing and select the first option from the drop down list
Click OK and exit
Now click on Add and create VLAN ID's for Virtual Machine traffic for each VLAN (You need to get the VLAN ID's from the network personnel)

Now you can assign these to relevant virtual machine for connectivity to their respective VLAN's

VMWare P2V conversion Windows XP Activation issue

We were executing a plan to convert all our physical windows XP boxes that are kept inside the server room for various non critical operations on to virtual hosts. At one point we were looking at consolidation options. However, due to the complexity and lack of documentation on implementing the systems made us go into a virtualization option. The physical virtual transition was some what smooth with VMware vCenter Converter Standalone Client (free version). The main challenge we faced was the windows activation issue once the virtual host is started. It didn't allow us to login to the computer at all and we were at a dilemma.

Fortunately, I was able to find a solution for the issue. The reason we faced this issue is due to the OEM licenses installed on the physical machines. When the HW was changed the license need to be reactivated which created a need to purchase licenses. Once the license was purchased we had to follow the following to activate windows,

On the virtual host
Login to the Safe mode
execute the following command on run,
rundll32.exe syssetup,SetupOobeBnk
reboot the host
now you have 30 days to activate windows......

Thursday, May 19, 2011

Automating windows Backups with error reporting

Most organizations are tryng to move out from NTbackup for better managed backup software solutions. However, the legacy software applications and the cost involved in implementing a managed backup solution have forced the organizations to use ntbackups.


One of the biggest challenges faced in automating ntbackup is the error reporting functionality. By default, ntbackup does not support error handling. In otherwords, it cannot execute set of instructions upon error. Therefore, a workaround is necessary to overcome the situation. I was thinking all possible solutions and felt the following as the best suitable solution,


Read the backup log file and count the number of "Backup completed" text. "Backup completed" is written to the logfile for each folder/drive backup item it backups. Therefore, if the count is not equal to the number of folder/drive backup items you could come to a conclusion that there is some issue with the backup.


Following is a sample backup script used for the automation,
@echo off
echo %date% %time%


echo Initiate backup job
C:\WINDOWS\system32\ntbackup.exe backup "@C:\SCRIPTS\DAILY.bks" /t "Friday_File_SVR_BKP" /n "Friday_File_SVR_BKP" /d "Friday_File_SVR_BKP" /v:no /r:no /rs:no /hc:on /SNAP:off /m normal /j "Friday_File_SVR_BKP" /l:s


echo Copy last backup job log to a seperate folder for the emailing purpose.
set srcDir=C:\Documents and Settings\itops\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\
set destdir=C:\Scripts
set lastmod=
pushd "%srcDir%"
for /f "tokens=*" %%a in ('dir /b /od 2^>NUL') do set lastmod=%%a
if "%lastmod%"=="" echo Could not locate files.&goto :eof
echo "%lastmod%"
copy "%lastmod%" "%destDir%"\backup.log


echo if the backup job is unsuccessful send the log via email (7 is the count of backup items)
for /f "tokens=3" %%f in ('find /c /i "Backup completed" "C:\Scripts\backup.log"') do set isComplete=%%f
if %isComplete% LSS 7 C:\Scripts\sendEmail.exe -f <from email> -t <to email> -s 192.168.1.2:25 -u <email subject withing quotes> -m <email body withing quotes> -a "C:\Scripts\backup.log"


:eof
echo  
echo %date% %time%
echo ----------END------------
echo


Hope the article will help you to save your valuable time spent going through the logs to ensure the backup is successful !!! Cheers!!!