Powering on the virtual machine fails with the error: The file specified is not a virtual disk

It happens to when I have migrated the Virtual Machine from One network to another. I followed the procedure as mentioned in the link listed below

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1016838

This issue occurs when the .vmdk descriptor file is corrupt or missing. I my case it was corrupt.

Follow the Resolution heading in above said link. The step by step  procedure is given in the link below

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511

In step 3 Instead of     scsi1.virtualDev = “lsilogic”

My Virtual server show me  scsi1.virtualDev = “lsilogic1068”

So the corresponding command ( vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk ) does not work for me. But i had  replaced the  lsilogic1068 with lsilogic in command and it works fine. Rest is same and i followed step by step

It works awesome!

Have FUN!

Advertisements

Nginx as a Load Balancer

It is very basic setup of Nginx as a  load balancer. I have two Apache servers (web1.meapay.com & web2.meapay.com). Ngnix will act as a load balancer in front of these two servers

I have done it on Debian squeeze. So first we have to install nginx package

#apt-get install nginx

Edit the nginx configuration file. Before editing,  I have copied the original nginx conf file as default.orig

#cd  /etc/nginx/sites-available/

#/etc/nginx/sites-available# cp default default.orig

#vi  /etc/nginx/sites-available/default

upstream mysite {
                server web1.meapay.com;
                server web2.meapay.com;
                }

server {

        server_name  http://www.meapay.com:80;
        #listen   [::]:80 default ipv6only=on; ## listen for ipv6
        access_log  /var/log/nginx/access.log;

        location / {
                proxy_pass http://mysite;
                proxy_set_header   Host $host;
        }

}

#/etc/init.d/nginx restart

Its done.

Have FUN

Reference:

http://mickeyben.com/blog/2009/12/30/using-nginx-as-a-load-balancer/


Mounting RAID array device in /etc/fstab in Debian GNU/Linux

May be helpful for you while mounting RAID array device in /etc/fstab

While making entry in /etc/fstab for newly created RAID device,  we need either device name (/dev/md7) or UUID. I got the UUID using the command

#mdadm –detail /dev/md7

and made the entry in fstab. But it did not worked as per  expectation

Searched Google about the problem as usual. I found that we have to use the UUID provided by the following command

#blkid /dev/md7

not by the command mdadm. Both UUID are different. It works. I have no idea why they are different. So please if you find please tell me as well.

Have FUN! again


Copy GPT Partitioning layout to other hard disk drive

To copy GPT Partition layout to many drives we need sgdisk. sfdisk cant do that.

As of Debian 6.0. Installer does not have sgdisk. So I had rebooted the machine from Gparted live cd. and ran the command given below.

Note that the /dev/sdb is destination drive and source is second device(/dev/sda) (exchange them at your own risk). It will copy partition layout from /dev/sda  to /dev/sdb

#sgdisk -R=/dev/sdb /dev/sda

The command below is required coz the first command copy/assign the same GUID to new device. So to assign another random unique GUID run the following command

#sgdisk -G /dev/sdb

Have FUN!


GigaByte GA-P67A-UD4-B3 Motherboard with Intel i7 restarting

It works for me. Please go ahead at your own risk.

I had assembled the Desktop Machine having GIGABYTE motherboard and Intel CPU 2 days before. It was working fine. Today for some reason I need it to reboot. It starts keep on restarting after initial BIOS Configuration screen. I was not able to go to BIOS configuration. Tried new Power Supply. Disconnected all the components. Tried different RAM slots with different RAM modules. No use.

I Googled about the problem and find the solution at link pasted at the end of the post as reference.

Solution:

1. Power off the Machine

2. Press and hold the Power On/Off button located on the cabinet CPU/BOX

3. While holding  Power On and off button, switch on the power supply for the  computer/cpu from the wall outlet.

4.   When the display appears power off  the computer and on again

5. It will show it is rewriting its flash from backup flash

6. Will up and running fine without any problem

According to the article the problem was due to corrupted BIOS

Have FUN!

Reference: http://forum.giga-byte.co.uk/index.php?topic=6542.0

 


How to Modify Participate in package survey? option in Debian

If by mistaken we had selected “Yes” to Participate in package survey?  instead of “No”, during installation. It can be be modified at later stage by running the command as below

#dpkg-reconfigure popularity-contest

It will show you the same screen as the installation time. So we can select “No” this time

and Have FUN!


Change Debian root password without CD

It Works for me for Debian. Follow at you own risk. More Risk more profit and loss

If you had installed  Debian or any other  GNU/Linux Machine after having all or any one of Green Label/MaximummICE/CarloRossi, most likely the chances are you  have forgetten the root password. If you forget root password for any other reason still you can follow the steps to reset root password

  1.  Reboot the machine (If people are accessing service then they would get disconnected)
  2. At the grub prompt press ‘E’ or ‘e’ to pass kernel perimeters
  3. Go to the line that starts with “Linux”   and add “init=/bin/sh” (without quotes) at the end of the line
  4. Then hold ctrl and press x key to boot the machine
  5. It will take to you # prompt with root privileges.
  6. /  is mount as read only so you have to mount it as read/write

#mount -n -o remount,rw  /

7.    #vi  /etc/passwd

8. Go to the line that stats with “root” and remove “x” from the  second column. Save the            file and reboot the machine/server

9. At login prompt enter “root” as user and you are logged in (it wont ask you password)

10. To change password

#passwd

Enter new UNIX password:

Retype new UNIX password:

11.  Of-course you can  choose easy password  to remember e.g. MagicMoments,  SMIRNOFF, GoldenEagle, RedKnight, KingFisher But very easy for cracker to crack.So choose another one.

Have FUN !