Tuesday, August 5, 2014

Switching Network Category in Windows 2012 R2

Seriously, it is annoying when the rights to change it is taken away from you.

Credit to Charlie Russel, you can change it using Powershell

First, find out what is the InterfaceIndex of the NIC that you are planning to modify:

It will return something similar as below

Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

Once you found the InterfaceIndex, you can use the command below.
Set-NetConnectionProfile  -InterfaceIndex 18 -NetworkCategory Private

Monday, June 23, 2014

Curl showing garbage when downloading a URL

I am new to 'curl'. Late I know but better later than never.

Anyway, I faced an issue downloading from a certain URL where the output, either to a file or the terminal. will show garbage like contents
▒E▒G<3xggy amp="" blockquote="" c="" cr="" cu="" d1="" d="" e="" ey="" g="" h="" hp="" i="" ji="" jzpn="" k="" m="" nbsp="" p="" sf="" u="" uyg="" v="" w="" y="">
▒c▒▒oS▒▒▒!▒U]▒l▒▒▒Vy▒Y▒+N▒݄҅▒▒▒$+▒]▒▒▒,▒q▒▒▒▒{BJ▒▒#p ▒V▒~]?▒j▒▒▒5▒?▒4▒4▒q▒lS▒▒{4m▒▒▒

It was puzzling because there were no issues viewing the content when using a standard browser.

Anyway, the issue is actually because the content on that URL is compressed, therefore you have to issue the '--compressed' option to download such content with curl.

So if a certain URL is returning garbage, check the header. You can use the '-D ' option to download the header to a file first and check if the contents are actually compressed, as shown below. 

HTTP/1.1 200 OK
Server: HP HTTP Server; 
Content-Type: text/xml
Content-Encoding: gzip
Content-Length: 5392
Cache-Control: must-revalidate, max-age=0
Pragma: no-cache

Wednesday, February 26, 2014

Citrix XenServer host in a pool showing "No interface present"

If a host in your pool is showing "No interface present", you can perform the following steps

1. Check if the host is in emergency mode
xe host-is-in-emergency-mode 
2. If the output is "True" then change it to "False" by running
xe pool-emergency-transition-to-master
3. Ensure host is no longer in emergency mode

4. Restart toolstack

Applying updates on open source version of Citrix XenServer 6.2

Citrix XenServer 6.2 is now open source therefore for support and maintenance you will have to get the paid version which basically means buying a license for your XenServer.

Although all features are enable on the open source version of XenServer itself, some features are disabled when it comes to managing them using Citrix tools like XenCenter and one of the affected feature is the installation of patches. You will notice that the option to apply patches on your servers are greyed out.

You can however apply the patches manually. All your need to do is the get to the server console and run a few commands.

Before that, transfer the updates to the server or pool master using transfer tools like Filezilla and then run the following command

xe patch-upload file-name=filename location

The command above will provide you with a UUID which you will use when you run the next command, if you are applying on a pool

xe patch-pool-apply uuid=UUID

If you are applying for a single server, then you will need the host UUID which you can find through 

XenCenter. The command will then be

xe patch-apply uuid=‹UUID› host-uuid=‹host-UUID›

You can monitor the updates progress in XenCenter. If the server is showing the arrow down icon, the updates are being applied will turn back to a green circle icon once it is done. 

For can find more details here

Tuesday, January 7, 2014

Installing IBM Domino on Linux

You may face this issue where the installation of IBM Domino just stopped after you've made the choice of either a graphical or console installation mode as shown below

linux # ./install

IBM Domino for Unix Install Program

Your DISPLAY is currently set to ::1:1:0
Answer Yes to continue in console mode
Answer No to exit application.
Do you want to continue installation in console mode?[Yes]

Continuing in console mode
linux #

So instead of running the install command, run the following command instead and the graphical installation should start

linux # java -cp tools/setup.jar run

You can also start in console mode if you prefer by running the command below.

linux # java -cp tools/setup.jar run -console

If you face issues with either command, turn on the debug mode.

linux # java -Dis.debug=1 -cp tools/setup.jar run -console