1. You’ll need to snapshot the volume of the existing PVM instance. Ideally the snapshot is taken with the instance in a stopped state. Thus create the snapshot of all volumes for you existing instance. PLEASE DO NOT DELETE THE EXISTING VOLUMES UNTIL YOU HAVE SUCCESSFULLY CONVERTED to HVM Check the ami properties to be sure.
2. Next create an HVM instance, using as close as possible your current OS
make sure the kernel versions match.
Create the HVM instance in the same AZ as your PVM instance us-east-1a and with the same size EBS volume 50GB. You can choose a m3.medium to conserve costs, then increase to a cr1.8xlarge once completed with conversion and a known good HVM boot.
Once it has started and is running you can stop it.
Tag the Volume Ubuntu-HVM and detach it from the HVM instance.
3. Start a ‘Conversion’ instance wait for it to fully start. Similar to HVM instance.
( It is important that the instance is fully started before attaching the other volumes.) SSH into the conversion instance. Then attach the HVM volume to the conversion instance as /dev/xvdf
In the ssh session
‘sudo mkdir /hvm’
‘sudo mount /dev/xvdf1 /hvm’ Note: This may not be needed on all Linux versions, however it is recommended to keep the HVM boot directory.
‘sudo mv /hvm/boot /tmp/boot.hvm’
‘sudo rm -Rf /hvm/*’ Verify the drive is now empty with ‘sudo ls -al /hvm’.
4. With the snapshot of the Volume from your PVM instance you’ll want to ‘Create Volume’ in the EC2 console. Keep the current volume size and create it in the same AZ us-east-1a. Find the new EBS volume and tag it Ubuntu-PVM. Attach it to the conversion instance as device xvdg.
5. From the ssh session on the conversion instance run:
‘sudo mkdir /pvm’
‘sudo mount /dev/xvdg /pvm’
Verify with ‘sudo ls /pvm’ that it is mounted and has the correct file structure. You should see the boot and other root directories. Then run:
sudo cp -p -R /pvm/* /hvm
sudo rm -R /hvm/boot
sudo mv /tmp/boot.hvm /hvm/boot
6. Verify there are now all the needed directories and files on the HVM volume with command
‘sudo ls -al /hvm’. You can now unmount the hvm volume. ‘sudo umount /hvm’
7. Find the Ubuntu-HVM volume and detach it from the conversion instance. Attach it back to the HVM instance as device /dev/sda1. Start the HVM instance.You should be all set.
8. Clean up the conversion instance and any unwanted left over volumes and snapshots.
9. Create secondary volumes from snapshot and attach to HVM instance.
There are two ways to install Mysql or Mysql-Client 5.6.
- Build from Source
- Use aptitude
I was lazy enough to try the second one and then realized that mysql 5.6 is not part of official Ubuntu Package repository. On searching more I found mysql experimental repository by ondrej, which is still in experimental phase but worked out for me on Ubuntu 12.04 LTS. So here is few simple steps you need to follow:
sudo add-apt-repository ppa:ondrej/mysql-experimental
Update Package List:
sudo apt-get update
Check If you got the latest package:
sudo apt-cache search mysql-client
sudo apt-get install mysql-client-5.6
Download adobe air installer
Install ia32-libs when you are installing it on 64 bit
sudo apt-get install ia32-libs chmod +x AdobeAIRInstaller.bin sudo ./AdobeAIRInstaller.bin
It might fail due to missing KDE Wallet or gnome keyring with following error:
“Adobe AIR could not be installed. Install either Gnome Keyring or KDE KWallet before installing Adobe AIR.”
sudo apt-get install libhal-storage1 libgnome-keyring0 lib32nss-mdns
wget https://raw.github.com/spaetzlecode/getlibs/master/getlibs sudo chown root:root getlibs sudo chmod +x getlibs sudo mv -n getlibs /usr/bin
Install the 32bit library:
sudo getlibs -p gnome-keyring:i386
If you got this message error: “
Failed to download file http://mirrors.kernel.org/ubuntu/pool/main/g/gnome-keyring/gnome-keyring_3.4.1-4ubuntu1~precise1_i386.deb"
then download the file right here:
getlibs -i "path-of-the-file"/gnome-keyring_3.4.1-4ubuntu1~precise1_i386.deb
Make the symbolic link:
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ./AdobeAIRInstaller.bin should work now.
I use evernote heavily to pen down everything I come across, to make lists, to remember things which I learned recently, to store details about the tasks I am working on etc. I was using Mac and Android to take notes and moved to ubuntu recently and realized that Evernote is not available for Ubuntu. I was kind of worried about moving all the data, but came to know about an app built on top of Evernote know as EverPad.
Everpad is a dead simple app which is an another interface for Evernote on ubuntu, but doesn’t have glossy looks like evernote app on android, Mac OSX etc. Everpad can sync content from evernote in every X minutes, which is configurable. Everpad can do almost everything what a native app does related to creating the content like creating notes, creating tags, creating notebooks, editing notes etc. But it can not delete notes, tags, notebooks etc and you have to go back to evernote app to do that on some different platform, which is the only missing thing and might be due to unavailability of the some set of apis.
sudo add-apt-repository ppa:nvbn-rm/ppa
sudo apt-get update && sudo apt-get install everpad
Once installed all you need to do is search for ‘Everpad’ in the Unity Dash or type everpad& on terminal. You will then see the app indicator appear on your panel. Once it does, click on it and select “Settings & Management” then “Authorise” to configure Everpad with your Evernote account.
That’s it! Your notes will now start to sync with Ubuntu.
To create a new note, simply click on the Everpad app indicator and select “Create Note” or click on an existing note to edit it. If you don’t see the Everpad Unity Lense then logout and log back in again. Finally, in the “Settings & Management” window, don’t forget to select the “Start with system” check box to ensure that Everpad starts automatically when you logon.
Happy Evernoting :)
RVM (Ruby Version Manager) is the Standard for upgrading your Ruby installation on OSX: https://rvm.io
To get started, open a Terminal Window and issue the following command:
\curl -L https://get.rvm.io | bash -s stable --ruby
Do not remove ‘\’ before curl, since it is added to ignore any alias created with name curl. It might fail due to absence of HomeBrew, So Install brew by running
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
( you will need to trust the RVM Dev Team that the command is not malicious – if you’re a paranoid penguin like me, you can always go read the source: https://github.com/wayneeseguin/rvm )
rvm list known
( shows you the latest available versions of Ruby )
rvm install ruby-<version>
Above command might fail with following error:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.7/x86_64/ruby-<version>.
Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Skipping `brew update` make sure your formulas are up to date.
Cowardly refusing to continue, please read ‘rvm autolibs’.
Which is an issue with the autolib status and error message is misleading and under an upgrade. Run following command to install latest stable version(specific version can be mentioned) with autolibs enabled(4):
\curl -L https://get.rvm.io | bash -s stable –rails –autolibs=enabled #–rails is additionally to install rails also, else just add –ruby
If above command fails during configure, you might be missing gcc and other developer tools which are packaged with xcode. Install xcode command line tool from apple developer portal, rerun above command and you are good to go.
Use a specific version
rvm use ruby-<version> Upgrading Ruby Version on Ubuntu Upgrading ruby on ubuntu is quite simple. Search for latest ruby package available:sudo ln -sf /usr/bin/ruby1.9.3 /usr/bin/ruby sudo ln -sf /usr/bin/rubygems1.9.3 /etc/alternatives/gem If latest ruby is not part of the package repository, follow stackoverflow answer to install latest stable version of Ruby.
apt-cache search ruby Install latest stable ruby package(assuming 1.9.3): sudo apt-get install ruby1.9.3 rubygems1.9.3 Point to the latest installed ruby(there is no harm in leaving old ruby packages installed)
SoapUi is an awesome tool fot functional testing of various kind of web service. It provides functionality of security testing, mocking web services, client generation, load testing, test automation etc. I was using SoapUi to test connection with a service before writing a client and it kept throwing following exception:
Sun Feb 10 12:59:18 GMT+05:30 2013:ERROR:javax.mail.MessagingException: Missing start boundary
javax.mail.MessagingException: Missing start boundary
Sun Feb 10 12:59:18 GMT+05:30 2013:ERROR:java.lang.NullPointerException
Sun Feb 10 12:59:18 GMT+05:30 2013:ERROR:java.lang.NullPointerException
I spent lot of time investigating and realized that there is a bug in SoapUi tool. For multipart requests it is not sending boundary header to the server while shows in the http log. So you have add “Content-Type” header with boundary to get rid of this. Hope it helps some one :)
In this post I would like to share my recent experience with one of the Nokia App Development event in association with NDTV. In this contest one had to submit app ideas, shortlisted ideas will be featured on NDTV. After that NDTV Jury will select top 10 application, and most interesting part of the event was the prize money.
I found it interesting since you don’t have to do anything, just submit your idea. I went to their website which was built by some of the awesome developers in the world and had twitter/facebook integration too :). I started writing my idea and there was a character limit of 500 characters, so I decided to split my idea into two. I submitted two ideas, one to find phone even if its in silent mode and second one to address issues when some one misses the phone at home. One of the best feature on their site was that you can not see ideas submitted by you :), and their search functionality was way better that google. So, I had to search “Gaurav” and iterate over all ideas to get these links :).
I was writing android application to solve these issues an year back and couldn’t complete due to health issues, so submitted here as an idea and got good response from people who saw this. Suddenly on 18th Jan 2013 I got a call from Nokia saying that second idea got shortlisted, I was on the way to my colleague’s engagement and couldn’t hear anything, So requested them to callback in an hour or next day.
On 19th Jan 2013, I got a call from Deepak from Nokia who told that my idea has been selected and I had to fly to Delhi tomorrow(20th Jan) for 2 days. There will be 2 days video shoots, I have to finalize and tell them in half an hour. This was on such a short notice and he didn’t give me any other detail. I kept asking, Ok I’ll come but what are the next steps, what will be the process like etc. either he was not willing to give or he didn’t have the data. I thought I can go to Delhi and will go to Jaipur(My Hometown) for couple of days. I asked him to book tickets from Bangalore to Delhi and Jaipur to Bangalore, while Jaipur-Bangalore is way cheaper than Delhi-Bangalore. He said fine he will do that and update in 30 minutes. I called my manager to notify that I might work from home next week, luckily he didn’t pick the call.
I was sure that I’ll get call from Nokia confirming the details, and I got call from Deepak in 30-40 minutes. He said Your app is not yet shortlisted and we have kept it on hold. Your plans are cancelled and if your app is shortlisted again we will send a mail with the details, I was like WTF. He didn’t even pretend to be sorry, may be Deepak was not willing to take pain of booking two flight tickets and picking another candidate was a better and shorter approach for him :). They think if they are ready to book flight tickets, everyone will cancel all their plans and reach Delhi for their publicity, but they should understand that everyone has their day job.
It gave me a sense of how events conducted by Nokia works, and how people there make decisions. They are spending 1M$ as prize money and they don’t even care about the quality, they just want to do it for sake of publicity and numbers. All the best guys, you are writing a new chapter in the history :).
I am very happy that I am not part of company where decisions are made with set of dices, but based on data.
Looks like writing this post worked, today(20th Jan 2013) I got another call from Nokia. This time Nitin called me, He felt sorry about the misunderstanding and told that idea has been shortlisted and they want me to fly to Delhi for two days. I said Ok, let me call you in half an hour to confirm :). I confirmed him and he said he will book tickets and send me in another half an hour. That made me slightly feel better ;).
I got flight tickets from Bangalore-Delhi at 12:30 pm for flight at 16:00 pm, still I had few minutes to pack my bags and leave :). I will share what happens at Delhi soon :)