Shaxonline !

System Administration, Electronics , Technology , Gadgets and much more…

Getting rid of Cockroaches……

Recently my home was infested with German cockroaches. Hundreds of cockroaches from 2 to 15 mm in size were seen roaming around in the kitchen freely @ night. I never saw that types before and searched on the internet to check their type, and found out that those were German cockroaches.  Although not frightening as that of big Indian cockroach, we were feeling very insecure and used to wash the utensils again before their use.

We had very clean kitchen and also ensured that they find no food, without any success. We tried everything from Anti roach spray to the baking powder formula, everything went into vain. Coincidently we planned the renovation of house at the same time and hoped that this activity will eliminate them. There was no food prepared in the house for almost a month and still they survived.

While searching on internet, I came across some anti-cockroach recipes that use boric powder, but I never tried that considering its toxicity (I have 2yr old daughter). Finally I decided to try it and the results were awesome!. Within 1 and ½ week our house got rid of cockroaches completely !.

Here is how I made it …

  • ½ cup of rice flour.
  • 1 cup of boric powder.
  • ¾ Cup of finely smashed onion or onion chutney, whatever you call it.
  • 1 tsp of milk.
  • Some water.

Mixed it well and filled it in a cone, made of plastic sheet. Cut the sharp end of cone and press the other end of the cone so that the mixture will come out like toothpaste.

Then I applied it on every corner of the kitchen, every hinge of the cupboard and near the wash basin. I also filled up the small holes in the tiles joints with this mixture.

After a week or so, seeing that the roach population is decreasing, I made small balls by making a hard dough (eliminate milk and water) and placed them under cupboards, fridge and stick them under the water purifier.

More and more cockroaches were found dead after this and it took 9 days to eliminate all of them (I guess).

Adding a new disk to Vmware Virtual machine with different datastore and creating the disk descriptor.

This article is ESX server specific and as per my experience, the scenario may be different for different setup.

Recently, i was trying to create a VM disk for one of the Virtual machine. I was assigning a different datastore for this disk, as it was impossible to use the Virtual machine’s datastore. I was getting the “timeout” error everytime and the was not getting created.

Then i created the VM disk using a different Virtual machine in the intended datastore and then moved it to a directory i created. Also ensured that i move two files of .vmdk extention. One of the file is a Disk descriptor file and the other one is a actual Disk file (Flat file).

Reattaching the disk was easy task then.

Creating the disk descriptor.

Secondly, it might happen that you move the Flat file only and loose the descriptor file. Vmware will not recognize the disk without the related descriptor file. Here is a method using which you can recreate the descriptor file easily.

  • e.g. you have a Flat VMDK file called as “Mydisk-flat.vmdk” with 80GB in size.
  • Create a new disk with some other name with following command. Ensure to mention the SCSI controller type correctly (lsilogic or Buslogic).
    vmkfstools -c 1G -a lsilogic ./new_disk.vmdk
  • This will create two files.  new_disk.vmdk and new_disk-flat.vmdk.
  • Delete the file new_disk-flat.vmdk.
  • Open the new_disk.vmdk in Vi editor and replace the disk name with “Mydisk-flat.vmdk” in the line below #Extent description.
  • Next find out actual size of the Mydisk-flat.vmdk and divide the number with 512.
  • e.g the Mydisk-flat.vmdk is of 80GB, then the actual size in bytes will be 85899345920. After dividing it with 512 the value will be 167772160.
  • Enter this value in the extent description. Thus the extent description will look like.# Extent description
    RW 167772160 VMFS “Mydisk-flat.vmdk”
  • Save the file with name “Mydisk.vmdk”.

Attaching this disk will be easy task then.

Cannot connect to Vmware server – kill the hostd

Sometime the Vmware infrastrcture client shows an error -  “Unable to connect to the server, the connection has timed out”.

Simplest solution is to restart the mgmt-vmware and vmware-vpxa services using following commands

service mgmt-vmware restart
service vmware-vpxa restart

However, life isn’t that simple. Restarting the mgmt-vmware service can keep you waiting for hours, as it doesn’t terminate / restart the hostd process.

This can be done by following steps.

Log in as root to the ESX host command-line via the physical console / KVM connection / or through SSH.

Go to the /var/run/vmware directory with the command:

cd /var/run/vmware

Determine the Process ID (PID) management service. View the contents of the vmware-hostd.PID file with the command:

cat vmware-hostd.PID

For example:

[root@myvmwarehost]# cat vmware-hostd.PID
5061[root@myvmwarehost]#

kill the process using the PID.

kill -9 <PID>

e.g. kill -9 5061.

Then restart the vmware-vpxa service.

Connecting to Juniper SSLVPN through Linux CLI.

This post describes the method to get important information to connect to Juniper SSLVPN using it’s Linux Client.

Other than the hostname / sitename, There are four important parameters required.

* Username
* Password
* Realm
* Certificate in der format.

I guess you already have Username / Password for login. Rest two can be acquired using following methods.

* To get the realm, open the internet explorer and access the hostname of the SSLVPN server. Then open the Page source and search for word “realm”, capture the volume.

* To get the certificate in der format, execute following command in console. remember, you must have openssl installed.

This command has been picked up from http://ubuntuforums.org/showthread.php?t=232607&page=28

echo | openssl s_client -connect ive.example.com:443 2>&1 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ | openssl x509 -outform der -out ive.crt

Finally, I’m not responsible if this information causes losses of any kind to anybody…..