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......