Tuesday, December 27, 2011

Hyper V VM failed to set/change partition property error

Tried setting up a virtualized web farm in machine which is running Intel i5 with Windows Server 2008 R2 standard RTM. Hyper V manager refused to start a virtual machine in a brand new host machine. It has got enough of memory and CPU cores to start the virtual machine.

It keep on showing VM could not initialize < VM Guid > and "failed to set/change partition property" in event viewer.

After an hour of googling found a KB 2517374 article with reference about Intel AVX technology in Sandy bridge processors and some interesting stuff from Jeff Woolsey's Chicken and egg case.

The base funda is Intel's sandy bridge processors were released after the release of Windows Server 2008 R2 RTM, so it doesn't contain the bits to leverage new bells and whistles. As there is a slight change in processor architecture itself, it refuses to start the virtual machines.

Either upgrade to Service pack 1 to make use of Intel AVX in host and guest or install the above mentined hotfix to disable the AVX for the guest OS's

Upgrade to service pack 1 and enjoy the power of AVX(high performance floating point calculations) in both of your guest and host.

Friday, December 23, 2011

SharePoint List items bulk delete

Recently while working on a production case, we needed to delete around 2000 list items in a single shot. My idea was to use the data sheet view ActiveX control to do the bulk delete. But in production case where the server runs on 64 bit and clients run on 32 bit, there was problem invoking the ActiveX control and shared  the following snippet to do a batch delete.

private static void deleteAllListItems(SPSite site, SPList list)
{
StringBuilder sbDelete = new StringBuilder();
sbDelete.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Batch>");
string command = "<Method><SetList Scope=\"Request\">" + list.ID + "</SetList><SetVar Name=\"ID\">{0}</SetVar><SetVar     Name=\"Cmd\">Delete</SetVar></Method>";
foreach (SPListItem item in list.Items)
{
Console.WriteLine(item.Title);
sbDelete.Append(string.Format(command, item.ID.ToString()));
}
sbDelete.Append("
");
Console.WriteLine("now deleting");
site.RootWeb.ProcessBatchData(sbDelete.ToString());
}

This snippet deletes that huge list much faster than traditional object model way.

Monday, September 5, 2011

Setup a Dell Blue tooth mouse on Ubuntu 11.04

When the UI way is not working, it's time to go back to your terminals.

Get the python scripts related to blue tooth device, open your terminal window and enter

sudo apt-get install bluez python-gobject python-dbus

Check your hciX location

hcitool dev

Attach your blue tooth device to Ubuntu

sudo bluez-simple-agent hci0 xx:xx:xx:xx:xx:xx

xx:xx:xx:xx:xx:xx is your Blue tooth device address and it varies for device to device. Flip your mouse and look at the bottom label, you'll find some thing like "BT ADD: xx:xx:xx:xx:xx:xx". Now press the blue button at bottom to flash the device to detect.


You'll be prompted for the PIN now, it is also available in the bottom label usually it is 0000. Key in the same to pair the device.

Mark the device as trusted device

sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes

Restart the blue tooth daemon service
#sudo /etc/init.d/bluetooth restart

Verify the device is added successfully
dmesg|tail
Towards the end, you'll see something like below

Bluetooth: HIDP (Human Interface Emulation) ver 1.2

Now go to your top right toolstrip and click on the blue tooth icon, choose the device name (Dell BT Travel Mouse) and click on Connect.

There you are, after a bunch of command line (or shell ) commands finally got my blue tooth mouse connected.

Monday, August 29, 2011

Resolving FAST Document conversion Failed error

After installing and configuring Microsoft FAST Search server, uploaded a bunch of word, pdf documents and images for crawling and indexing. Fingers crossed and waited till the Full crawl is completed in Crawl history page. Logs said that the documents were crawled successfully and ready to be queried from FAST index.

I was able to search a PDF document based on its metadata but not based on its inner content. Basic instinct goes for installing a PDF iFilters but the server behaviour is same even for Microsoft Office file formats and Jie Li's blog states that FAST comes with PDF iFilters in-built.

Tried using the DocPush from FAST toolbox as an exercise of isolating SharePoint from FAST,

docpush -c sp c:\test.doc

Docpush clearly provided me the error message "WARNING Document conversion Failed (Warning code 0)". Verified the FAST crawl logs and found the same error message there for Office file formats and PDF documents.

To resolve this you need to provide "Full Control" rights for FAST service account to folders C:\FastSearch\bin and C:\FastSearch\Tmp

Refer : KB2554579

How to open Microsoft FAST QR Server FQL console ?

         Microsoft FAST search server hosts a QR Server FQL Search console which allows us to make FQL queries from this page. This web application is hosted in port 13280. So, to access this application go to your FAST search server, open up the browser and hit http://localhost:13280

          As an interesting fact this web application is not hosted within IIS 7.0/7.5, so even stopping the IIS or World Wide Web Publishing services will not have any effect on this web application. This is a CGI application  hosted in service "FAST Search for SharePoint". Some pieces of  FAST Server is not yet fully transformed to Microsoft stack.So ensure that this service is running under services.msc console.

Saturday, August 27, 2011

Host name validation failed - FAST search 2010 for SharePoint

While setting up a virtualized FAST search server in my local machine with the help of Hyper-V, post installation of FAST Search server ran the post setup configuration wizard. At one step it asked for the Server name where you want to configure, tried with many permutations and combinations but every thing ended up in a single error message box "Host name Failed" and there is not even a sample string or a help text there.

Bounced back to the documentation which spells that we should provide fully qualified domain name(FQDN) of the machine.Wizards are meant to simplify the process of configuring the servers, at-least a help text or an help button is required here.

Looks silly once the issue is resolved, still posting a screen scrap which will help another FAST explorer in dark to identify a FQDN in a server.


Friday, August 19, 2011

Designing a video Streaming Portal - Part 1

The core idea is to build a video streaming portal which leverages SharePoint assets and also ensure that the solution is not burning our pockets. This solution will be totally based  on Free software or the software which the cost was already included with operating system license and with bare minimal code.

Software involved:

Implementation

Windows Media Streaming Services
          Deploy and enable Windows Media Streaming services in a Windows Server 2008. This service is capable of streaming video files in MMS or HTTP protocol, depends upon the client which is requesting. If the request is raised from Windows Media player then the server switches to MMS protocol, for any other clients it'll be HTTP protocol. This is called as Protocol roll-over.
          Windows Media Streaming services support WMV,WMA,asx and wsx file formats.Among this asx and wsx are play list format. So convert your videos to WMV videos.If your video library is full of FLV and flash files then its worth taking a look IIS Media Services.
            Map the video folder to appropriate publishing points, this will give you a unique end point to each and every media file. If you've enabled HTTP protocol then this will create a web application in IIS default port 80. It is recommended to expose HTTP protocol along with MMS protocol because MMS is compatible only with Media player client.If you are planning to build your own streaming client then your ideal end point would be HTTP.

SharePoint Foundation 2010
           Create a custom list and add columns Title, description, endpoint and comments. If you want to capture more metadata about the media asset, pile up here. Populate the list with the list of publishing points which are exposed by Windows media streaming services. It gives a chance of automation but for the sake of simplicity we are populating it manually.
           Develop a web part which lists all entries in this list on a left pane and Windows Media player ActiveX control on right pane. Whenever the user selects a video on left pane, modify the url property of ActiveX control and start playing. Let the ActiveX control do all heavy lifting for us.

SharePoint Search Server Express 2010
             SharePoint Search server express is good enough for small organization to start with and to get a flavor of Enterprise Search experience without any additional cost. Although it comes with the limitation on items which gets crawled it is a best fit for this solution.
              Deploy SSX2010 and configure the search and managed meta data(if required).Initiate an crawl on the content and get it indexed. Create a search center and test the search results. Now edit the search results web part to include "endpoint" managed meta data in query columns list. Modify the search results XSLT to render a small thumbnail of Media player plug-in which allows the user to play the videos right there in the search results
 
 Configuration , setting up the servers, pros and cons will be part of next post...