Wednesday, March 2, 2011

Why I Virtualize

I made the permanent switch to Ubuntu almost 2 years ago. I haven't looked back.

While I don't believe it is quite ready for prime time, it gets close with every release. By prime time, I of course mean, will I have to support it. I have tried to talk my parents into it, but only half-heartedly; I know I'll have to do more than I already do.

Since I started using Ubuntu I have also been using VirtualBox extensively. Originally, it was just for work, i.e. no one seems to allow the easy integration of linux distros onto their network. I say that based on just my experience, which is not extensive. There are also certain work related tools that only run on Windows.

Here's the short list of tools that I use that require Windows:
- GoToMeeting - I love the tool, from a collaboration perspective. I hate that I have to use Windows to use it. Fortunately, I always have 1 or more Windows VMs up and running.
- Neoview Management Tools - this doesn't matter much anymore, but it was one of the original reasons.
- Quicken - I haven't moved to the cloud version yet. I probably will. Soon.

Wow. I think that might be it. Cisco VPN used to be a reason until I found vpnc. That's really not too bad. I could be down to 1, GoToMeeting. I did find that Adobe has a product that is OS independent, pretty sure it uses Flash. Definitely a future consideration...

I don't game, at all, so I have no need for Windows there.

The reason I virtualize? Compartmentalization.

Here's why:
  1. Last year, while on site at a client, my Windows VM got corrupted. I was back up and running within 2 hours. If that had been my host system, I am sure it would have taken much, much longer. I only put the software on the VMs that I need. Nothing more, nothing less. Windows Office. Notepad++. WinMerge. SQL Developer. Maybe a few others specific to the client.

    I don't store any data on the VMs, I use Shared Folders and write to my host disks. If I lose one, no big deal.
  2. Single Unit of Work. I can create a VM with an Oracle database, one with OBIEE, one with Subversion and a Wiki (ok, not a single unit of work, whatever). Since the purchase of my new computer, this is my reality. If I lose one of those VMs, I don't lose all the work I put into them. I just rebuild the one I need. Annoying, yet. Catastrophic, no.

    If I built a single system with all of these components, tools, etc, the loss of my computer would be catastrophic, even with the best backup policy in the world.
  3. Finally, there was last night's incident. I have a large VM (12 GB RAM allocated, 4 processors) for this medicaid database I am putting together. I had a 20 GB OS partition. At some point, VirtualBox decides to write that RAM to disk, all 12 GB of it. Space available: 0 (zero) bytes. I couldn't do anything. OpenOffice kept telling me I had no more space to auto-save, had to kill it. This even after I pointed 99% of the settings files away from the OS partition.

    I tried symbolic links. I was successful with the Desktop, but nothing else. I tried, very unsuccessfully to point /dev/shm, /dev/pts, /var/run and /var/lock to a different location. If I had a better understanding of how the OS works, it might not have been a big deal, but for me...

    Since you can't expand a partition (please don't tell me you can), I decided to just wipe the host OS and re-partition my drives appropriately. Total time* to get everything back up and configured? 3 hours. VirtualBox was easy, pull in the vdi files, create a new VM and voila, everything is back to normal.
Those are my reasons for virtualizing. I suspect those of you who use VMWare, VirtualBox or any other virtualization tool for a living might have different or better reasons. Please share.

* Total Time = Does not include the fact that the first USB Flash Drive I was using didn't work properly. I spent 4+ hours trying to get GParted to work to no avail. Research pointed to the possibility of using a different one. I went to BestBuy, bought a new one and everything went smooth. By the way, to add to this frustrating day, my battery died at BestBuy. Awesome.

7 comments:

Stewart Bryson said...

>> Quicken - I haven't moved to the cloud version yet. I probably will. Soon.

I used Quickbooks Online with my old company, and another cloud-based product with Rittman Mead called Xero.

Xero is better by leaps and bounds: www.xero.com

Jake said...

Great points. Compartmentalization is a big one for family support.

Install Linux w VBox and build a Windows VM. If Windows gets a virus, simply revert and patch.

oraclenerd said...

Absolutely.

My hold out, so far, has been how to automate the start of the VM when the host system fires up. I doubt it is terribly difficult, I just haven't gotten around to it yet.

oraclenerd said...

@stewart

I'll take a look. Gratzi.

effendi said...

Totally with you :D Couple of random thoughts
1) Just make sure wherever you're storing your actual data (the source of the shared folders on your host), you're backing it up / replicating it. Dropbox, external storage sync'd via rsync, whatevs.

2) On the dumping the RAM to disk, did you have huge pages setup and configs set to keep SGA locked into RAM?

Linux rocks :D

oraclenerd said...

I was hoping you would read this, I know you use VMWare quite extensively. We should have multiple beers sometime to discuss. :)

To your questions:
1. I need to start doing that. I keep waiting for the Google Drive (GDrive?) to come online, I need to just pay for some space on DropBox and be done with it.
2. I have absolutely no idea what huge pages are. I've seen mention of them before, but I lack the experience to understand WTF they are. Still just a rookie, but happy to learn. Any pointers you have are much appreciated.

I'm digging the Ubuntu. I wish things never went wrong, but nothing is perfect. It gets closer and closer to "just works" which is nice. As much as I like to tinker, sometimes it gets annoying, like when i have a deadline...

Anonymous said...

Kevin Closson has written a lot about hugepages, though you probably want a simple example first.

Pretty pictures.