Saturday, March 27, 2010

scvmm 2008 self-service portal

self-service portal is the simplified version of DIT-SC. Here is the instruction to install and config it.

scvmm cannot deploy vm

We meet error 2912. The issue is caused by a problem with the host certificate (incorrect name, IP instead of FQDN or NetBIOS) or the certificate is missing from the VMM server. To solve this problem, see KB971264.

You can use certmgr.exe to see the certificates the vmm server has. The certificates are under TrustedPeople.

Besides, you need to uninstall the VMM agent on on the host. Here is the instruction.

Sunday, March 07, 2010

windows mobile sms

HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Settings\SMSNoSentMsg=1 DWORD

Enable or Disable the SMS (Text Message) Sent Notification Bubble

HKEY_CURRENT_USER\Software\Microsoft\Inbox\Settings\OEM\SMSInboxThreadingDisabled=1 DWORD

Disable SMS Text Message Threading or Conversation Mode in Windows Mobile 6.1

Friday, March 05, 2010

Embedded PowerPC

CFE (Common Firmware Environment) from broadcom. U-boot from DENX. There are bootloaders, just like grub, lilo. They are used to boot linux kernels.

uImage: a container of linux kernel and maybe ramdisk. U-boot and CFE both support this format. The uImage has 64 bytes file header which describe the images it contains followed by the images.

FDT: Flat Device Tree. This is a standard format to describe hardware of the embedded system. The bootloader passes FDT to linux kernel to help him boot. Usually, you need a DTS file and use DTC to convert it into DTB file. The the bootloader will parse the file and give it the the kernel. For CFE and MPC8548 device, the FDT is hardcoded in CFE. Here are details of FDT. “A Symphony of Flavours: Using the device tree to describe embedded hardware”.

Usually to boot a embedded ppc system. You need:

  1. bootloader. I use CFE as it is already on the system.
  2. uImage. I get kernel source from web and use ELDK 4.1 to compile it.
  3. rootfs. The root filesystem can contain init files, kernel modules and applications. I get two, one from ELDK and another from an existing uImage.

Besides, you may also setup tftp server and nfsd server. TFTP server is used to store uImage and nfsd server can be the rootfs.

Here is some tips to get ramdisk from uImage.

  1. use mkimage to get size of ramdisk. mkimage –l uImage
  2. calcaluate the offset of ramdisk. Suppose the ramdisk is the last image in uImage. Its offset is the (total length of uImage) - (length of ramdisk)
  3. Use dd to get ramdisk. dd if=uImage –bs=offset skip=1 =of=ramdisk.gz
  4. The rest can be found here. To note, not all ramdisk can be mounted. Some ramdisk is cpio archive. You need to use cpio –i –no-absolute-filenames < ramdisk to extract its content.

Thursday, February 25, 2010

iSCSI v.s. FCoE

Today, MS and Intel annouced the Windows 2008 R2 iSCSI reaches 1 million IPS on a single 10GbE port performance. It means that “There is no server I/O bottleneck. If you are going with an iSCSI SAN use the native infrastructure built into the server, OS and adapter. If you are deciding between iSCSI and FC, know that at the very least the performance on the client side is a wash. Server-side ease-of-use and cost if unquestionably in ISCSI’s favor. “

The question then goes to the comparision between iSCSI and FCoE. FCoE requires DCB (Data Center Bridging; aka DCE or CEE). However iSCSI does not require that.

As iSCSI has comparable performance with FCoE, do we really need FCoE? Here is Dell enigneer recommend.

Tuesday, December 29, 2009

live migration

network settings for live migration must use the “Settings” button in the failover cluster manager.

Monday, December 28, 2009

Bind NDIS filter driver to a NDIS Mux driver

Normally, you cannot bind a NDIS filter driver to a NDIS Mux driver. This is because usually a NDIS filter driver will specify FilterMediaTypes as

HKR, Ndi\Interfaces, FilterMediaTypes, , "Ethernet, TokenRing, FDDI"


On the other hand, NDIS Mux driver need to specify


HKR, Ndi\Interfaces, LowerRange, 0, "nolower"


The “nolower” is not in the filter driver’s FilterMediaTypes list, thus you need to add “nolower” into FilterMediaTypes list in order to bind a filter driver to a mux driver.



See here for the reference.

Monday, December 14, 2009

NdisRegisterDeviceEx return STATUS_OBJECT_NAME_COLLISION

when i uninstall my mux driver and reinstall it, the driver fails at NdiRegisterDeviceEx() and the error code is STATUS_OBJECT_NAME_COLLISION.

This happens when i initially binding no adapter to my mux driver. If i initially bind one physical adapter to my mux driver, this does not happen. 

We can use !object \Device  and !object \GLOBAL?? to check the devices as shown here, but this provide no solution to my problem. I also traced to nt!IoCreateDevice and nt!IoCreateSymbolicLink, also no help. Maybe i’ll solve this bug later.

Thursday, December 03, 2009

tcpanalyzer

TCPanalyzer using ESTAT info, RFC4898.

Saturday, November 14, 2009

802.1q tagging

In a recent project, we want to send packets with 802.1q header. It may seem easy to do this, however it turns out to be very tricky to do this in reality.

First, the NIC card will automatically strip the header when they receive it. Thus, you need configure the NIC card not to do this. For broadcom nics, you need to add "PreserveVlanInfoInRxPacket=1" in the registry. For intel nics, there is instruction, however it seems no effect when I tried on our Intel Pro 1000 PT NIC card.

Second, we want to control IP tos field when we send packet. As one may think, we can use setsockopt() to configure IP_TOS field. However, when you do this on a windows xp/2003 machine, you need to configure the registry, i.e. add DisableuserTOSSetting=0 in TCPIP/Parameters. More information can be find in technet.

Friday, October 23, 2009

kernel debugging on virtual machine

Let Host to debug its virtual machine

1. configure virtual machine to add a com port. refer here

set up a COM port for a named pipe (in VPC settings COM1 you can select named pipe and give it a name like \\.\pipe\ThePipe)

2. configure virtual operation system (vista) to enable debug and sets its output port. refer here

bcdedit /debug on

dcdedit /dbgsettings serial debugport:1 baudrate:115200

3. config host machine to connect to virtual machine

configure WinDbg to kernel debug (specify the same \\.\pipe\ThePipe in File\Kernel Debug, COM tab, Port text box).

4. Replace OS with checked ndis.sys

To disable WRP on windows vista. Install TakeOwnership.zip refer

here

5. You can start debug now.

Use !ndiskd.dbglevel, !ndiskd.dbgsystems

Technorati 标签: ,,,

Saturday, October 10, 2009

dbgview for vista

Under vista, dbgview default does not show debug messages printed out from KdPrint(). In this case, you need add a registry

1. add a registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter

2. add a DWORD DEFAULT=0xF

For more information, please see msdn here.

Test unsigned driver for windows server 2008 R2 x64

Windows server 2008 R2 x64 version require every kernel driver digitally assigned. To remove this constraint, we need install Driver Signature Enforcement Overrider. The first step is to disable UAC.

Sunday, September 27, 2009

Energy efficient data center

"We all need fatter pipes, but there are other ways of moving forward if the speeds come at the cost of too much power consumption, physical complexity and cost of ownership," said Bikash Koley of Google in a talk to a group of more than 100 developers hosted by the Ethernet Alliance. See here for the news report. Very interesting to hear.

Another report from Donn Lee says he needs 64 terabits switch.

Thursday, September 24, 2009

System Center for Virtual Machine Management

Quick Start from Nothing to SCVMM  contains quick guide video to get started with SCVMM 2008 R2.

MDSN guide for SCVMM scripting

sample script for configure vm network adapter. This script connects the virtual network adapter to a virtual network, changes the MAC address from static to dynamic, and enables virtual LAN (VLAN) identification for the network adapter.

Friday, April 10, 2009

install netfpga on ubuntu

Here is the instruction from netfpga to install netfpga on ubuntu.

1. Install prerequites

sudo apt-get install build-essential (for compiling driver)
sudo apt-get install linux-headers-`uname -r` (for compiling driver)
sudo apt-get install ncurses-dev (for selftest)
sudo apt-get install libnet1-dev (for the reference router/selftest)
sudo apt-get install libxml-simple-perl (Used in ./nf21_run_test.pl to verify *simulator* output)
sudo apt-get install libio-interface-perl (Used to manually build a newer version of Net::PCap)
sudo apt-get install liblist-moreutils-perl (Used to manually build a newer version of Net::RawIP)
sudo apt-get install liberror-perl (for the reference router)
sudo apt-get install sun-java6-jre (for the reference router GUI)
sudo apt-get install sun-java6-jdk
sudo apt-get install jpackage-utils
sudo apt-get install libpcap0.8 (for SCONE)
sudo apt-get install libpcap0.8-dev (for SCONE)



2. Create symbol links

sudo ln /usr/bin/lspci /sbin/lspci
sudo ln /usr/bin/setpci /sbin/setpci


3. Modify the source code

projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/router_buffer_sizing/regress/test_time_stamp/send_pkt: `usleep 10000`;
projects/router_buffer_sizing/regress/test_store_event/send_pkt: `usleep 10000`;

replace "usleep 10;" with "sleep 0.000010;"


4. Prepare env

source /root/netfpga/NF2/bashrc_addon


5. make; make install;

6. modify grub

title Ubuntu 8.04.1, kernel 2.6.24-19-server (netfpga)
uppermem 524288
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-19-server root=UUID=5c9521ed-d36d-417a-a755-36e3bb5d1887 ro quiet splash vmalloc=256M
initrd /boot/initrd.img-2.6.24-19-server
quiet


7. After reboot, testing

sudo cpci_reprogram.pl --all
sudo nf2_download ~/NF2/bitfiles/reference_nic.bit
sudo ~/NF2/bin/nf21_regress_test.pl

Tuesday, March 03, 2009

add IE8 search provider

There is no interface for you to build search providers for IE8. You need this one IE Search Provider Builder Tool

Friday, February 20, 2009

Quick guide to analyze performance on windows platform

There are two methods to analyze performance of windows system.
  1. Use Visual Studio Team System‘s Performance Explorer to debug windows application.
  2. Use kernrate to analyze windows kernel.
To use VSTS's performance explorer, you need to install VSTS. You can use two ways to analyze an application, either sampling or instrumentation. Sampling has less overhead than the instrumentation. Basically, there are 5 steps.
  1. Run vsperfcmd to start analyzing process.
  2. Run your application
  3. Stop your application
  4. Run vsperfcmd to stop analyzing process.
  5. Use VSTS performance explorer to view the generated report.
MSDN has comprehensive guide on how to do these in details.To be honest, I prefer use command line for the first 4 steps. Beside, to view the functions' name in the report, you should properly configure the symbol path.

kernrate.exe is for windows 2000/XP/2003 to analyze kernel performance. It is included windows WDK toolkit. Running kernrate is simple, just type
kernate -j SYMBOL_PATH -z module
where -j is the symbol path of kernel modules, -z are the module you'd like to zoom in.

To download kernel symbol, you need to use symchk which is included in windows debugging tools. For example, following command download all symbols under c:\windows\system32\

symchk /r c:\windows\system32 /s  SRV*c:\symbols\*http://msdl.microsoft.com/download/symbols

Tuesday, February 10, 2009

overlapped I/O on windows

I recently studied winsock programming and discovered that overlapped I/O can be easily used to avoid buffer copy between user and system level. This is something I am not aware of on linux platform.

Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports