A Linux Island in a C:\ of Windows, Part 1

A new series on setting up a Linux VM on your workplace desktop to help make the switch to a pure Linux desktop.

A lot has been said recently about using Linux on the business desktop. People point to various minor bugs, perceived flaws or cost issues and proclaim that Linux is not ready to be a workplace desktop. I have been using a Linux desktop at work for a while now, however, and I have not experienced problems that would cause me to stop using Linux as my primary desktop OS.

I decided to try Linux in my work environment not to change the world or even my company. I simply wanted a way to make my job easier. As a UNIX administrator for a small company with around 20 UNIX servers--a mix of AIX and Linux--I wanted a Linux sandbox that was all mine. That way, if I wanted to test something out and broke it while doing so, nobody would complain. In addition, I had been using Linux at home for a number of years and thought it would be fine for work. And being able to have a virtual machine running Linux while also having a Windows machine to use to get work done sounded like a great idea. If I had to dual boot the machine every time I wanted to switch OSes, it would have taken too much time to make the move to Linux.

My company had a license for VMware that wasn't being used, and because using a VMware license is a lot cheaper than purchasing a whole new server, I loaded VMware on my company-issued Windows desktop. We use SUSE Linux Enterprise Server for S390 and Intel at work, so I decided to pick up a copy of SUSE 9.1 Professional and load it on my desktop PC.

Setting up a virtual machine using VMware couldn't be easier. Make sure you are using the latest version of VMware. Downloads are available from the VMware Web site, and you need to purchase a license to install it. Also, before installing the virtual Linux machine, you should do a Windows disk defrag so you have a nice clean place for your Linux machine to reside.

To create a new virtual machine, start VMware workstation and click on File --> New Virtual machine. I chose to use the Custom wizard because I wanted a little more control over the installation. Follow the prompts on the screen to choose the Guest Operating System, Virtual Machine name and location. For the system memory, I chose to use the defaults; it's pretty easy to change them later. If you do choose to increase the memory size beyond the suggested amount, remember that you will be using a virtual Linux machine running on a Windows machine. As a result, allocating more memory to your virtual machine may cause a paging problem with Windows memory and may impact performance.

From a networking point of view, I chose bridged networking so my Linux machine would be separated from the rest of the network. After I selected the default disk type, I chose a fairly modest 5GB disk capacity. I also chose to have the system allocate the space right away. A few minutes after I clicked Finish, the Virtual Workstation screen appeared.

To load your virtual machine, insert disk 1 of your chosen Linux distribution into your CD-ROM drive and click Start virtual machine. Most Linux installations are pretty straight forward, so I am not going to bore you with details. Simply load it as you would any standalone machine.

With that being said, I had a fairly major problem during my installation of Linux: the virtual machine wouldn't release the first disk when it asked for the second. After a few frustrating attempts, I figured out the problem. If this happens to you, click on VM in the virtual machine window and then select Removable Devices, highlight CD-ROM and select edit. Click the check box for Legacy Emulation. After doing this, my installation continued without a hitch.

I go into detail later about some of the packages that were necessary to include in order to make the switch possible. For now, make sure to load the GCC compiler--both the C and C++ parts--the kernel source that matches the kernel you are going to use, tar, gunzip and Perl. Then, pick whichever installation level you would like to use as a base. I chose the SUSE 9.1 Professional graphical workstation. After your installation completes, you should see a familiar sign-on screen. If you are new to Linux, this sign-on screen soon will become familiar. In my case, the sign-on went smoothly, but the screen resolution was huge and the mouse moved as though it had been through the maze one too many times. Even if this doesn't happen to you, look at the bottom left-hand side of the screen, where a nice message tells you that VMware tools are not installed. Pay attention to this message.

To install VMware tools, click on VM in the VMware window and then click Install VMware Tools. This brings up a dialog box telling you the guest OS must be running. Click Install, but know that no message appears to inform you that the installation was completed or where the tools are loaded. It's getting more like UNIX every step. Instead, you need to log on to your Linux machine and CD to /media/cdrom or /mnt/cdrom. If the tools package isn't present in either of those places, use the find command:


find / -name vmware-linux-tools.tar.gz  

Once I found the package under /media/cdrom, I copied it to /usr/local/src before exploding the tar ball. Because GNU tar was loaded, I didn't have to unzip it first:


tar -zxvf  vmware-linux-tools.tar.gz

Install the tools by changing directories and running the install script:


cd vmware-tools-distrib 
./vmware-install.pl.  

I simply accepted the defaults and let it load. During the configuration section of the install, I changed the screen resolution to 1024 x 768.

After completing this step, you should have a running Linux machine on the same box as your Windows workstation. If you want the Linux machine to use the full screen, press Ctrl-Alt-Enter and your machine will look and act just like a Linux machine running on its own hardware. To get back to Windows, simply press Ctrl-Alt. You still can use Linux when it is windowed in this manner, but you have to do a lot of scrolling with the side bars. If you need to get to a command line, instead of using the familiar Ctrl-Alt-<function key> combination, press Ctrl-Alt-Space. Let go of the space bar, but continue holding Ctrl-Alt and press the function key. To get back to the GUI, use the F7 function key. Being an administrator, I wasn't familiar with the GUI side of things. It was nice to have the faithful command line around when I needed it.

Now you have your own Linux desktop running on a company-supplied Windows PC. Use this machine to do your work on the Windows side while playing around and getting a feel for the Linux desktop. Soon, it will be the other way around. It's great to have control over your desktop.

In the next part of this article series, I'll talk about getting the network connections running and talking to other UNIX machines on the network. Not surprisingly, Linux offers many great tools for connecting to other machines.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It would have been a good

Anonymous Coward's picture

It would have been a good article for beginners if it also provided possible solutions in case the default answers for the questions during installation didn't apply. I have installed Live Fedora 11 as a VM, which doesn't come with gcc or the kernel headers available by default (now looking into the latter problem). Thanks anyhow! :)

I know this is for beginners, but for easier transitions...

Paul Archer's picture

This is written for beginners, but there's a more advanced setup that would be much better for transitioning to Linux:
Repartition your drive and install Linux as if you were going to do a standard dual-boot setup. Then run VMWare under Windows and point it to the Linux partition. Now when you're ready to switch to Linux as the primary OS, you can boot to Linux and setup VMWare on Linux to run Windows.
With this setup, you have the ability to access both OSes from either OS. And SuSE has a system profile switcher that would come in really handy for running Linux under VMWare and then switching to running natively.

SUSE dual boot

Oli's picture

And now I'm trying to do this...

The first steps are quite easy, but I'm searching a possibility to go directly to my linux-partition instead of waiting for lilo ant then choosing the right OS manually (what will happen if I'll boot Windows inside VMware, which is running inside this windows, uuurgh).

I'm afraid you'll have to sel

Marcos's picture

I'm afraid you'll have to select the OS. It doesn't know if you're booting normally or from a vmware session.
And don't try to load windows when running windows. If i try to boot Gentoo from inside my Gentoo, the system hangs and the partitions get corrupted.

I'd be surprised if that was

Karan's picture

I'd be surprised if that was the case for Windows in VMWare - or indeed Microsoft's Virtual PC. Part of their purpose is to allow multiple instances of Windows in one system to allow devs to test apps in different Windows versions. I've run it fine, but naturally YMMV.

This document provides good i

BLD002's picture

This document provides good information for beginers and it reminds some things to those who have experience in unix os.keep up the good work.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState