Create Virtual Machine/OS on Ubuntu 12.04 with KVM

To manage multiple OS, you might have faced the need of Virtual Machines setup. If you are unaware of virtualization you can find more information here.

We will use kvm, vmbuilder and libvirt for making virtual image.

  • kvm – Full virtualization solution for Linux on x86 (64-bit included) hardware containing virtualization extensions (Intel VT or AMD-V).
  • vmbuilder – It is a Python-based software package for creating VM images of free software GNU/Linux-based operating systems
  • libvirt – It is toolkit to interact with the virtualization capabilities of recent versions of Linux

Build Virtual OS using KVM:

These instructions are followed on Ubuntu 12.04 LTS and debian based OS.
So, lets follow below instructions and commands step-by-step to create your Virtual Machines.

Step 1: Check Virtualization Support

First of all check for CPU supports hardware virtualization.

[email protected]~# egrep '(vmx|svm)' --color=always /proc/cpuinfo

Output of this command should display something like this:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflushmmx fxsr sse sse2 ht syscall nx
mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good nopl extd_apicidpni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy
3dnowprefetch lbrv
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflushmmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt rdtscp lm 3dnowext 3dnow rep_good nopl extd_apicidpni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch

If nothing comes , then you must stop from here as your hardware configuration do not support virtualization.
dd vmbuilder and kvm packages

Step 2: Install vmbuilder and kvm

Now we are going to install kvm and vmbuilder

[email protected]~# apt-get update
[email protected]~# apt-get install kvm ubuntu-virt-server libvirt-bin python-vm-builder kvm-ipxe

After that check if KVM has been successfully installed or not

[email protected]~# virsh -c qemu:///system list

Output should display something like this:

[email protected]:~# virsh -c qemu:///system list
Id Name State

If it is showing any error then something is going wrong.
(check if, kvm is enabled from your BIOS or not )

[email protected]~# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

(Output should look like this otherwise you would need to enable virtual support from your BIOS settings)

Step 3: Create a Network Bridge

We need network bridge on our server .

[email protected]~# apt-get install bridge-utils

Configure network interface for bridge.

[email protected]~# vi /etc/network/interface

modify it as below example:

auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
bridge_ports eth0

Restart network service to activate bridge.
Check with ifconfig you should see br0 interface with ipaddress
( eth0 will not show you the ipaddress)

Reboot the system.

Step 4: Create Virtual Machine

We will create ubuntu 12.04 server (amd64 arch)

Example command.

[email protected]~# mkdir virtualmachines
[email protected]~# cd virtualmachines

Below is the vmbuilder command. Run vmbuilder e.g. as follows:

[email protected]~# vmbuilder kvm ubuntu \
--suite=precise \
--flavour=server \
--mem 1024 \
--cpus 1 \
--rootsize '4096' \
--swapsize '1024' \
--kernel-flavour 'generic' \
--hostname 'ubuntu' \
--mirror '' \
--components 'main,universe' \
--addpkg 'openssh-server' \
--name 'rtvm' \
--user 'rtvm1' \
--pass 'rtvm123' \
--ip '' \
--mask '' \
--net '' \
--bcast '' \
--gw '' \
--dns '' \
--bridge 'br0' \
--libvirt 'qemu:///system'

Important parameters and its description:

suite: Version of Ubuntu to install
flavour: The “flavour” of kernel to use in the VM. Either “virtual” or “server”.
mem: Size of random access memory in MB.
cpus: Number of CPUs to assign to VM.
rootsize: Size of root filesystem in MB of VM.
swapsize: Size of swap in MB
mirror: source url of ubuntu default
hostname: Hostname of VM.
ip: IP address of VM.
mask: Netmask of VM.
net: Network of VM.
bcast: Broadcast address of VM.
gw: Gateway of VM.
dns: DNS servers for VM.
addpkg: APT packages to install in the VM. I will suggest to add openssh.
user and pass: username and password ( don’t forget )
dest: Directory where VM image will create.
You can get more information about vmbuilder parameters here.

Note: The IP’s and gateways used above are of my own LAN, you shall change it as per your own configuration.

After Creating Virtual Server check the xml file

[email protected]~# ls -l

You can find ubuntu-kvm folder

[email protected]~# ls -l /etc/libvirt/qemu/

You can find ubuntu.xml created

Step 5: Manage Virtual Machines

Check with the virsh ( Virtual Shell)

[email protected]~# virsh --connect qemu:///system

It will drop you in virsh prompt like this – virsh #

virsh # list

It will show you the running virtual machines list

virsh # list --all

It will show you all the virtual machines list

virsh # list --all
Id Name State
- ubuntu shut off

Starting a Virtual Machine

Start virtual machine

virsh # start ubuntu

Shutdown virtual machine

 virsh # shutdown ubuntu

Deleting a Virtual Machine

To delete a virtual machine, first terminate it (if running), and then undefine it:

 virsh # destroy ubuntu
 virsh # undefine ubuntu

To get more help with virsh command line type help, it will print all the possible commands.

virsh # help

Hope you find this tutorial helpful. Do drop in your comments any questions or suggestions about the post.

Some helpful links :

Google Decides to Shutdown Popular Image Editing Tool Picnik

If you are fans of Picnik, the online image editing tool, here is some bad news for you. Picnik will be shut-down from April 2012 onwards. Picnik made this announcement in its blog.


Picnik’s editing tools will still be available within Google+ images in the form of Creative Kit. But not all Picnik tools will be available. Even if Google does bring in all of Picnik’s image tools into Google+, that would mean users will need a Google+ account to use it.

A silver lining to Picnik closing down in April 2012 is that its premium features will be free to all users until it actually closes down.

I have always considered Picnik to be the best online tool for editing images. Picnik was bought by Google to improve its online image editing options. I was so impressed with this new acquisition from Google, that I wondered if Google might use this along with Picasa to challenge Flickr.

Google’s Clean up act

I guess this is part of Google’s clean-up act which has seen a host of not so popular products being canned. It first shutdown a host of services in September 2011 which included Google Toolbar and Aardvark. The in November 2011, it shutdown even more services like Google Friend Connect, Google Wave, Google Gears and others.

Usually most of these shutdown announcement have included more than just one or two services and I guess we might wait for a couple of days to see if Google will be phasing out more services.

What are your views on Picnik being closed down? Do drop in your comment.

Why Twitter Has Problems with Google’s New Personalized Search?

Yesterday, I wrote about Google introducing ‘search plus your world’ which is basically a toggle for looking up personalized search results and normal search results. The problem is that, personalized search results only show up Google+ related links at the moment.

Another possible issue with Google’s new tweak to search, is that personalized results show up as default. See the image below which show personalized search results. You can click on the toggle to remove all personalized search results but we know most people will not use the toggle.


Twitter’s problem with personalized search results

Twitter seems to be a little nervous about Google search now being partial to Google+. At the moment the only social results showing up on personal results are from Google+. Links to Twitter and Facebook are conspicuously missing from personalized results.

Twitter released an emailed statement shared by AllThingsD, explaining why the new developments are bad for Twitter and the internet in general.

For years, people have relied on Google to deliver the most relevant results anytime they wanted to find something on the Internet. Often, they want to know more about world events and breaking news. Twitter has emerged as a vital source of this real-time information, with more than 100 million users sending 250 million Tweets every day on virtually every topic.

As we’ve seen time and time again, news breaks first on Twitter; as a result, Twitter accounts and Tweets are often the most relevant results. We’re concerned that as a result of Google’s changes, finding this information will be much harder for everyone. We think that’s bad for people, publishers, news organizations and Twitter users

This might be a way for Google to force social networks to share data with itself. At the moment all links on Twitter are nofollow, which means a Google bot cannot follow the link on a tweet. Google is right in the sense if they cannot follow a link on a tweet, they cannot vouch for a tweet’s relevance either.


But then if all links on Facebook or Twitter were dofollow, these services could face a serious issue of spam, where webmasters might exploit these social networks for backlinks.

Even if that happens, I doubt Google will rank a link from social media very highly anyways, as it might affect the quality of its own search results.

I feel Twitter does have a point, but Google can hardly be expected to not leverage their own product. What are your views? Do drop in your comments.

YouTube’s New Design is Available!

Redesign of YouTube was probably a tough nut to crack for the folks at Google, as it was playing around with a very popular layout. The new layout was available thanks to a hack but starting today it will be available for all users.

Thankfully YouTube does not mirror other Google products and the distinct identity of YouTube has been left intact.


Emphasis on Social Connections

YouTube is Google most successful social network. Yes, it does have Google+ which is growing fast but YouTube has become a great social product even without a real plan of becoming one.

What more is that YouTube has an awesome 3 billion videos viewed on it. So it is natural that with the new design social interaction would come to the forefront. The overall management of your videos, comments on them and socially shared videos is organized a lot better than before.

Users can also connect their social profiles from Facebook, Twitter, Orkut and MySpace to YouTube.  Google+ activity shows up automatically.

How to connect Facebook, Twitter to YouTube

To add new other social accounts, click on the top right hand corner icon displaying your YouTube username. From the drop-down select Settings.

Now on the left hand column click on Sharing. Here users can connect other social networks to YouTube.


What are your views on the new design for YouTube? Do drop in your comments.

(via YouTube Blog)

Adobe Loves Apple: To Discontinue Flash Support for Mobile Platforms

Adobe_Flash_LogoAdobe has decided that it cannot sit out of the Apple party and according to ZdNet  will discontinue Flash support on mobile platforms. Adobe briefed its partners about moving away from Flash for mobile phone OS with this quote.

We will no longer adapt Flash Player for mobile devices to new browser, OS version or device configurations.

This basically makes it possible for Adobe to feature on Apple products which have famously resisted Flash players on their browsers, claiming they were from the PC-era and did not fit into the post-PC era. This was supported in an article by Steve Jobs where he made his views public on Flash.

Did Apple kill Flash on Mobiles?

No. Apple might have started the trend of doing away with Flash and correctly estimated that HTML5 would be used more for streaming videos and gaming. Adobe also could not exactly kill a technology that other platforms wanted. But lately with Google and even Microsoft opting to move more towards HTML5 standards for browsers on the OS for mobile phones, it was pretty much end game for Flash.

What are your views on Flash being killed off for browsers on mobile phones? Do drop in your comments.

Google Reader Gets Revamped to Mixed Response!

Being an avid user of Google Reader, I’ve been waiting for the interface revamp which other Google services like Docs, Translate etc. got long ago. This morning Google Reader started rolling out their new interface and also integrating with Google+.


That’s how Reader looks, now. You can see they have made the interface very clear and crisp, which is needed for a feed reader. You can now ‘+1’ any article using the +1 button embedded at the bottom of every post.

Upset over Redesign!

Some regular Google Reader users; will lament the loss of human curation; which was possible by following other users who would often ‘share’ or ‘like’ interesting posts on Google Reader itself. As these carefully networked has been done away with by Google and it probably understandable as they want to push the use of Google+.

Unfortunately this has upset some Iranians. That’s because almost every social network is banned in Iran, and the only way to connect and share content with others was through Reader’s social features.

If you use Reader’s social features, you can now export your shared items and all from Reader settings.

Finally, if you want to customize Reader to your needs, there are tons of extensions, scripts and even alternatives, we’ve covered a lot of them.

Link: Google Reader

Chrome Web Store Gets New Design to Improve User Experience

Being a Chrome junkie, I often check new apps and extensions at the Chrome Web store. Like everyday, I checked Chrome Webstore today and what I’ve noticed is, it has got a clean redesign, probably built heavily on HTML5 (as web store does not have to support older browsers). 🙂


The homepage now features best rated apps (in your country) in the header and then followed by endless number of apps, everything on the same page. You can now install any app/extension by just hovering your cursor on any thumbnail and a click on add to chrome. The navigation bar on the left side is sticky.

Click on an app to get more info, in a new window, where in you can have a tabbed view of details regarding the app. Some of the app collections like New Additions doesn’t work anymore making it hard for bloggers to find new apps/extensions.

Google also adds two customization features, one is the ability to change the location and another is multilingual support. Click on settings icon (make sure you signed into your Google account) > Location > Choose any location you want.

This is useful if you want to see what extensions are popular worldwide, not just your country.

The interface looks more suited for touch screens, but there seems no reason for it tablets do not run Chrome.

Do you like the redesign? Tell us what you think.

Link: Chrome Web Store

Mobile Friendly SlideShare Adopts HTML5

There’s a lot of buzz on HTML5 these days, especially because all the modern browsers and mobile devices support it, and you don’t need a plugin installed for it, unlike Flash.

SlideShare, world’s biggest platform to make, view and discover presentations goes HTML5, apart from presentations, it also supports PDFs, documents, videos and more, making it a perfect place for making and sharing presentations. This seems to be a right decision taken at the right time, as more and more apps are now adopting HTML5.


So, how will HTML5 make SlideShare experience better?

  • SlideShare is now universal – Supports all devices including Apple ones.
  • Slides will be 30% faster!
  • A plugin free experience – To view slides all you need is a modern web browser.
  • Search Engines will be able to read the slides.

That said, slides embedded in blogs, webpages and old browsers like IE 6 (which majority of people use) will still run on Flash.

For a demo, they have put a HTML5 slide on the homepage, click the link below, to check it out.

Link: SlideShare

Creator of C and UNIX, Dennis Ritchie Passes Away!


Anyone who has read a book on C programming language, has probably come across the name Dennis Ritchie, in the first introductory chapters.

Dennis Ritchie passed away after a long illness. He was 70 years old.

Dennis Ritchie, created C Language. He worked with AT&T Bell Labs in the early development part of the language.

Ritchie also before his creation of C language, had also teamed up with Ken Thompson to create the UNIX operating system.

Even though I am not a programmer, but I can understand the vast impact of C programming language.

Today, C is the second-most used programming language and led to development of newer languages like C++.

There is no doubt that the world has lost one of the most iconic name in the software programming.

(via TechCrunch)

Related: Infographic on Programming languages

BlackBerry Outage Downs BBM and Email!

BlackBerry_logoRIM’s BlackBerry network which allows users access to internet, messenger and email has faced an outage for the past few hours.

This has affected users across Europe, Middle East and Africa. Potentially this will impact millions of users. It is the last thing RIM needed while facing the heat from the rise of Apple’s iPhone and Android based smart-phone.

BlackBerry’s woes…

BlackBerry has been in the news for all the wrong reasons in the past few months and years. It has faced criticism over its secure network with many governments across the world, asking RIM to enable access to their network.

Also its tablet offering called BlackBerry PlayBook has hardly met any success like its competitors, mainly iPad and Android based tablets from Samsung.

Hopefully the network outage will be resolved soon, allowing users to be connected. I won’t be surprised that once the network is up, quite a few of them might search for information about a iPhone. 😉

Are you a BlackBerry user and are you facing issues? Do drop in your comments.

Source: BlackBerry on Twitter