Tuesday, December 1, 2009

Dual Booting versus Virtual Machines

Overview


The economy has changed the required skill sets of the IT professional. There was a time where being a specialist in a particular technology was king. Now, IT professionals are expected to be jacks and jills of all trades because companies typically cut IT budgets during lean times, and CIOs and IT managers want to get the most out of their limited budget. For example:

  • A server administrator not only needs to know Windows, but s/he needs to know Linux and Mac, and s/he needs to know how each system interacts with one another. Server administrators are also required to know how to write scripts to perform tasks.

  • A network administrator not only needs to know how to configure a router or design a network architecture, but s/he needs to be familiar with configuring and designing a VoIP setup. Some network administrators are also expected to know how to perform server administration as well.

  • A SharePoint professional needs to not only know how to administer a SharePoint server, but s/he need to know how to administer Windows servers, understand Active Directory, understand Exchange Servers, and perform basic DBA functions on SQL Servers. The pro may also need to know how to write custom code for SharePoint.

  • A developer in a programming language not only needs to be familiar in the programming language, but s/he also needs to know how to perform basic database administration, such as creating tables, views, and stored procedures in a database, and s/he needs to understand basic networking concepts since a number of development architectures are using web services.



When it comes to system equipment, the price of equipment is cheap compared to five years ago; we are getting more "bang for our buck", so to speak. Now that powerful machines are more affordable, IT professionals can position themselves to being jacks and jills of all trades either by setting up their machines to dual-boot between two (or more) different operating systems or by setting up virtual machines running different operating systems.

Dual-Booting


Dual-booting allows the user to set up the machine to run more than one operating system and choose which operating system one wants to run. Typically one would set up dual-booting to run two different operating systems, such as Windows and Mac OSX or Windows and Linux. However, some may set up dual-booting to run different versions of Windows, such as Windows XP and Windows 7, or Windows 7 and Windows 2008, but that is typically done by students who are simultaneously taking a class in a desktop operating system and a class in a network operating system.

NOTE - depending on how the boot loader is configured, you may automatically boot into one of the operating systems by default if you don't press a key sequence to allow you to choose which OS you would like to use.
Typically in dual booting, your disk is partitioned in a way where one partition is for one operating system and another partition is for the other operating system. Your system is now set up to allow you to choose which operating system you would like to run.

The selling point of dual-booting is performance. By dual-booting, you get full access to the memory and processor as well as other peripherals (video, network card).

There are a few downsides of dual-booting.

  • Having to reboot your machine to switch operating systems may become a nuisance after a while. For example, say you have a dual-boot system with Windows 7 and Ubuntu 9. If you're working in the Windows system, and you need to go to your Ubuntu system while you're in the middle of working in your Windows system, you have to reboot your machine, choose to boot in Ubuntu, do what you need to do, and reboot again to return to Windows.

  • If you need to change your dual-boot setup, it requires a lot of work. For example, say you have a dual-boot system with Mac OSX Snow Leopard and Windows 7. If you decide that you would rather dual-boot between Mac OSX Snow Leopard and Fedora 12 (instead of Windows 7), you need to do a little bit of work. You may have to repartition your disk, or you may have to reinstall the OSes. If you have to switch back to a MacOS/Windows dual-boot from a MacOS/Linux dual-boot, you'll have to re-do everything.

  • If your disk partition runs out of space, you're out of luck - unless you want to reconfigure your partitions and reinstall your operating system(s).



Virtual Machines


NOTE - you still have to abide by the software licensing rules when using virtual machines. For example, if your Windows 7 software is licensed for one machine, the virtual machine setup for Windows 7 counts as one machine.
There are numerous software packages that will allow you to set up a virtual machine, which is a software "emulation" of a computer that runs exactly like a physical computer with the operating system running on it. Since IT departments are expected to do more with less because of budget restrictions and requirements to reduce the company's carbon footprint, virtualization is fast becoming a popular solution.

The selling point of virtual machines is convenience. If you are running one operating system but you need instant access to multiple operating systems, you can easily do this with a virtual machine without having to reboot your main machine. If you no longer need to use a particular operating system, all you need to do is delete the virtual machine rather than having to reconfigure your disk partitions and reinstall software.

Another selling point of virtual machines is you can set up a virtual "network" (for a lack of a better term) instead of running multiple machines. For example, if you are studying for your Windows certifications, you can set up one virtual machine to be the Windows server, and you can set up another virtual machine to be the Windows client that logs in to the server's domain.

There are a few downsides of virtual machines.

  • Because the virtual machines are sharing the resources with the main operating system, performance is not as good as running a dual-boot or standalone machine running the same operating system.

  • You may lose access to peripherals depending on the virtual machine software that you use. From my experience, I haven't had problems with VMWare or Parallels, but I've read about some instances of issues with the virtual machine software recognizing USB ports.



Dual-boot or virtual machine?


The decision to dual-boot or set up a virtual machine depends on the situation. Personally, I prefer using virtual machines over setting up dual-booting because of the line of work that I do. On my Mac OSX Snow Leopard machine using Parallels Desktop, I have the following virtual machines: Windows Server 2003 running SharePoint Server and SQL Server 2005, Windows Server 2008 R2, Windows XP, and Ubuntu 9. When I'm done with an operating system, I can just delete the virtual machine with ease. I also have the virtual machines so I can set up a "mini-domain" between the Windows XP machine and the Windows Server 2003 machine.

That said, there may be situations where a dual-boot is better than a virtual machine. For example, I have students who are simultaneously taking courses in Windows and Linux. In some of the cases, especially with absolute beginners, it's easier for the student to have a dual-boot system instead of Linux or Windows running in a virtual machine because of the additional learning curve involved with setting up the virtual machine so the student can participate in the lessons.

Additional Reading


This article by darthpenguin provides additional insight on choosing whether to dual-boot or set up a virtual machine.
For those of you in the Mac world, this article by Robert Movin discusses the debate between dual-booting and virtual machines on a Mac.

Additional Information


Below is a list of desktop virtual machine software.

  • Virtual PC, Microsoft

    http://www.microsoft.com/windows/virtual-pc/

    This free software from Microsoft allows the user to run multiple versions of Windows on the same machine. You can also run other OSes from Virtual PC with a little jury rigging.

  • VMWare

    http://www.vmware.com/

    This commercial software is frequently used throughout the industry for creating virtual machines. While it's a fantastic software package, it does cost money. VMWare Workstation costs about $133 USD, and VMWare Fusion (for Mac) costs around $56 USD.

  • Parallels

    http://www.parallels.com/

    This commercial software package is frequently used on Macs for desktop virtualization. While this is also a fantastic software package, it does cost money. Parallels will run between $70 - $80 USD.

  • Virtual Box, Sun Microsystems

    http://www.virtualbox.org/

    Virtual Box is a free, open-source software package from Sun with software versions for Windows, Mac OSX and Linux. I have students who swear by VirtualBox. However, based on personal experience, I found that VirtualBox is a real "resource hog", so you do need a very powerful machine to run this effectively.

  • Hyper-V, Microsoft

    http://www.microsoft.com/windowsserver2008/en/us/hyperv-main.aspx

    This software comes with Windows Server 2008. The selling point of this software is it's written more for server virtualization. I wanted to mention this since there are students who are learning Windows Server 2008 and they are using this as their main OS for their machines.

6 comments:

Anonymous said...

Very thorough explanation. Thanks!

Jennifer said...

Thank you for the comment, Anonymous!

Raihan said...

Nice article,Thanks.
Once I had problem with virtual machine. I wrote a code to send message using cell phone using gnoki. It worked fine in Fedora but couldn't make it run using VMWare :(

Jennifer said...

Thanks for sharing, I.....

I'm glad that you shared that story because you bring up an excellent point. There are some quirky things that happen in a virtual machine environment sometimes.

I've seen a student set up a physical test network with Windows as the server and Linux as the client to test a hybrid network. With the physical lab setup, the scenario worked great. However, as soon as he tried to set up a "virtual network" in VirtualBox so he could test it outside the lab environment, the scenario didn't work anymore, even though all of his configuration was correct.

Oliver H. said...

Thanks for sharing your thoughts. I am about to switch to a new private machine at home.

I had dual boot machines at home ever since 15 years or so, first OS/2 and Linux, then Windows XP and Linux. At work I am on a virtual host since a year.

I also used coLinux for a while with coLinux having the advantage over VM's to be able to access real partitions on your disk drives directly by mounting those.

I think now that I have the chance to setup a new machine from scratch I will try a VM though.

Yes, the convenience factor strikes me, though there is one huge disadvantage. All your files in the VM, your virtual disk, become one file on the host system. If that file gets corrupted, bye bye VM. In a dual boot environment if one file becomes corrupted you still have access to the disk and all other files.

One last note which might be important to some dealing with Windows 7: If you want to use Bitlocker drive encryption you can go with the usual Linux bootmanager GRUB since it cannot boot from Bitlocker'ed partitions. Thus you would have to use Windows' own boot manager to dual boot Windows 7 and Linux.

Jennifer said...

Good observations, Oliver.

What you say is true - if the file system becomes corrupt, the virtual machines get trashed, too. However, if someone has a good file backup and recovery strategy in place and one includes VMs in the plan, the person can recover. Companies and admins doing server virtualization will typically have (AND SHOULD HAVE) a VM file backup and recovery strategy in place. Individual users who want to use VMs for serious work should also include VMs in their backup and recovery strategy.