2015年11月17日 星期二

2015年10月20日 星期二

How to check BMC ip by windows local ipmi command

How to check BMC ip by windows local ipmi command

#ipmitool -I ms lan print 1
               (-Interface)

How to check fru data by windows local ipmi command

How to check fru data by windows local ipmi command

Under windows to check fru by ipmi command
#ipmitool -I ms fru print 0






Dump current system fru data

#ipmitool   -I ms  fru read 0 fru.bin
#ipmitool   -I ms  fru print

All fru data will be saved in "fru.bin".

2015年10月19日 星期一

How to update Intel i350 fw & MAC address

How to update Intel i350 fw


Boot to UEFI shell
#eeupdate64e.efi /D I350BT2_0324.hex /NIC=1

 MAC address
#eeupdate64e.efi  /NIC=1 /MAC=665544332211
#eeupdate64e.efi  /NIC=2 /MAC=665544332212

After flash completely, AC system

2015年9月10日 星期四

How to flash LSI 2308 fw

How to flash LSI 2308 fw


Boot to UEFI shell, enter to sas2flash tool folder
sas2flash -o -e 7                                                         # Clear all image in flash.#
sas2flash -o -f xxxx.fw                                        # Flash FW.  #
sas2flash -b mptsas2.rom                                           #Flash BIOS.

sas2flash -o -sasadd 0000111122225678                #Flash SAS address.#

2015年8月16日 星期日

linux Console_Redirection -RHEL 7.x

linux Console_Redirection -RHEL 7.0





7.5 above

1.Configuring GRUB 2
#vim /etc/default/grub
GRUB_TERMINAL="serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

2.Add console=ttyS0,115200n8 to kermel
legacy mode
#vim /etc/grub2.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

UEFI mode
#vim /etc/grub2-efi.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

3.If BIOS is legacy mode
#grub2-mkconfig -o /boot/grub2/grub.cfg
If BIOS is UEFI mode
#grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
4.Reboot



-------------------------------------------------------------------
7.0
1.Configuring GRUB 2
#vim /etc/default/grub
GRUB_TERMINAL="serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

2.Add console=ttyS0,115200n8 to kermel
#vim /etc/grub2.cfg
linux16      /vmlinuz-3.10.0-0.rc4.59.el7.x86_64 root=/dev/mapper/rhel-root ro rd.md=0 rd.dm=0 rd.lvm.lv=rhel/swap crashkernel=auto rd.luks=0 vconsole.keymap=us rd.lvm.lv=rhel/root rhgb quiet
console=tty0 console=ttyS0,115200n8

3.If BIOS is legacy mode
#grub2-mkconfig -o /boot/grub2/grub.cfg
If BIOS is UEFI mode
#grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
4.Reboot




2015年8月6日 星期四

How to check/install RAID(LSI 2308) driver under ESXi

How to check RAID(LSI 2308) driver version under ESXi

Check driver version
#esxcli storage core adapter list
#esxcli software vib list | grep mpt2sas


Upload driver package to ESXi (By vsphere or USB key)
#esxcli software vib install –viburl file:/tmp/DRIVERVERSION.vib

2015年5月31日 星期日

How to install RHEL 7/ SLES 11 12 UEFI mode with ESRT2 raid

How to install RHEL 7/ SLES 11 12 UEFI mode with ESRT2 raid

RHEL 7.x UEFI
linuxefi /images/pxeboot/vmlinuz XXXXXXXXXXXXXXXXXXXXX quiet dd modprobe.blacklist=achi,isci nodmraid

SLES 12 UEFI
1.press "e" to edit command
2. linuxefi /boot/x86_64/loader/linux splash=silent driverupdate=1 brokenmodules=achi



SLES 11 UEFI
1. press "e" to edit command
2. linuxefi /boot/x86_64/loader/linux driverupdate=1 brokenmodules=ahci

2015年4月22日 星期三

效率達人用的Excel

C01
Tip02:快速複製上方及左方的資料
 [Ctrl + D] 鍵可快速複製上方儲存格,而[Ctrl+R]鍵則可快速複製左方儲存格的資料
Tip03:快速輸入日期與時間
 [Ctrl +;] 鍵即可快速插入今天的日期,而按下[Ctrl+Shift+;] 鍵則可以快速輸入現在的時間
Tip05:快速選取表格中的欄/列
 [Ctrl+Shift+方向]鍵,如此該儲存格之後到資料結束的欄或列,就會呈現被選取起來的狀態
Tip06:快速移到目前資料區域的邊緣
[Ctrl+方向] 鍵,就能快速進行移動到表格的上下左右的位置
Tip07:快速移到工作表開始處與最右下角輸入有資料的儲存格
若想要快速移動至右下角輸入有資料的儲存格時,按[Ctrl+End]鍵
[Ctrl+Home]鍵則可以將目前選取中的儲存格位置立刻改為工作表開始處
Tip09:快速移到上一個或下一個工作表
首先選取活頁簿中的任一工作表,利用[Ctrl+PgDn]鍵跳至下一個工作表,若是要跳至上一個緊鄰的工作表可以利用[Ctrl+PgUp]
Tip10:快速插入新的工作表
直接在鍵盤上按下[Shift+F11]鍵,Excel馬上就幫你新增一個工作表
Tip13:快速插入SUM函數
[Alt+ =]鍵
Tip15:快速顯示[插入函數]對話方塊
[Shift+F3]
Tip16:快速顯示開啟[儲存格格式]對話方塊
[Ctrl+1]  1=>數字
Tip17:快速變更成百分比格式
[常用]索引標籤內的%,或是[Ctrl+Shift+%]
Tip18:快速去除儲存格的框線
[Ctrl+Shift+_ ]
Tip23:快速繪製出直條圖
選取圖表的資料來源後,按下F11
Tip24:快速執行重複動作
F4
------------------------------------------------------------------------------------
C03
Tip01:利用浮動工具列設定格式
對儲存格點選右鍵,在畫面上就會顯示出浮動工具列
Tip07:對儲存格設定漸層顏色
選取儲存格的狀態下按下[常用]索引標籤=>字型群組內右下角的"".此時,當跳出[儲存格格式]對話方塊後切換到[填滿]索引標籤中.當再按下[填滿效果]按鈕時,則就會出現[填滿效果]對話方塊.在[色彩1]與[色彩2]中分別指定想要呈現出的2個顏色,並指定下方的[網底樣式]與[變化],確定好範例中呈現的效果後按下[確定]按鈕
Tip08:輸入不影響儲存格的長篇文章
按下[插入]索引標籤=>[文字]群組=>[文字方塊]按鈕"",利用滑鼠拖曳出文字方塊的大小
為了不讓文字方塊的外框顯示出來,要在選取文字方塊的狀態下,在[繪圖工具-格式]索引標籤=>[圖案樣式]群組中,將[圖案外框]設定成[白色,背景1]
Tip09:Excel直接幫你做心算
直接選取你想進行計算的儲存格,看看右下角的地方,是不是有看到Excel已經幫你把平均值.個數.加總等都顯示出來了
--------------------------------------------------------------------------------------
C04
Tip04:套用預設的格式化為表格
[Ctrl+L] 或 [Ctrl+T]
Tip05:將表格轉換為一般的範圍
按下[資料表工具-設計]索引標籤=>[工具]群組=>[轉換為範圍]按鈕,在跳出的確認方塊點選[是]按鈕,即可將表格轉換為一般範圍
Tip06:以橫條來顯示數值大小
利用滑鼠選取想要顯示出資料橫條的儲存格範圍, 按下[常用]=>[樣式]群組=>[設定格式化的條件]按鈕,然後在[資料橫條]選向下選擇想要的橫條色彩
Tip07:強調其數值大於特定值的儲存格
選取儲存格範圍後,按下[常用]索引標籤=>樣式群組=>[設定格式化的條件]按鈕=>[醒目顯示儲存格規則]選項=>[大於]選項
Tip08:強調前幾名或後幾名的資料
選擇[常用]=>[樣式]群組=>設定格式化的條件按鈕=>[頂端/底端項目規則]=>[前10個項目]選項
Tip13:預防錯誤的資料驗證功能
按下[資料]索引標籤=>[資料工具]群組=>[資料驗證]按鈕"",顯示[資料驗證]對話方塊
Tip14:製作下拉式選單
按下[資料]索引標籤=>[資料工具]群組=>[資料驗證]按鈕"",將[儲存格內允許]設定為[清單],在將[來源]輸入上清單上想顯示的資料,個項目以[,](半形逗號)區分,最後按下[確定]按鈕
Tip15:將欄與列的資料替換
利用滑鼠拖曳選取要將欄與列替換的表格,進行複製.貼上表格的第一個儲存格上點選右鍵,選擇[選擇性貼上]=>[轉置]選項
----------------------------------------------------------------------------------
C07
Tip05:輸入日期-TODAY
儲存格內輸入[=TODAY()]
Tip07:加總符合條件的資料-SUMIF
如果符合XXX,就進行加總 (B4:B17,B19,E12:E17)
                                                 (Range,Criteria,Sum_range)
Tip08:計數符合條件的資料個數-COUNTIF
按下公式索引標籤=>函數程式庫群組=>其他函數-統計按鈕""內的COUNTIF函數
(B4:B17,B19)
(Range,Criteria)
Tip09:滿足條件的切換處理-IF
按下[公式]索引標籤=>[函數程式庫]群組=>[邏輯]按鈕""內的[IF函數].在跳出[函數引數]對話方塊後,在[Logical_test]指定判斷的比較運算式;在[Value_if_true]指定條件成立的顯示;在[Value_if_false]指定條件未成立的顯示,最後在按下[確定]按鈕就完成設定了
IF(B4>=100,"達成","沒有達成")
Tip13 :計算星期數-WEEKDAY
WEEKDAY(A3)  A3必須有輸入日期
----------------------------------------------------------------------------------
C09
Tip02:設定檔案或網頁的超連結
Ctrl+K
Tip04:利用多重視窗複製資料
[檢視]索引標籤=>[視窗]群組=>[並排顯示]按鈕









2015年4月2日 星期四

How to check cpu frequency & memory usage under linux

How to check cpu frequency & memory usage under linux

CPU
#watch -n 1 "cat /proc/cpuinfo | grep -i mhz"

Memory
#watch -n 1 free


2015年3月29日 星期日

How to login ubuntu with "root" account

How to login ubuntu with "root" account

1.Login with "user" account
2.# sudo passwd root
3. enter password
4. repeat password
5. Ctrl+Alt+F3
6. Login with "root"

2015年3月18日 星期三

The iSCSI boot does not work on RHEL7 with a static IP configured.

The iSCSI boot does not work on RHEL7 with a static IP configured.
from http://support.lenovo.com/gb/en/documents/ht100887


  1. Configure the iSCSI adapter and enable the boot from SAN feature.
  2. Enter the BIOS and change the boot mode to Legacy.
  3. Boot into the RHEL7.0 installation DVD and configure the NIC with a static IP address.
  4. Add a remote iSCSI target as a disk.
  5. Reboot after the installation completes and boot up will fail with the following error message:
[   2.375332] i8042: No controller found
[   2.592960] dracut: FATAL: For argument 'ip=::::localhost.localdomain:ens7:none'\nValue 'none' without static configuration does not make sense
[   2.593074] dracut: Refusing to continue
[   3.197719] System halted.

Workaround
iSCSI boot will succeed when adding the client IP address to the /boot/grub2/grub.cfg file.
Grub configuration files can be modified at the end of installation before rebooting.
To go to the shell and switch to the tty2 terminal (Ctrl-Alt-F2) or from the tmux screen on tty1, press Ctrl-B.  Then, change the configuration files of the installed system root mounted to /mnt/sysimage (eg /mnt/sysimage/boot/grub2/grub.cfg).
Example:
Before:
linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=956c4dbb1-b287-42ba-94ec-f3c6b60c3361 ro vconsole.keymap=jp106 ip=::::localhost.localdomain:ens7:none... initrd16 /initramfs-3.10.0-123.el7.x86_64.img
After:
linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=956c4dbb1-b287-42ba-94ec-f3c6b60c3361 ro vconsole.keymap=jp106 ip=192.168.122.10:::255.255.255.0:localhos... initrd16 /initramfs-3.10.0-123.el7.x86_64.img
Additional Information
This is a known issue of RHEL7.0.  This issue will be resolved in RHEL 7.1.

iSCSI CHAP

http://blog.csdn.net/sinchb/article/details/8433994#t10

1.What is CHAP?

Challenge-Handshake Authentication Protocol
iSCSI initiators and targets prove their identity to each other using the CHAP protocol, which includes a mechanism to prevent cleartext passwords from appearing on the wire.

2. iSCSI support two tpye chap authentication:

Initiator authentication和Target authentication

2.1 Initiator authentication

    When initiator(SUT) connect to target, initator should provide user name and password to target. The user name which initiator provdie is "incoming" account.
 Initiator authentication can  authentication independently, it call " Uni-directional Authentication",One way authentication

2.2 target authentication

    When initiator connect to target, target should provide user name and password to initiator. Tis is "outcoming" account

    target authentication have to authentication on both  initiator and target , it call " Bi-directional Authentication",Mutual  authentication
    iSCSI CHAP password length requirement must have 12~16 words

2015年3月13日 星期五

error 'Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem" on ESXi

 error 'Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem" on ESXi

The disk I was using had existing partitions (a Linux swap partition and a Linux MD5 RAID partition). 
Please manually delete the partitions logged in as root to ESXi shell.

Useful commands:
# esxcfg-scsidevs -l
this lists the disk devices, the device file will be /dev/disks/<NAME>
output looks like:
t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Device Type: Direct-Access
   Size: 305245 MB
   Display Name: Local ATA Disk (t10.ATA_ST3320620AS_6QF1PZXB)
   Multipath Plugin: NMP
   Console Device: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Devfs Path: /vmfs/devices/disks/t10.ATA_____ST3320620AS_________________________________________6QF1PZXB
   Vendor: ATA       Model: ST3320620AS       Revis: 3.AA
   SCSI Level: 5  Is Pseudo: false Status: on
   Is RDM Capable: false Is Removable: false
   Is Local: true  Is SSD: false
   Other Names:
      vml.010000000020202020202020202020202036514631505a5842535433333230
   VAAI Status: unknown


# partedUtil get /dev/disks/t10.ATA_...
this shows the partitions on the device
output looks like:
38913 255 63 625142448
1 63 514079 130 128
2 514080 625137344 253 0

this disk has 2 partitions, numbers 1 and 2

# partedUtil delete /dev/disks/t10.ATA_... 2
deletes partition 2

# partedUtil delete /dev/disks/t10.ATA_... 1
deletes partition 1

If partedUtil doesn't work , pleate try "fdisk /dev/disks/t10.ATA......."  to delete partition.

2015年3月12日 星期四

How to execute Intel DCM (DataCenterManager)

How to execute Intel DCM (DataCenterManager)
Install this package on client with windows OS

1.Install Intel DCM
2.Install adobe flash
3.Open web browser
put in http://"computer-name":8688/DataCenterManager
4.Configuration=>Add group
5.Group=>Network discovery
Put in search ip address, BMC user name and password
6.Waiting for a few minutes, you can see the data change.

2015年3月11日 星期三

How to flash Primary/Backup BIOS from recovery mode (Intel platform)

How to flash Primary/Backup BIOS from recovery mode (Intel platform)

1.Adjust jumper to recovery mode
2.Boot to EFI shell

(大小寫有分別)
3.iflash32.efi -u xxxx.cap UpdateBackupBios

4.Adjust jumper to normal mode.

2015年2月12日 星期四

Migrating a virtual machine in vSphere 5.x fails with the error: The operation is not allowed in the current connection state of the host

Migrating a virtual machine in vSphere 5.x fails with the error: The operation is not allowed in the current connection state of the host


Symptoms

  • Cannot migrate a virtual machine in a vSphere 5.x environment.
  • Migrating a virtual machine fails with the error:

    Relocate virtual machine
    The operation is not allowed in the current connection state of the host
    Time: xx/xx/xxxx xx:xx:xx
    Target: xxxxx
    vCenter Server: xxxxx
  • The Summary tab of the powered on virtual machine reports this information:

    • CPU Usage - 0 MHz
    • Memory Usage - 0.00 MB

Resolution

To resolve this issue, perform these steps, verifying if the issue is resolved after each step:
  1. Restart the VMware VirtualCenter Server Service.
  2. Restart the Management agents on the ESX host running the virtual machine. For more information, see Restarting the Management agents on an ESXi or ESX host (1003490).
  3. Disconnect and reconnect the ESX host that is running the virtual machine to force vCenter Server to retrieve an updated set of data relating to the objects registered to the host.

VM with Windows 2008/2012 fail to power on when setup Intel X520/X540 SRIOV NIC

VM with Windows 2008/2012 fail to power on when setup Intel X520/X540 SRIOV NIC 

Details

ESXi supports a maximum of 31 vectors per PCI device.  If you add Intel Ethernet Server Adapter X520-SR2 (ixgbe), Intel Ethernet Server Adapter X540-SR2 as Direct I/O PCI devices to virtual machines with Windows 2008 and later guests, you cannot power on the virtual machines. When you start the virtual machine, Windows accesses all the message signaled interrupts (MSI/MSIX). When a device requests to support more than 31 interrupt vectors, the virtual machine stops responding and the vmware.log file reports an out of MSI-X vectors message.

This issue also occurs when you install the Windows PF driver for these adapters. You see an error similar to PCIPassthru: 07:00.1 tried to modify MSI-X vectors number 32-32, but maximum supported vector number is 31. During load time, the X520-2 device is marked as unsafe. The driver does not load what appears to be an unsafe device. The virtual machine starts and shows the error message.

Solution

To resolve this issue, expose fewer vectors to the guest operating system by adding the pciPassthru0.maxMSIXvectors = 31parameter to the virtual machine's configuration file.

From the vSphere Web Client

  1. Right-click the virtual machine and select Edit Settings.
  2. Click the Options tab and click General.
  3. Click Configuration.
  4. Click Add Row.
  5. Add the parameter to the new row:
    • In the Name column, add pciPassthru0.maxMSIXvectors.
    • In the Value column, add 31.
  6. Click OK.
From a command line

Note: Do not reinstall the driver before modifying the .vmx file.

  1. Open the .vmx file for the virtual machine in a text editor.
  2. Add this entry to the file:

    pciPassthru0.maxMSIXvectors = 31
  3. Reinstall the driver in the virtual machine.
Note: If multiple devices are present, ensure to add entries for each PCI device.

     pciPassthru0.maxMSIXvectors = xx, pciPassthru1.maxMSIXvectors = xx

2015年2月8日 星期日

How to flash broadcom 57810 fw under Windows/Linux

How to flash broadcom 57810 fw under Windows/Linux

1.Download fw update utility "winfwnx2.exe"
2.Execue winfwnx2
3.dir (Check current fw version)
4.q
5.winfwnx2.exe -all restorenvram "xxx.bin"
6.Waiting about 10 minutes to complete.



Linux: lnxfwnx2 -all restorenvram "xxx.bin"

2015年2月4日 星期三

Braodcom 57810 SRIOV under linux (3.7 older kernel)

Braodcom 57810  SRIOV under linux


1. Enable VT-d & SRIOV function in BIOS setup
2. Boot to Linux OS
3. Update NIC driver bnx2x(Broadcom 57810)
4. #modprobe -r bnx2x    (This is temp,reboot will be disable)
5. #modprobe bnx2x num_vfs=7
6. #lspci   (Check if you can see Ethernet Virtual fuction)

7. Block virtual device in host  (Isolation physical & virtual NIC traffic)
 #vi /etc/modprobe.d/blacklist.conf
add " "to blacklist.conf
8. Add pci device to VM (Not network device)



-------------------------------------------------------------


1. Enable VT-d & SRIOV function in BIOS setup
2. Boot to Linux OS
3. Update NIC driver bnx2x(Broadcom 57810)
4. # vim /etc/modprobe.d/bnx2x.conf    (This is fix, always enable)
options bnx2x num_vfs=7
#rmmod bnx2x
#modprobe bnx2x
5. #lspci   (Check if you can see Ethernet Virtual fuction)
6. Add pci device to VM (Not network device)

在RHEL下安裝新的套件

在RHEL下安裝新的套件

#yum grouplist (確認目前安裝套件狀態)
#yum group install Virtualization* (以Virtualization大項為範例)


先確認已更改linux repo檔
http://lisoulin.blogspot.tw/2013/09/linuxproxyyum.html

2015年1月21日 星期三

2015年1月20日 星期二

[Office] 自從您上次存檔後檔案 (filename.xls) 可能已由另一位使用者變更

[Office] 自從您上次存檔後檔案 (filename.xls) 可能已由另一位使用者變更



當您嘗試將 Microsoft Excel 活頁簿儲存到網路伺服器時,如果該伺服器正在執行例如 Services for Macintosh 的中繼服務,或是在開啟活頁簿時出現網路連線延遲情形,您可能就會收到下列訊息:
自從您上次存檔後檔案 (filename.xls) 可能已由另一位使用者變更。若是如此,請問您要怎麼做?
  • 儲存複本
  • 覆寫變更

請依照下列步驟執行:
  1. 按一下 [開始],再按一下 [執行],輸入 regedit,然後按一下 ENTER
  2. 找出並按一下下列機碼:

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Excel\Options
  3. 在 [編輯] 功能表上,指向 [新增],然後按一下 [DWORD 值]
  4. 輸入 QFE_Saskatchewan 做為機碼名稱,再按下 ENTER
  5. 用滑鼠右鍵按一下
    QFE_Saskatchewan
    項目,然後按一下 [修改]
  6. 在 [數值資料] 方塊中,輸入 1,以便 Excel 停用時間戳記檢查,並在每種情況下隱藏此對話方塊。
  7. 按一下 [確定] 以儲存設定。

2015年1月8日 星期四

How to enable TXT function on ESXi

How to enable TXT function on ESXi

1. Plug in TPM module.  Ensure that there were no issues or interference with the installation.

2. Boot into BIOS setup

    a. ensure that VT and VT-d are enabled;

    b. Under the "Security" menu, set an administrative password and reboot the system;

 3. Boot into BIOS Setup:

     a.  Under the "Security" menu, under "TPM Administrative Control" select "Turn On" and then reboot the system



4. Boot into BIOS Setup:

    a.     a.  Go to the Security Menu and the TPM State’ should show as [Enabled/Activated]

    b. Under Advanced --> Processor Configuration, set "Intel (R) Txt" to "Enable" and reboot the system.



5.  Boot into EFI Shell

6.  Execute ServerTXTINFO –C:a –a –V:2 > LogFile.txt

7.  Edit LogFile.txt:

     6a.  Search for “ERROR”.

     6b.  At the end of the file there should be the following statement:



     All checks are passed. Platform appears to be correctly configured for establishing of TXT environment.”



8.  Boot the server to ESXi

9. Check if "TrustedBoot" is enabled:

    8a  Login to the ESXi Shell (ALT-F1) and

    8b.  Enter the following command: bootOption –o

    The "TrustedBoot" value should equal "TRUE"

(TOP)Temp for soulin only

123