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!


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  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/2009/12/30/using-nginx-as-a-load-balancer.html


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 !


Installing Driver for Broadcom NIC during Debian installation

Installer prompted for driver for Broad com NIC during installation. As the drivers are available only via non-free. So were not available on Installer CD/DVD. Installer ask if this driver is on external USB stick etc. I was lazy and always use Pauls’ USB. Today Paul forget his USB at home. I find the deb package on Debian website. Downloaded and copied and extracted to my USB. Installer refused to get driver from USB. I thought it may not be on proper location. So i copied driver in another directory and on the root (without any directory) of USB as well. Still installer refused to get the driver.

I Googled again and what i find is….

My USB key has NTFS file system and installer can read from FAT only

Solution: Backed up all the USB data. Formatted USB as FAT. Copied Broadcom NIC  Firmware files to USB. Tried again. Every thing was fine.

Be careful while Installing driver from external media and have Fun..


SSH Login to GNU/Linux Machine from Windows Machine using Winscp

Step by step procedure to setup SSH key based Login from Windows Machine to GNU/Linux machine (Follow at your Own risk)

  1. Create a ssh key pair using GNU/Linux as follows

This will create two files (keypair) id_rsa (private key) and id_rsa.pub (public key) in .ssh directory under user’s home directory

          1. Copy public key (id_rsa.pub) to the users home directory on GNU/Linux Machine in following path. authorized_keys is file name contains the public key./home/username/.ssh/authorized_keys
          2. Copy the private key file (id_rsa) to windows computer using usb or another method what ever is good for you.
          3.  To login to GNU/Linux machine from windows machine, it is required to convert the private key (id_rsa) to .ppk format. For that we need a software called “Puttygen”. So go to windows machine and download and install the PuttyGen (puttygen.exe) software from the link below http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
          4. Convert the private key to .ppk format using the following information. Open the Puttygen that has been recently installed
          5. Click on Load
          6. Select the file name id_rsa (private key file not the public one). Make sure to change the “Files of Type” option to “All Files (*.*).
          7. Click on open and you will get the following screen
          8. Click on “Save Private key” button
          9. Passphrase is a kind of password on keys. Select “Yes” if you dont want want any password on ssh keys. If you select no you have to remember this password all the times.
          10. Now we need a client application (Winscp or Filezilla or another you like). I download the Winscp form the link below. If you like, you can down load from here as well

http://winscp.net/download/winscp434setupnocandy.exe


12.    Finally Open Winscp and login to the Linux machine using following information. Note that, you have to attach a .ppk (private key file) using the attach button under “Priavte Key File:” option


Installing gallery3 in debian

I was getting the following error during  installation/accessing web interface of Gallery 3 under Debian squeeze

Gallery 3 requires a MySQL database, but PHP doesn’t have either the MySQL or the MySQLi extension.

You can try the following

#apt-get install php5-mysql

#/etc/init.d/apache2 restart

 

Have fun!

 


Follow

Get every new post delivered to your Inbox.