Sunday, 12 May 2013

Slow me down Lord 主,讓我慢下來


Slow me down Lord - by Wilfred Arlan Peterson 

Ease the pounding of my heart by the quieting of my mind.

Steady my hurried pace with a vision of the eternal march of time.

Give me amid the confusion of the day, the calmness of the eternal hills.

Break the tension of my nerves and muscles with the soothing music of the singing streams that live in my memory.

Help me to know the magical restoring power of sleep.

Teach me the art of taking minute vacations - of slowing down to look at a flower, to chat with a friend, to pat a dog, to read a few lines of a good book.

Slow me down Lord and inspire me to send my roots deep into the soil of life's enduring values that I may grow toward the stars of my greater destiny. 

主, 讓我慢下來 - 王英偉 阿蘭 彼得森

讓我安靜的腦海紓緩我心裡的衝擊。
在永恆的時間旅程裡讓我匆匆的腳步變得穩定 。


讓平靜的永恆的小山驅散哪混亂的一天。
讓我記憶中舒緩的音樂去打破我的神經和肌肉的緊張。
幫助我知道睡眠的神奇恢復能力。


教我用一分鐘假期的藝術 - 放慢看一朵花,與朋友聊天,拍拍狗,讀幾行一本好書。


主, 讓我慢下來,激勵我讓我的根深深地扎入人生永恆價值的土壤,讓我可朝著更大的宿命成長。


Thursday, 9 May 2013

ESXi 5.1 esxcli network commands

If you want to change the vmkernel (or the management network IP) using command lines, here is the tips and steps;

ESX Console 
  1. logon to the console screen of the ESXi 5.1 Server
  2. press F2 to customize system
  3. enter login name as root
  4. enter your root password
  5. On the System Customization screen select "Troubleshooting Option"
  6. Enable ESXi shell
  7. If you wnat to execute remotely then Enable SSH 
  8. press ESC 2 times to return to the Main Screen
  9. press ALT F1 to goto the console screen
  10. login as root with password, then you will see the command prompt "~ #"
Command Line
On the command line, list the  network adapters like below for checking;

~ # esxcli network nic list
Name    PCI Device     Driver  Link  Speed  Duplex  MAC Address         MTU  Description
------  -------------  ------  ----  -----  ------  -----------------  ----  --------------------------------------------------------
vmnic0  0000:003:00.0  tg3     Up     1000  Full    00:23:7d:df:9d:3a  1500  Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet
vmnic1  0000:003:00.1  tg3     Up     1000  Full    00:23:7d:df:9d:3e  1500  Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet

First change vmnic1, (DON't change vmnic0 because this is your current connection if using remote ssh)
To change vmnic1 settings, please use below syntax;

Usage: esxcli network ip interface ipv4 set [cmd options]

Description:
  set                   Configure IPv4 setting for a given VMkernel network interface.

Cmd options:
  -i|--interface-name=<str>
The name of the VMkernel network interface to set IPv4 settings for. This name must be an interface listed in the interface list command. (required)
  -I|--ipv4=<str>       
The static IPv4 address for this interface.
  -N|--netmask=<str>    
The static IPv4 netmask for this interface.
  -P|--peer-dns         
A boolean value to indicate if the system should use the DNS settings published via DHCP for this interface.
  -t|--type=<str>       
IPv4 Address type :      dhcp: Use DHCP to aquire IPv4 setting for this interface.     none: Remove IPv4 settings form this interface.     static: Set Static IPv4 information for this interface. Requires --ipv4 and --netmask options. required)

for example to change the adapter vmk1 settings to use static IPV4, IP address and netmask is 172.17.23.35 255.255.255.0
use below command;

~ # esxcli network ip interface ipv4 set -i vmk1 -I 172.17.23.35 -N 255.255.255.0 -t static

then list the gateway for checking;

~ # esxcli network ip route list

next, change the gateway;

~ # esxcli network ip route ipv4 add -g 172.17.23.1 -n default

when you are ready to change the first adapter vmk0, use the same command syntax; 
for example IP address and netmask is 172.17.23.25 255.255.255.0

~ # esxcli network ip interface ipv4 set -i vmk0 -I 172.17.23.25 -N 255.255.255.0 -t static

again, change the gateway;

~ # esxcli network ip route ipv4 add -g 172.17.23.1 -n default

Test by pinging the 2 IP addresses above from another machine to see if both vmk0 and vmk1 are responding correctly.

Last thing to do, remember to update your internal DNS to point to the right IP address of the ESXi server.
Also go back to the console screen of the ESX server, exit the shell and disable ESXi shell.

Copy Blackberry contacts

Want to copy /transfer Blackberry contacts, notes, calendar, tasks ... etc from one Blackberry phone to another?
Most people will answer below :

  1. for contacts, copy from Blackberry address book to the SIM card, then put the SIM card into the new phone and start import from the SIM
  2. for contacts, notes, calendar, tasks ... etc, you can sync to the outlook from one Blackberry phone to the PC, then sync them back from PC to another Blackberry phone

What about the phone settings, alarms, defined keys, password, ring tone, bookmark settings ... etc

A quick and easy way to do is using the Blackberry Desktop Manager built-in function 
--> Device switch wizard

You can use the device switch wizard to import data from a BlackBerry® device, Palm® device, or Windows Mobile® powered device to another BlackBerry device.

If you switch between BlackBerry devices, the device switch wizard is able to import supported email messages, organizer data, third-party applications, and BlackBerry® Enterprise Server connection options from the current device to your new device. Basically all previous phone settings and data will be transfered to the new device in one go.

If you switch from a Palm device or a Windows Mobile powered device to a BlackBerry device, the device switch wizard is will import the organizer data from the current supported device to the new BlackBerry device.

Follow below Steps;

  1. Connect your current device and the new device to your computer e.g. via USB cable
  2. Open the BlackBerry® Desktop Manager, check the devices are all detected correctly
  3. Click Device Switch Wizard
  4. Select the correct switch (either the left or the right option) Click Start
  5. Select the From and To device and their pin
  6. Start transferring (take a minute or longer depends on your data size)
That's it.


Wednesday, 8 May 2013

IPSEC service stopped


What
After rebooted the Windows Server, IPSEC service stopped, cannot ping internal IP or ping out to the internet.

Error Messge / Symptom
the following events may be logged in the server's System log:

Event Type: Error
Event Source: IPSEC
Event Category: None
Event ID: 4292
Date: Dateime
Time: Time08
User: N/A
Computer: COMPUTER_NAME
Description:
The IPSec driver has entered Block mode. IPSec will discard all inbound and outbound TCP/IP network traffic that is not permitted by boot-time IPSec Policy exemptions.;

Solution / Fix
This problem can occur if the IPSec\Policy\Local registry key is deleted or when there is a corrupted file in the policy store. One typical casue is running out of space in Drive C:, the OS disk partition.


Please follow below steps to remediate :
  1. Delete the local policy registry subkey. To do this, follow these steps: 
    1. Click Start, click Run, type regedit in the Open box, and then click OK.
    2. In Registry Editor, locate and then click the following subkey: 
      HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\IPSec\Policy\Local
    3. On the Edit menu, click Delete.
    4. Click Yes to confirm that you want to delete the subkey.
    5. Quit Registry Editor
  2. Rebuild a new local policy store. To do this, Click Start, click Run, type regsvr32 polstore.dll in the Open box, and then click OK.
  3. Verify that the IPSEC Services component is set to automatic, and then restart the Server.

vCentre server failed to start


What After rebooted the Windows Server 2008, vCentre server failed to start;
  • the vSphere client cannot connect to vCenter Server
  • remote desktop connect to the vCenter Server and found that VirtualCenter Server service did not start, even manually restart it, still fail
Error Messge / Symptom
  • found a Microsoft Windows Event error in the system log - The Event properties - Event 7024, Service Control Manager
  • The VMware VirtualCenter Server service terminated with service-specific error The system cannot find the file specified. 
  • If vCenter Server is using Microsoft SQL, the vpxd.log shows the error:
    ODBC error: (08001) - [Microsoft][ODBC SQL Server Driver][DBMSLPCN]SQL Server does not exist or access denied

Solution / Fix
The password accessing the VCDV could be corrupted; need reset
Click Start, then type cmd in the search box.
  1. When cmd.exe appears, right-click it and choose Run as administrator. The command prompt window opens.
  2. Navigate to the directory in which vCenter Server is installed:
    • In VirtualCenter 2.0.x, it is installed by default in:
      C:\Program Files\VMware\VMware VirtualCenter 2.0\
    • In VirtualCenter 2.5.x, vCenter Server 4.x and 5.x, it is installed by default in:
      C:\Program Files\VMware\Infrastructure\VirtualCenter Server\
  3. Run the command:
    vpxd.exe -p
  4. When prompted, enter the new password and press Enter.
  5. Retype the pasword and press Enter again to complete the password change.
    Note: You must change the password through the command line, as it is encrypted in the registry.

Tuesday, 7 May 2013

Wipe the Blackberry phone

To reset / wipe completely the Blackberry phone ( e.g. Curve 8500/9300 series)

If you want to completely reset your blackberry to factory default you need to wipe it.
Follow below steps:
  1. Turn on your Blackberry phone
  2. Go to Menu
  3. Go to option
  4. Security options
  5. Security wipe
  6. Check and mark all that is required to be wiped / reset
    • Emails, Contacts, etc
    • User Installed Applications
    • Media Card
  7. Enter the word "blackberry" in the space provided
  8. Select wipe

Then the Blackberry wipe process starts and it will reset to factory setting after a few minutes reboot.

Monday, 6 May 2013

Unlock Blackberry 9700

Below are steps to follow in order to unlock the Blackberry phone.

Blackberry 9000 / 9700 / 8900 / 88xx / 83xx Curve Unlock Code Entry Instructions:
First get the unlock code from your current service provider, you need to tell them your phone IMEI number.

Then enter Unlock Codes on BlackBerry phone:
  1. Go to settings menu => and then Options.
  2. Select Advanced options => and then Sim card.
  3. Type MEPD using your Blackberry keyboard (NOTE: You will not see any text appear on the screen while typing MEPD).
  4. Type MEP then [ALT BUTTON] then 2 on your Blackberry keyboard (NOTE: You will not see any text appear on the screen while typing MEPD).
  5. You should be presented with a prompt "Enter Network MEP Code".
  6. Type in the unlock code and press in the track wheel / jog dial to confirm. Your phone is now unlocked
  7. You should see the message "code accepted"

Saturday, 4 May 2013

Export Outlook Notes to Text file

If you want to export or convert your outlook notes to a text file from your outlook client, please follow below steps. You don't need to have Visual Basic knowledge because the steps and codes are all here:

  1. First create a folder in your C: drive e.g. C:\foldername\notes
  2. Open your Outlook client, then go to your notes folder.
  3. Press ALT-F11 which will open Outlook's Visual Basic window. If it does not open, be sure you clicked on the top bar of the Outlook window and press ALT-F11 again.
  4. On the top toolbar, click on Insert and Module. You should see a new window pane open labelled Project1, Module1.
  5. Copy the code listed below and paste it in the Module1 window pane. (this code will export the outlook notes to text files)
  6. On the top toolbar, click on Run and then click on "Run Sub/Userform".
  7. A window will pop up asking you to select the folder where your Outlook Notes are located. Select the Notes folder and then select OK.
  8. The Notes will be exported at this point. "Running" will appear next to "Microsoft Visual Basic" window name at the top of the screen and disappear when the notes are exported successfully.
  9. Close the Microsoft Visual Basic window.
  10. Then Close Outlook. You will receive a popup window asking if you want to save the VBA project. Answer No unless you want to do this again in future.
  11. Check in the Notes folder on the e.g. c:\foldername\notes to find your exported notes in text format.

Sub NotesToText()
Set myNote = Application.GetNamespace("MAPI").PickFolder
For cnt = 1 To myNote.Items.Count
noteName = Replace(Replace(myNote.Items(cnt).Subject, "/", "-"), "\", "-")
myNote.Items(cnt).SaveAs "c:\foldername\notes\" & noteName & ".txt", OlSaveAsType.olTXT
Next
End Sub
 
OR
 
/*with error checking*/
Sub NotesToText()
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\foldername\filename1.txt", True)
Set myNote = Application.GetNamespace("MAPI").PickFolder
For cnt = 1 To myNote.Items.Count
noteName = Replace(Replace(myNote.Items(cnt).Subject, "/", "-"), "\", "-")
a.WriteLine (noteName)
myNote.Items(cnt).SaveAs "c:\foldername\notes\" & noteName & ".txt", OlSaveAsType.olTXT
Next
End Sub
 
 

T-Mobile (or EE) Voicemail setup

Below T-Mobile (or EE) Voicemail setup procedure applies to UK only;

To set up or change your PIN for EE, T-Mobile or Orange voicemail service, please follow below steps from your phone;
  1. Press and hold 1 on your phone, or dial 07953 222222 from another phone to get to your voicemail
  2. You will automatically hear any new messages you may have, or otherwise you will go straight to the main menu
  3. If you are listening to messages and want to go to the main menu just press * on your phone
  4. Then press 3 to get to the settings and features
  5. Now press 3 to set your new voicemail PIN
  6. Enter 4 digits for your new PIN and you will received a message to tell you have made the change
You can store this number 07953 222222 or call +44001+(your mobile number) to access your voice mail.

If you're in the UK dial 07953 222222. From another country dial +44 7953 222222.
If you’re using another EE phone,
press and hold 1 to get to the voicemail menu,
then press * until you are asked to enter your phone number,
enter your EE phone number,
then press the # key,
then enter your voicemail PIN and press the # key,

You'll now be able to listen to your voicemail messages.

To clear the voicemail notification 
  1. Call your voicemail and leave a new message
  2. Call and listed to the entire message
  3. When prompted, press '7' to delete
  4. Press'*' (star key) to exit to the main voicemail menu, then hang up

Wednesday, 1 May 2013

VMware Update Manager cannot remediate ESX host

What
when you do the ESX/ESXi host remediation using VMware Update Manager fails;
 
Error Message / Symptom
Cannot remediate host "hostname" because it is a part of a HA admission control enabled cluster.
 
Solution / Fix
temporary disable strict admission control: 

Right-click the cluster and click Edit Settings.
Under Cluster Features, click VMware HA.
Under Admission Control, select Disable: Power on VMs that violate availability constraints.
Click OK.  

OR
temporary disable VMware HA:

Right-click the cluster and click Edit Settings.
Under Cluster Features, select Turn off VMware HA.
Click OK.

If you do not want to disable strict admission control or HA at the cluster level, you can
 
  1. Create a new Test Cluster in the Data centre
  2. Move the ESX host being remediated into the new Cluster
  3. Remediate the host

If the remediation completes successfully, the ESX host can now be moved back into the original HA cluster.