How to build a Linux Media Server – Headless
Install Ubuntu Linux 12.04 (Or any version) on Headless Unit
This post is a bit of a departure for me as I am not talking about CRM for once. However I guess I feel that I have something to share so…
Intro
Have had lots of issues with my old Headless WHS server which is an Acer Aspire Easystore H340. Despite all the troubles I think that the box itself is a thing of beauty and I really did not want to replace the hardware as with this box I have a 4 disk Nas Server with appropriate memory and CPU power. My only real issue is the operating system which tend to reboot three times every day. I actually stopped windows update which cuts a little of the rebooting but still wanted to throw the thing out of the window.
So I started to look at replacing the OS. This is tough as the box is;
• a headless unit
• has no place for a cheap graphics card (more later)
• Needs fiddly jumpers setting to use a keyboard
So I thought and my options were limited to;
Buy a video card for my headless unit
My unit only takes a 1x video card which are expensive. I would rather build a new machine than spend $100 on a video card that I use once. Also they are difficult to come by. Would also have to get my hands on a monitor. Not really a suitable solution.
Buy Video Motherboard debug cable
You can actually buy a cable for this unit. This is made by a company online. They will ship the cable out for $65 dollars but postage is $30. Fair enough but would still have to get a monitor, see point one for the reasons that I did not go down this route
Install Unattended Ubuntu
Never could get the thing to run through without the installer asking a question and so this never worked despite a huge time investment and being so close I could smell it. This was my last resort and I fell at the final fence.
Solution
So by chance after many months of hard research and not getting anywhere I chanced upon the article by Max Beatty
This guy used an external drive and Hyper v. I totally stole this idea but used VirtualBox which kept me away from the scary prospect of inadvertently rebuilding my laptop which would be an easy mistake to make with the final step.
Parts
1 * 2TB Western Digital Green Hard Disk $130
1 * Sata Disk Enclosure with esata $35
I already had esata compatibilty on my laptop and the Acer Aspire (not really required for the Nas but handy for moving files from the old installation to the new afterwards.
The reason for the new drive was really to give me a backup in case this all did not work. That way I could keep my WHS running (and crashing) until the new server was built.
Also if this idea of mine did not work then I had at the very least a new External Hard Drive.
If the solution did not work all I had to do was restore the WHS hard disk to the Acer H340 and WHS would be back (Yikes)
Setup VirtualBox
1. Attach Removable External Storage Disk to whatever pc/laptop that you have a screen for.
• Hard Disk with Hard Disk Caddy containing the drive will become the primary Ubuntu Drive
2. Link disk to virtualBox vmdk file
• Install VirtualBox
• Create Virtial Box Machine for Ubuntu Server
• Create vmdk which is a virtial box disk that links to your new external hard drive. There are many online tutorials for this.
http://www.virtualbox.org/manual/ch09.html#rawdisk
cd %programfiles%\oracle\virtualbox
VBoxManage internalcommands createrawvmdk -filename “C:\users\\.VirtualBox\UbuntuLiveHd.vmdk” - rawdisk \\.\PhysicalDrive1
Check Physical drive location
One thing that I did not see in any of the tutorials and led to an error after creation of the vmdk when accessing was that VirtualBoc should be Run as Administrator.
3. Add Ubuntu (of your choosing) iso to set to boot on the VirtualBox
Install Ubuntu (Debian) server
In fact this could be any Linux OS really. I ended up using WattOS
This is a very fast and lightweight linux distro based on Ubuntu. Therefore its much the same as Ubuntu to install but uses less resource intensive software.
• Start the Ubuntu VirtualBox machine
• Install Ubuntu to your requirements
• Ensure that you install XRDP and add the Ubuntu 2d desktop fix
cd /home/youruser
echo “gnome-session –session=ubuntu-2d” > .xsession
sudo /etc/init.d/xrdp restart
Apparently this will not work with Ubuntu 12.10 but you could try another desktop for this. Try googling the issue.
The above step is not required for WattOs
• At this point you are really ok to continue but I chose to do the complete setup on my laptop just in case I broke something and then could not login over remote Desktop or SSH.
• Further Installed and configured Samba Shares
• Installed and configured Torrent Clients
Remove ethernet card link
This is key. DO NOT FORGET THIS PART. Although if you do you will be back to the virtual machine one more time.
Ubuntu store the Physical Ethernet card address in the Ubuntu file system. If this card is found in the file Ubuntu will look for this card and try to use it.
This is going to be an issue as the next step in the process is to remove the drive from the external hard drive enclosure and then insert into a bootable position back in the Nas server. The Nas server will almost definitely have a different network card and therefore will never show up on the network.
So we need to remove the link to this NIC
The file is located at
/etc/udev/rules.d/70-persistent-net.rules
So use gedit
Sudo gedit /etc/udev/rules.d/70-persistent-net.rules
Am no linux guru yet but am pretty sure this is how its done
And remove the following info. Remove all of this. Its all one line but will look like its spread over three or four lines.
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:00:00:00:00:00″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
Now I tried to do some more config after this and my system slowed to a halt eventually so ENSURE that the edit is the last thing that you do before shutting down your new Ubuntu server.
New Server Start
• Take the disk out of the drive enclosure
• Place inside your soon to be brand new Ubuntu server
• Start her up
• Check your network to see what IP address your box booted up into if you used DHCP on install or use the specified IP Address if you gave it one with Remote Desktop.
Yes I use Windows Remote Desktop
You will need to enter your user name and password that you setup on the install and there you are logged into your new Ubuntu Server
• If you ever get an issue where you cannot get onto the Headless server due to some unforeseen collapse of the operating system then all you need to really do is take the hard drive and insert into your VirtualBox environment and fix the issue.
Software Installs for Media Server
uTorrent Server – BitTorrent
I installed utorrent Server which is now available for linux. I find this one of the best utorrent clients that runs pretty lightly and works like a charm.
Deluge – BitTorrent
I use deluge as one of my torrent site is private and they do not like the use of uTorrent. They seem happy enough with Deluge though and so I need both
Samba
I installed and use Samba to share out my folders to the windows and Mac world in my home network and to my media player – WDTVLive. This all works perfectly.
I also share out a folder to auto upload torrents. This I then add to the favorite folders on both my windows and Mac machines. From there I can browse torrents and save them to the Auto Downloads folder which then gets picked up on the server by uTorrent or Deluge (I have two different folders)
Media Server Software
I don’t use this at all and so I have no recommendations. I found that a lot of what is available is very bloated and does far too much for my requirements. As it happens the WDTVLive box can see a network share and so I just use network shares. I would love to hear of any good media servers that aggregate though.
I always loves PS3 Media server which is available for Linux but it really only gives me a folder view. That said I am going to keep an eye on this to see if they add an aggregated view at some point.
Results
So my struggling old WHS server that lost network connectivity twice a day and more often that not dropped whilst watching recorded content on the TV now runs like a dream.
It rarely uses more than 5% of the processor unless I am remoted into the box which uses a lot of resource and has never lost connectivity of its own volition. It uses little of the available RAM and I only have 2GB.
WHS cannot compete for me.
I never used any of the client backup functionality of WHS though which is not in Linux but then why would anyone use Client backup in a home solution these days. It does not make sense as the server is really in no better position that the Client in terms of safety. I just use online sync backup which means that if I lose the PC (and I have) then I just install the sync software on a new build and my files are back in a few hours.
CRM 2011- Odd Entity Message Update Issue
Hi Folks
Its been a while since I last posted but it seems that I have some time and I thought that I would share a recent gotcha from the world of Microsoft CRM development.
Problem
We recently wanted to change a Message label on a ribbon button which we managed from the messages screen.
The end result as expected was as follows
This works fine the first time perfectly as you would expect. However it seems that we made a mistake with the entry and tried to change it. This is where we found our bug. This action cannot be repeated. We did a lot of testing around this including
restarting iis on the CRM server
Restarting the async service (I know… its never going to be this but we were desperate)
Clearing the cache
Publishing the default solution
Solution
It seemed that we were stuck with the changed but incorrect text.
However by pure chance I was playing with the CRM visual ribbon editor (Great tool by the way which saved me hours of work) and I checked out the campaign ribbon. When I did not see any issues I saved the ribbon back rather than just closing and hey presto the lable got changed.
So whilst I can now give you the solution, I don’t really know why this action resolves the issue. I can only assume that the act of exporting and importing resets something that is not getting reset naturally.
So the solution for this is
1. Change the label to whatever it is that you want it to be
2. Create a solution (Mine was called Temp)
3. Add the entity that is not playing ball to this solution (In my case Campaign)
4. Export this and then re-import immediately
5. Publish the changes
6. Done
I have not figured out if this bug is localized to ribbon items or not I just have not seen this elsewhere.
I Hope this is useful. We have also created a short video discussing this.
CRM 2011: Refresh Subgrids on Tab Expansion
Hi Folks
I just thought that I would share this snippet with anyone who may be interested. I have been looking at form design a lot recently with a view to cleaning the forms up. I have nearly everything in collapsed tabs and I think that this is the way to go for a cleaner form design. The user then sees the tab list and clicks on the tab that they are interested in.
The problem is that when the form is key (Say the Company form) that there may be a lot of tabs with subgrids. As we know already Microsoft CRM will only refresh the first four grids on the form automatically and the rest would require a further click.
I think that this might be mildly soul destroying for most users who click on a tab only to find out that there is a grid that needs a further click if its not in the first four.
What I wanted was a solution that opens all the grids in any tab that has been expanded.
I also wanted to ensure that this code could be run from anywhere in the application withough a ton of parameters.
The Solution
What I came up with was a piece of generic code that can be inserted as a simple web resource. This web resource can be added to any form as the code in it is completely generic and does not use any names of tabs or sections or controls.
Basically the idea is to do the following
1. Add the script as a global web resource
2. Attach the web resource to a form
3. For each tab that you wish to function in this manner attach to the ‘TabStateChange’ event and link to the function ‘GlobalOnChangeTabState’
*** IMPORTANT NOTE: Ensure that you pass the context when you hook up the event on the forms tab.
and you are done.
What I like about this is that its completely generic and can be simply added anywhere.
Have fun…..
Script Below
function GlobalPreLoadSubGrid(name)
{
var gridControl = Xrm.Page.ui.controls.get(name);
gridControl.refresh();
}
function GlobalOnChangeTabState(context)
{
var tab = context.getEventSource();
var currentTabState = tab.getDisplayState();
if(currentTabState == “expanded”)
{
//alert(“Tab: ” + tab.getName());
var tabSections = tab.sections.get();
for (var i in tabSections)
{
var section = tabSections[i];
var sectionName = section.getName();
//alert(“Section: ” + sectionName);
var sectionControls = section.controls.get();
for (var i in sectionControls)
{
var control = sectionControls[i];
var controlName = control.getName();
//alert(“Control: ” + control.getName() + ” Is a ” + control.getControlType());
if(control.getControlType() == “subgrid”)
{
GlobalPreLoadSubGrid(controlName);
}
}
}
}
}
Microsoft CRM Language Translation Functionality for Data
Hi folks, its been a while since I have blogged but its been a busy period for me. However I had a recent request whilst on a project for Multi Language functionality for data.
Multi Language Support for Data
Of course Microsoft CRM supports multi language for the UI but as far as I know this functionality does not extend to data. I googled around a little to see what you clever guys had done but did not find much out there so it was directly to the drawing board for this.
The requirement in this instance was for certain values in the setup data. So roughly around 5 to 7 tables with one field in each. As mentioned setup and configuration data.
Pivotal Inspiration
Having been a CRM specialist for Pivotal CRM (now CDC Software) in the past I started to think about a solution that was used on a project in Belgium. Pivotal have a concept of a descriptor field. This field is a formula field and is updated using other values on the record. By the way Microsoft, this is a great idea and could be put to good use within Microsoft CRM. Anyway, I digress. The Descriptor field always gets calculated dynamically whenever it gets displayed and as such was a great way into language support within the data. Also by way of explanaition, the descriptor field essentially acts like the name field in CRM in that it is the field displayed when linking to the record in question.
Basically the desciptor held the english value except when the users language was different. In this case the descriptor was forced to recalculate dynamically and get a non English value. In this original case French or Flemish.
Microsoft Dynamics CRM 2011 Solution
Having said all that about Pivotal CRM, Microsoft CRM does not have the concept of the formula field that constantly updates itself (sigh – did I mention that this is a great idea?), however where Dynamics CRM is really strong is that we have the power to make this happen.
So what did I actually do?
So what I did is to hook into the Retrieve and RetrieveMultiple messages on the appropriate entities. My view was to then use this to update the name field on the records in question which would give the perception of multi language support. Well its not quite as easy as that.
Ok so we have a Translation table that has a Language type and value and this hooks up to the record that requires translating. It does not have to be done this way but in the interests of creating a more user friendly UI then this design leaves the secondary grid hanging from the setup record form. This table could actually have no link to the record that requires translation but the UI would not be as pretty. My friend Ron (with whom I am working on this project) insisted that we are going for the ‘Apple’ UI and he has done so much good work on producing the perfect UI that I had to do this justice and link the table to the record to be translated.
So the trick here and it is a trick, is to intercept the Retrieve and RetrieveMultiple messages and use this Translation lookup to get the correct value translation for the value. The bonus that I found was that this then worked perfectly without having to update the name field on the record to be translated. All I did was intercept the retrieve or RetrieveMultiple after the process and replace the name field with the translated value. This was unexpected but a great bonus which meant that there were fewer latency issues and we had been worried about latency.
So the results from this are as follows
- When viewing the records in a list view the values are translated
- When viewing on a form the values are translated
- When clicking the choose record icon on a form the record list is translated.
- The values work in a search
- There is no visible latency
We still have some testing to perform on this proof of concept but the solution is performing well so far
We also slightly changed our thinking in that we have 70% English users. So we decided that the name field would always be English and therefore we only run the translate functionality for the foreign language users. This ensures that there is no latency at all for 70% of the users and if there are any unforseen Issues down the road then this functionality can be switched off at any point whilst any issues are resolved.
Anyway, some interesting idea’s here and slick for the end user experience.
Wow, this has been a long blog!
Xrm Marketing Fantasy ?
Hi Folks
I am not sure if this video is tongue in cheek or just me ranting (quietly) but its a bit of fun all the same. I have to admit that I get a little annoyed with the term Xrm. Apparently the definition of Xrm is Crm but not customer facing.
If that is indeed the case then I have been doing Xrm since I started in this game in 1998 but we used to call it Crm back then
So who decided on Xrm. It has to be the marketing guys huh? Its a funky and exciting sounding name and Crm sounds old and dusty so lets replace it. I can see that happenning
Anyway, here is the video of ron and I discussing this one through.
How To Add A Hyperlink To An MS CRM 2011 Record In An Email Through Workflow
Hi all
This post and video is really all about me sharing the love. I had a simple requirement recently for a CRM 2011 system to be able to send a link to a CRM record from within an email that was created by a workflow….. sorry a process.
Now since this is now UI functionality I thought that it would be possible but its not. Why its not I am not sure becuase the code must be in the application somewhere as I can click the ‘Send Link to record via Email’ from any record in the system. That said, it cannot be done from processes.
So I was about to create my own code when I came across the following from Sonoma
http://blog.sonomapartners.com/2011/04/workflow-utilities-for-crm-2011-on-premise-editions.html
This is absolutely everything that I wanted in terms of functionality wrapped up in a small managed solution. Its also pretty easy to use and works on any entity.
So, hats off to Sonoma for doing this and making this generally available to all.
This is Ron and I discussing this
Cheers till next time!
CRM Upgrade: CRM 4.0 to CRM 2011: Update
Hi folks
I know that I have recently discussed upgrades to CRM 2011 but Ron and I felt that we needed to go just a little deeper. It seems from the stats of people reading the blog, watching the video and contacting me about this subject matter that this is a pretty hot topic right now.
So basically this is a similar discussion to last weeks except that we go into a little more detail.
We discuss the steps that I would recommend to get from a 32 bit CRM 4.0 system to an all singing all dancing 64 bit CRM 2011 system.
I hope that this adds to your knowledge on the subject
Feel free to comment
CRM Upgrade: CRM 4.0 to CRM 2011 Overview
Hi folks
I seem to have done a lot of work with upgrades recently and so I thought it may be useful to pass on some thoughts on the subject.
Its tough to go into a lot of detail because there are many seperate scenarios for an upgrade situation.
However, Ron and I made a video and had a quick discussion on the subject.
The simple facts of upgrades are as follows
1. If you are moving your current system to another server you need to re-deploy (or Import Organization after CRM 3.0)
2. Its not the best practice to work on the current production system whilst upgrading. Unless the client really wants to keep the system on the server its already on. Quite often now with the advent of 64 bit CRM 2011 its a must to move to a new server anyway.
3. Upgrading is easy……… right up until you hit issues. Than it becomes much more complex and will swallow your time. Always take backups and always try to test your upgrade process on a vpc or other server if possible.
Anyway, here is a link to our discussion
Good Luck..
CRM 2011 and the new Sharepoint Integration
For a while while now I have been wanting to check out the new CRM 2011 Sharepoint integration. I love the idea of Sharepoint being linked to CRM and of course, this has been done many times in the past but now this functionality is right there and available in Dynamics CRM 2011 right out of the box.
We made a video…
So we made a video that shows me (Sorry about that) talking about the new CRM 2011 Sharepoint Integration and showing this a little on screen.
So try the Integration already
The problem for me trying this is getting hold of a version of Sharepoint 2010. I recently resolved this via a very helpful colleague who has let me have carte blanche over a Sharepoint 2010 systemn that he had previously built. So away we go or so I thought.
Problems problems…
So I originally started with a CRM 2011 Online beta signup and my in house Sharepoint 2010. I managed to follow the reasonably simple installation instructions for the Sharepoint List component but from there could not get this working. After a couple of days of banging my head against the wall here I kind of gave up.
Strangely enough, the following day coincided with the release of CRM 2011 Online and so after stiffening my resolve to get the integration working I signed up for a trial of the real thing. This actually resolved my issues. I can only assume that there are fundamental changes between the beta and release versions of CRM 2011 in this area.
Sharepoint 2010 Integration
After that the Integration is extremely simple to set up and slick to use. I love the Sharepoint List component which is used on the CRM forms and has lots of good Sharepoint functionality built in.
Any document stored in Sharepoint (from the CRM form) is stored in a structured format under sharepoint. So for instance and accounts (“ABC Company”) documents would be stored in Sharepoint under SiteName/Accounts/ABC Company/
Its also possible to set linked documents to store under these folders also. So using the example above, if I then have an Opportunity for “ABC Account” called “New Opportunity” the document would be stored in SiteName/Accounts/ABC Company/Opportunity/New Opportunity/
This is all customizable of course.
Summary
I think that this new functionality is excellent and should be extremely well received by developers and customers alike. I think that there is scope to expand on what has been done to add further Sharepoint functionality but as a first try release this is excellent and well needed functionality.
Enjoy and let me know of any comments questions you have….
Cloud Storage Update, Gladinet and SugarSync
Hello again, it seems like only 5 minues since my last post… oh well it was I guess. Anyway we (Ron and I) promised an update on our previous Cloud Storage video and a number of things have happenned since then.
Gladinet
Gladinet is a product that Ron and I both really liked initially. It works with Google Docs and Microsoft Skydrive which fits in with our thoughts on using one of the bigs guys for actual storage for security purposes etc. It looks professional and it works quickly and there is a full log of everything that is going on.
Synced Folders
One if the other things that Ron and I targeted was synced folders. Being able to put your files up in the cloud is great but unless you are syncing then this is positively useless. Gladinet does not currently do this and so this is currently not the ideal solution.
A recent update on this is that Gladinet have just released a new version v3.0 which introduces the idea of synced folders. I still cannot give a further update as this version is still in beta and so its unfair to review right now. However I can say that its pretty exciting that Gladinet has introduced this feature.
SugarSync
Something else I have been looking at recently is SugarSync. This is a pretty awsome product in many ways and as of right now offers the most complete set of functionality that Ron and I think would be required for a cloud storage solution.
Its a tad expensive but not overly. Its does break away from the initial thoughts that the data should be stored on the servers of one of the big guys… google, microsoft,Amazon as your data will be stored on the SugarSync servers.
I was however prepared to bite the bullet on that one and so I signed up to an initial months deal for 100GB of storage.
The Amazing SugarSync
Sugarsync is a great product. I get cloud storage in any folder that I deem to sync. I get Magic Briefcases, which are the equivalent of dropbox in terms of, wherever you install the client application these folders are aut synced. I also get an astounding array of connectors to get to view my data. In my case I can use the iPhone app to view and potentially email out any of my files in the cloud. Sugarsync also runs on Macs which is I know important for many including my friend Ron.Also in this is the ability to share any of your folders with other people including shared synced folders.
I have to hand it to these guys, they definately have the product in terms of functionality.
There is a point to be mentioned here though of extreme importance. I started syncing up my 40GB of files on my laptop on a Wednesday afternoon and here I am…. not the following Friday but the Friday after that and Sugarsync is reporting that I have…242 files left and so in a week an a half my initial file sync is not yet completed.
I guess this follows with our initial thoughts that we should be using the servers of the big guys to store our data on and I can only imagine that these speed issues are caused by bandwidth availability at sugarsync towers.
Anyway, this is still the best product out there until the Gladinet 3 review (Which looks very pretty by the way) and so I am going to see how Sugarsync works going forwards after the initial sync is complete.
Anyway, Ron and I had a bit of a discussion about this very subject filmed by our able camerawoman Elizabeth. We love the backdrop for this video… another cool Vancouver location brough to you by Alan and Ron.
Please let us know your thoughts on Gladinet and SugarSync. Is there anything else out there that is better?




