How to increase the size of your VirtualBox HDD WITHOUT losing any Data

Has it ever happened that you are working on a dev Virtual Machine and suddenly you realised that you have run out of hard disk space ? And then, you had to do the tedious job of manually transferring all your changes, repos, config files, etc. to a new VM ? Well, in this post, I am going to tell you how to increase the size of your Virtual HDD, whether the HDD is in the native VDI format or a different format like VMDK, without losing ANY data and continue your work.

Virtualbox Logo

The steps mentioned in this post are for *NIX OSes like Linux and Mac OS. I have personally performed this on the Mac OS X 10.9 (Mavericks), but the exact same steps are applicable for Linux. I guess, there should not be any different for Windows either.

A quick background : The reason I wanted to increase my Virtual HDD size is because I ran out of space trying to download the Android source code. That’s right, I am trying to build Android from scratch and after downloading 17GB  of source code from the Cyanogenmod github repos, over a period of 5 days, I suddenly ran out of disk space. The Android story is for another day, another post.

As mentioned earlier, I have performed this on a Mac OS X Host machine with Ubuntu 12.04.3 (32-bit) as my Guest OS. The VM had a mere 20GB HDD and that too I had configured as a VMDK disk as opposed to the native VDI (Don’t ask!!)

So, without further ado, here’s how the magic happens :

Step 1a) : Backup your disk

Can’t stress this enough. Always, …. Always backup your disk. If I had to download 17GBs again, I would have to kill someone first to justify the action.

Now, you can’t just “cp” your virtual HDD file and hope it will work with your VM. There’s a whole lot of UUID issues with VirtualBox. To cut a long story short, don’t “cp”. Execute the following command instead :

$ VBoxManage clonehd <path to>old_ubuntu_hdd.vdi <path_to>backup_ubuntu_hdd.vdi

With this, VirtualBox assigns a different UUID to the backed up vdi and you can use this HDD as if it were your old one.

Now, if I were you, I would do just that. To be on the safe side, Release your current HDD from the Virtual Media Manager GUI tool.

VirtualBox Media Manager

 

Then go to your VM’s settings and add the newly backed-up VDI as the HDD for your VM. Then boot into it and verify that everything looks good.

Ok, We’re done backing-up. Unless, you are like me and had configured your virtual HDD in Vmware’s VMDK format.In that case, you need to execute Step 1b) below rather than Step 1a) above.

Step 1b) Convert your disk to VDI and backup your disk

Actually, it’s exactly like Step 1a) above ,except that you have an additional parameter to VBoxManage. Execute the following command :

$ VBoxManage clonehd <path to>old_ubuntu_hdd.vmdk <path_to>ubuntu_hdd.vdi --format VDI

Again, as above and especially after the conversion, make sure that you bootup the backed-up HDD and ensure that you can everything is working.

With our HDD safely backed up, lets tread on to more dangerous waters !!

Step 2) Increase the size of your Virtual HDD

This step is actually the easiest step. Just execute the following command :

$ VBoxManage modifyhd <path_to>Ubuntu_Hdd.vdi --resize <size in MB>

For example, in my case , I wanted to increase the size to 100GB, so the command was something like this :

$ VBoxManage modifyhd ./AndroidDev.vdi --resize 102400

That’s it !! We are done increasing the HDD. You can check this my opening the VirtualBox GUI tool , selecting your VM, clicking on Settings, then Storage and checking-out the value of the “Virtual Size:”

In my case it shows 100GB.

Forward march !!!

Step 3) Increase the size of the Linux Guest OS partition

With the above step, if you try to boot, you might either get an error, or see the same disk size from the Guest OS. What we need to do is resize the filesystem of the GuestOS to match the size of the partition or HDD we just increased.

For this, you need another Live Linux CD/DVD/iso like Ubuntu or GParted. Actually, we are going to use the gparted utility to do the resizing. So, as long as you have any OS which has this tool, it’s ok.

Now, add the Live Linux CD/DVD/iso to your VM and boot into.

Fire up Gparted session and resize your filesystem

GParted

That’s it !! That’s truly, finally it !!!

You have successfully resized your virtual hard disk keeping intact all your data.

I, have successfully resumed downloading the Android source.

Virtualisation | No Comments

Booting Linux in under one second using swiftBoot

One of my former colleagues and friend, Pranav Peshwe, pointed me out to this company called MPC Data who has developed a solution called swiftBoot.

Using swiftBoot, these people have managed to boot into a fully running Linux OS in under one second.

Take a look at this unbelievable video to check it out for yourself.

The developers claim that there is no other gimmick involved other than optimizations done, as a result of a good understanding of the Linux system.

The demos show that not only does the system soft-boot in within a second but it also function normally after that.

There is a second demo of the same on a TI OMAP3530 based OMAP3530EVM board. This time, they use a stop-watch for monitoring the performance.

I know if makes business sense to use this to provide a service to OEMs and ISVs, but imagine what havoc it would create if they open source their findings and it gets merged into the mainline kernel.

Software | No Comments

Linux on Refrigerators using Enlightenment

It is said that NetBSD is one of the most ported Operating Systems in the world. It runs on almost everything, from massive Servers to even a Toaster.

Well, Linux isn’t far behind !!!

Electrolux, a manufacturer or home and kitchen appliances, have decided to use Linux with Enlightenment, for their latest product, a smart refrigerator called Infinity I-Kitchen.

The Infinity I-Kitchen features a high-resolution touch-panel display and rich, intuitive user interface. Using this panel, it’s possible to visualize basic information like current and external temperature. Besides this, it has several applications like Notes, Calendar, Contacts, Recipes, etc. You can see how this is the modern version of magnets holding up notes on our refrigerators.

Besides these, the Photos application converts the touch-panel into a digital photo-frame. I think this is a really cool feature considering the hardware.

Electrolux Touch Panel Display 1Electrolux Touch Panel Display 2

The hardware used is a Freescale i.MX25 processor running at 400Mhz with 128 MB RAM. The display panel will have a resolution of 480×800.

The awesome thing about this is that the rich user interface is rendered completely in software as there is no hardware accelerator on the device. This feat is achieved using the Enlightenment library suite also known as Enlightenment Foundation Libraries(EFL). The  Enlightenment suit contains libraries like Evas, Edje and Elementary which gives the rich look and feel to the user interface.

This marks as a very important development for Linux since Electrolux is one of the first mainstream consumer electronics companies to have embrace Linux in a high-end product.

Industry News | No Comments

Ubuntu 9.04 Upgrade : The Screenshot tour

I have been upgrading my work Laptop (a Dell D630) since Ubuntu 7.04.
The first couple of times there were a few glitches, nothing a few Google searches and “sudo apt-get install”s couldn’t fix.
However, the process is getting increasingly reliable and I urge users to go this route.

For upgrading from Ubuntu 8.10, Intrepid Ibex to 9.04, Jaunty Jackalope, I decided to use the Alternate CD.
The Ubuntu Alternate CDs are released alongwith the Desktop and Server versions for that release and are basically text-based installers.
Confession time : I did not know that one could upgrade using the Alternate CD. I always did it over the Internet. That shows you how much of a Ubuntu geek I really am 😀

The only command you need to execute to begin the installation is :

$ sudo update-manager -d

That’s it !! Just keep on “Next” ing and in about 2 hours you should be done !!

And …. Voila !!!

No breaks, no crashes, no glitches !!!

All my drivers are working, my Ethernet, WiFi, my Audio, my X Server, my Touch-pad, my Mouse …. my EVERYTHING works out-of-the-box !

And Man is this Release FAST !!

So just take the jump guys and upgrade to the Jaunty Jackalope.

Open Source | 1 Comment

Ubuntu on Windows

Ubuntu Linux has opened a lot of doors for open source developers.

The real enthusiasts, the midnight oil burner are coming up with some AMAZING applications.

One such KICK-ASS app is the Portable Ubuntu, although I think the name of the project is a misnomer.

Portable Linux installs a Windows app that emulates Ubuntu Linux. In fact, it IS Ubuntu Linux modified and dressed up to run on top of Windows.

That is why I think the name’s a misnomer. It should have been simply “Ubuntu on Windows” or something like that.

Portable Ubuntu is the result of a magic conjured up from  Colinux Kernel : which in itself is a very interesting Project to run Linux on Windows, X-Ming :  which is the X Server for Windows and Pulseaudio : which is a cross-platform sound server.

As soon as I learnt about this project I knew I had to install it and without further ado, I promptly did.

Here’s what a Vista Desktop would look like with Portable Linux running :

Portable Ubuntu screenshot

Portable Ubuntu screenshot

I love it !!

For years I’ve been running Windows apps on Linux using Wine.

Now it’s time to do otherwise  !!!

Apart from Portable Linux, there is another app which has a Ubuntu-Windows connection.

It’s called Wubi (Now THAT‘s a name 🙂 ), but I’ll be talking about it in more detail and screenshots in a later post.

The Portable Ubuntu image is quite large, about 700MB, but to all the Ubuntu fans out there,you HAVE TO try it out.

In fact, I did it just for Spite !!!

Open Source | No Comments

7 Linux Distros reviewed

I’m a little late in posting this article, since most of the Distros mentioned here are out with newer versions.

But since  it was so informative, I thought I’d post it anyways.

I thought I was the only jobless person interested in trying out Linux Distros on my VirtualBox or sometimes triple booting. But it turns out there are actually others who do 7 of ’em at a time and, as if that wasn’t enough, they make it a point to document it too.

Cool !!

The folks at Informationweek have done a Shootout of 7 popular Linux Distros. They did it on 5 different machines as if to prove a point or something.


Does it live a lot to be desired ? Have they left some very notable cadidates like the fanatically followed Kubuntu or the geeky Gentoo ? Did they miss out on a coupla hundred tests ?

There are obvious answers to the above questions, but that’s not the point.

The point is, Ubuntu is arguably the best Ditro around and I use it !!! 🙂

Open Source | No Comments

Free Linux Online Courses

After my last article on eLearning, I came across yet another resource of free online Linux courses.
Brajeshwar , who has started writing a stream of articles on Linux lately, has a new post on Online courses for Linux newbies.

Check ’em all out HERE

I personally think that the IBM series is the best resource since it is for the intermediate and above level of users.

If any of the readers know any more screencast tutorials, do let me know.

Open Source | No Comments

eLearning Open Source

OpenVarsity is an initiative for eLearning, or learning with online tutorials, Open Source and Free Software technologies.

As soon as I saw the first prototype of it’s course I was convinced that this would be a great way for newbie enthusiasts to get their hands dirty.

I have already emailed Naveen from OpenVarsity, pledging my full support and being available for any screenshots, tutorials, etc.

I myself wanted to do something on similar lines for OSD, wherethe goal would be to atleast get users started on various topics.

I am currently also experimenting to record Screencasts, so that I can have video’s similar (but instead of comments I will have to do Voice-overs) to Naveen’s. I have installed Istanbul and xVidcap for recording the screencasts, but it seems xvidcap is the best software to have for this.

I have installed Moodle on this site and have am learning to design courses. I wonder if I could upload and integrate videos easily into moodle.

I would love to hear if anyone has any suggestions on what tutorials they would like to see in Basic Linux usage .

Open Source | No Comments

Another Runner in the Race

After RoadRunner , IBM’s supercomputer with 6,480 dual-core processors, running Red Hat Enterprise Linux, it is now the FreeRunner.

OpenMoko‘s Neo FreeRunner, running on Linux OS, is being made available to consumers worldwide. You can order it directly from their site, from TODAY !!!

Openmoko\'s Neo FreeRunner

The truly awesome thing about this phone (apart from the tech specs available on the site) is that not only can developers write their own software for it, right from the kernel and drivers to application , modifying the look and feel for the phone, but even hardware manufacturers can re-design it since it’s CAD file is available under the open source license.
I think a price of $399 or Rs.17,000-odd for a truly customizable phone is completely valid.

Open Source | No Comments

Codeweavers boost Linux Migration

Codeweavers, the company which gave us the award-winning software to run MAC OS and Windows software on Linux, is giving it’s full support in Lindependence ’08.

Lindependence ’08 is a community endeavor to migrate not one, not ten, but the WHOLE TOWN of Felton, California to Linux. Oh yeah !! That’s what I call mass conversions.

The CrossOver suite of softwares, to run the MAC and Windows applications on Linux,  will be made available by CodeWeavers to every computer user in Felton. As a result, the newly converts will still be able to use their favourite Windows applications on Linux.

“If the citizens of Felton are ready to take the effort, we want to help them as much as possible.”, said Jeremy White, CEO and President of CodeWeavers.” We think that these sorts of migration efforts vivdly demonstrate that Linux is ready for prime time”

CodeWeavers is also a leading corporate backer of the Wine project.

This is truly an encouraging step by CodedWeavers, one that is exemplary for other ISVs to encourage mass linux adoptions.

Open Source | No Comments