Wednesday, May 28, 2014

Opennebula context support for Centos 5

Issue

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.

Diagnosis

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
/dev/sr0
 
Centos 5
/dev/hdb
 
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

 

Solution

Perform these steps on the Centos 5 base image before you import into Opennebula
vi /etc/init.d/vmcontext
change
mount -t iso9660 -L CONTEXT -o ro /mnt
to
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
change
KERNEL=="hd[a-z]", BUS=="ide", SYSFS{removable}=="1", SYSFS{device/media}=="cdrom", SYMLINK+="cdrom cdrom-%k"
to 
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"
to
#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. 


Intel_Intel-Rapid-Storage-Te_A00_R295887.exe 
download here:http://www.dell.com/support/drivers/us/en/19/driverdetails?driverid=RR3H4
 
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 : https://support.mozilla.org/en-US/questions/991043

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("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* 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("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */'$'\n#TabsToolbar{ -moz-box-ordinal-group: 100 !important; }' > $userchromepath/userChrome.css
  3. Restart Firefox