Wednesday, September 30, 2009

How to export/import a VM from/to Xenserver

Here is how you can export/import a Xenserver VM if you are using Xenserver 5.5.0.

# xe vm-export -s -u root -pw vm= filename=/root/vm1.xva
Export succeeded

To import to another machine xenserver2 :-

xe vm-import -s -u root -pw filename=/home/sabu/vm1.xva

These commands will import vm1 from xenserver1 to xenserver2.

Friday, September 18, 2009

Manage XenServer using CLI

Here is how one can manage VMs on XenServer using CLI :-

To list all VMs
xe vm-list -s -u root -pw

To uninstall a VM
xe vm-uninstall uuid="" -s
-u root -pw

Sunday, September 13, 2009

How to convert wav to mp3 on Linux

You can convert .wav to .mp3 format on Linux using the tool lame. To run it on Ubuntu :-

# sudo apt-get install shntool
# sudo apt-get install lame
# lame -V2 mysong.wav mysong.mp3

Wednesday, August 19, 2009

How to change a registry key using Ruby

Here is how you can do it :-

For example, I am setting the enablesecuritysignature DWord key to 1

require 'win32/registry.rb'

Win32::Registry::HKEY_LOCAL_MACHINE.open('SYSTEM\CurrentControlSet\Services\lanmanserver\parameters', Win32::Registry::KEY_WRITE) do |reg|
reg['enablesecuritysignature',Win32::Registry::REG_DWORD] = '1'
end



Friday, May 29, 2009

Resize image files

Here is a shell script using which you can resize image files in Linux. You can use convert command for this :-

Copy the following lines to a shell script - say resize.sh

for x in $( ls *.JPG)
do
echo $x
convert -geometry 640x480 $x small-$x
done

Now execute resize.sh in the directory that contain the image files.

Tuesday, May 26, 2009

eyeOS - A cloud OS

I am a late entrant into the world of cloud computing. I do not do anything on that and am just part of the audience. It is a very interesting technology and I think it is not just another fad.

Here is one of the application I loved and use - eyeOS. Not sure whether web-based OS is really going to be a hit although I believe cloud computing is going to be.

eyeOS is a cloud computing OS that is free and lets you install it on your webserver so that you can have own cloud system. For an average user, eyeOS also provide online desktop facility. So you can have your own desktop - online and accessible from anywhere.


More info :-

http://eyeos.org/

To create one :-

http://eyeos.info/?lang=en

Thursday, May 14, 2009

OpenSSL Commands

Most frequently used openssl commands are available at this site. Very helpful.

Tuesday, April 7, 2009

How to create multiple instances of Tomcat on Windows

1. Make a copy of the existing tomcat directory. In my case, it was "C:\Program Files
\Apache Software Foundation\Tomcat 6.0". I copied the "Tomcat 6.0" to "Tomcat 6.0-1"

2 Edit Tomcat 6.0-1/conf/server.xml.

3 Change the shutdown port from the default value of 8005 to let us say 8015.

5 Change the default http port from 8080 to say 8081.

6 Change the default connection port from 8009 to say 8019.

7 Save changes to server.xml.

9 Delete the contents of the Tomcat 6.0-1/logs directory.

10 Go into the \bin directory and rename the files tomcat6w and tomcat6 to tomcat6devw and tomcat6dev.

11 Now create a service for this new Tomcat instance as follows :-

tomcat6dev.exe //IS//Tomcat6Dev --DisplayName="Apache Tomcat 6 Second" --Install="C:\Program Files\Apache Software Foundation\Tomcat 6.0-1\bin\tomcat6dev.exe" --Jvm=auto --StartM
ode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --Star
tParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParam=stop

12 Double click on tomcat6w.exe in the original instance and tomcat6devw.exe in the new instance.

13 Compare both of them and see to it that the new instance looks similar to the old one.

14 Goto services.msc and start the newly created service.

15. Try accessing Tomcat at new port.