Wednesday, May 28, 2014

Opennebula context support for Centos 5


I am a big fan of Opennebula because of some of features such as good support for virtual networking and vmware and documentation. One of the biggest attractions is that is it truly open source. Opennebula has way to pass parameters from the Sunstone interface and pre-defined templates to provision a new virtual machine(vm) via context. We tried to provision some vm's with Centos 6 and it worked great using Opennebula-context rpm package install in the base image. Unfortunately the context package did not work for Centos 5.


We first installed one-context.rpm on a Centos 5 image. Upon provisioning a new guest, We noticed that the context was not being implement. Such as the hostname not being update to what we typed in the Sunstone interface.

We then looked at Opennebula-context in Github. /etc/init.d/vmcontext is the main service which runs all the context.

Upon closer inspection, the cdrom was not being mounted and that /dev/disk/by-label/CONTEXT symlink was missing. /dev/disk/by-label/CONTEXT was symlink to /dev/sr0 on Centos 6 which was named differently on Centos 5.

Centos 6
Centos 5
On the Centos 5 guest vm. We manually symlinked to the cdrom:
cd /dev/disk/by-label
ln -sf ../../hdb CONTEXT
Test vmcontext service:
service vmcontext start

We received : "mount: no such partition found" which was tracked down to this line in /etc/init.d/vmcontext
mount -t iso9660 -L CONTEXT -o ro /mnt
If we run the following first then the line above would work. Weird.
mount /dev/disk/by-label/CONTEXT -o ro /mnt
umount /mnt
mount -t iso9660 -L CONTEXT -o ro /mnt



Perform these steps on the Centos 5 base image before you import into Opennebula
vi /etc/init.d/vmcontext
mount -t iso9660 -L CONTEXT -o ro /mnt
mount /dev/disk/by-label/CONTEXT -o ro /mnt
To make the symlink correct cdrom device we need to update udev

vi /etc/udev/rules.d/50-udev.rules
KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k"
KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k disk/by-label/CONTEXT"
comment out 
BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end"
#BUS=="ide", KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_end"

Friday, May 23, 2014

Restore Classic Firefox toolbars

Again I have to blog about the stupidity of the firefox version 29.0.1 interface designers. I want to refresh the screen but do not want to press F5. Hunting for that tiny refresh icon on the left of the url bar is quite annoying.

 Let's restore the classic theme

  • Restart Firefox
  • Click View > Toolbars > ...Customize
  • Bottom right Click right of Buttons Toggle to Small
  • Drag Refresh Tool button to where you want.
  • Close Customize Tab

Thursday, May 15, 2014

Iastordatasvc.exe High CPU usage

Iastordatasvc.exe High CPU usage


System configurations:
Dell Vostro 220

Intel(R) Core(TM)2 Duo CPU E7500@2.93GHz
4.0 GB
Windows 7 32-Bit

I found that my computer system was very slow and sluggish. 

View processes running
  • Ctrl+Shift+Esc to view the Windows Task Manager
  • Click processes tab
  • Click CPU column to sort by highest percentage
I just install a new video card that changed the Intel Rapid Storage technology driver to use Iastordatasvc instead.

After a bit of research I found the correct driver for this configuration. 

download here:
Run the installation and restart computer and the CPU usage was back to normal.  

Tuesday, May 13, 2014

Annoying default design of Firefox tab location

As of late, Firefox version 29 in its infinite wisdom decided the default location for tabs is above the url toolbar. It's in my opinion and many others agree that having the tabs immediate above the main html section is functionally correct, productive and makes sense.

Here is the solution :

But instead of giving a clear answer, you need to read the thread figure it out and decide which course of action.

Here's the skinny.

You should also be able to do this with code in userChrome.css by specifying a value for -moz-box-ordinal-group higher than the default 1, so the Tab bar is moved to a lower position than its current position in the DOM.

Manual steps to update firefox configuration

  1. Find the equivalent directory to the following:
    •  Windows
      • C:\Users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default  
    •  Mac
      • ./Library/Application Support/Firefox/Profiles/xxxxxx.default/chrome/userChrome.css
    • Linux
      • /home/[username]/.mozilla/firefox/xxxxxx.default/chrome/userChrome.css
  1. mkdir chrome 
    • C:\Users\[username]\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default\chrome  
  2. cd chrome
  3. Add code to file userChrome.css (case-sensitive )
@namespace url(""); /* only needed once */
 #TabsToolbar{ -moz-box-ordinal-group: 100 !important; }
  1. Restart Firefox

One liner update for linux

  1. cd /home/[username]
  2. chromeprofile=`cat .mozilla/firefox/profiles.ini  | awk '/Path/{split($0,a,"=");print a[2]}'`;userchromepath=.mozilla/firefox/$chromeprofile/chrome;mkdir -p $userchromepath;echo '@namespace url(""); /* only needed once */'$'\n#TabsToolbar{ -moz-box-ordinal-group: 100 !important; }' > $userchromepath/userChrome.css
  3. Restart Firefox