• Breaking Barriers

    Breaking Barriers

    Do you tire of reformatting your computer so that it can be set up with the prescribed environment determined by your superior or client? How about the hassle of making sure that there is a backup copy of your past project? Is quality assurance testing a pain because you have to reset your environment over and over again?

    Well I did tire of that hassle. And I also tired of having to run my computer on a specific OS, just because that was what the task prescribed. So I went out and used a few proven tools to remedy the situation, which will be what this guide will be all about.

    Installing VMWare Player

    Virtual machines is the name of the game, and is the key to this modern workspace. Software that enables you to run virtual machines, such as VMWare’s VMPlayer or VMServer or Innotek’s (now Sun’s) Virtualbox, have been around for quite some time now. However, aside from system administrators, many people don’t know about them. And even less know how to use them to their utmost potential.

    We will be installing VMWare’s VMPlayer for this tutorial. If you choose to install VMWare Server or Sun’s Virtualbox, that’s ok as well, although set up will be a bit different.

    1. First, head on over to http://www.vmware.com/player and download the latest version of VMWare Player.
    2. After you have downloaded the tarball (for Linux), extract it to a directory. It will create a directory called vmware-player-distrib.
    3. Open a terminal and go inside the vmware-player-distrib directory. From there, type sudo ./vmware-install.pl
    4. The guided installer will then proceed to ask you a few questions about your hardware. For most cases, pressing Enter for all of the questions should suffice.

    After that, you will now have a VMWare Player launcher in the Applications menu under System Tools. But that won’t do us much good until we have a virtual machine ready for use.

    To create a virtual machine for VMWare Player, you can either use a virtual machine created with VMWare Server, you can download a preconfigured virtual appliance from the VMWare website (I suggest you take a look, there are a lot of appliances for a lot of different needs, and it’ll eliminate the need for the next steps), or use a handy litte utility at EasyVMX. WIth EasyVMX, you can configure a Virtual Machine, set the size and number of hard drives, number of CPUs to use, network cards, floppies, CD-ROMs, practically everything you need.

    EasyVMX - Super Simple VM Creator
    EasyVMX – Super Simple VM Creator

    Once you’re at the EasyVMX website, there are 3 flavors of their Virtual Machine Creator: the regular EasyVMX, the SuperSimple, and the EasyVMX v2.0.

    For those who just want this part done quickly and painlessly, choose the Super Simple creator and choose around 15GB or more for the disk space for WinXP (Obviously, you’ll need more for Vista).

    For those would like to customize a little, EasyVMX v2.0 will offer the most choices, but for most ends and needs, the regular one would suffice.

    Depending on your computer’s memory, change the Memory Size to something greater than 192 (minimum for Windows XP) as long as you will leave around 256MB for your host. (Ex.: PC memory = 1024MB; 1024 – 256 = at most 768 for guest VM). One good reason to use a GNU/Linux distribution as a host is that 256MB is plenty and will give a decent performance while your XP VM might still be thirsty for more memory with 256MB of RAM.

    Set the hard drive to around 20GB. Add additional drives if you prefer. Again, thankfully your GNU/Linux host uses less than 5GB for the OS, giving you plenty of room.
    Note: When you create a virtual drive, it doesn’t immediately occupy 20GB on your disk. Rather, as your VM uses more and more of the disk space, so does the virtual drive occupies more space on your host.

    Keep all other settings at default. If you have an ISO image of the OS that you want to install, be sure to check on the ISO checkbox under CD-ROM.

    Click on the Create Virtual Machine button and you will be given a zip file for download containing the configuration file as well as your virtual disk(s). Extract that to a directory and start up your VMWare Player.

    Important: EasyVMX will only create the virtual disk and configuration file for your VM. You will still need a LEGAL copy of your intended OS. Also, Be sure to choose the correct number of CPUs. Less than the actual number of CPUs and your VM won’t be able to take advantage of your mult-core processor. Anymore and it just won’t work.

    Installing A Virtual OS

    If you have an ISO of the OS you’re planning to install, put a copy of it into the directory containing your VM configuration file. Assuming you had checked the ISO checkbox in EasyVMX, when you start this virtual machine, it should boot up from this ISO. Otherwise, place the OS’s disc into your CD drive.

    1. From Applications > System Tools, click on VMWare Player
    2. When the VMWare Player window appears, click Open An Existing Virtual Machine
    3. Navigate to the directory where you extracted your virtual machine
    4. It will now start up. If you have put the OS disc into your CD drive, it should now boot up from there.
    5. Install the OS as you would on a normal computer. Ubuntu Installation, Windows Installation

    Enabling Networking

    After starting up your VMWare Player, you’ll notice a few buttons at the top of the window. These buttons can be toggled on off to activate/deactivate peripherals and USB devices. The Ethernet button allows you to choose from 3 different configurations when you right-click on it, Bridged, NAT, and Host-only.

    Choose bridged and restart your virtual machine for good measure. You can skip to the next section if you don’t need a brief explanation about the three ethernet configurations.

    Important: In a restricted static IP setting, such as in an office, be sure to get an IP address for your VM from your system administrator, since your host OS and EACH guest VM will need a unique IP address each.

    Host-only is used if you want your virtual machine to be able to see your guest machine ONLY. Imagine this as like connecting both your host OS and guest VM to the same switch, but not connected to the rest of the network or DSL modem. It won’t have access to other machines on your network, nor the internet for that matter.

    NAT stands for Network Address Translation. Similar to Host-only, your virtual machine will be connected to a virtual switch, but this the switch is connected to the rest of the network. In a NAT networking, your host OS sits on the network, acting like a router, while your guest VM sits on a separate network behind this router (your host OS).

    Bridge on the other hand is completely different. With bridged networking, both the host OS and the guest VM sits on the same network each with their own IP addresses. Other computers can access the VM directly and vice-versa. Internet access is also direct.

    For more info on VMWare’s networking setup, visit this article on VM Weekly.

    Sharing Files and Folders

    Need to share files between your host and guest? Two simple choices: create a shared folder in your guest VM or create a shared folder o your host OS. It really depends on your preference. Setting up a directory on your host means no matter which VM you’re using, you’ll still have only one share. On the other hand, a localized specific shared folder per VM means the contents of the shared folder will most likely be related to the VM in question; no mix-up of files from different VMs. It’s all up to how you manage them.

    If you are using Ubuntu to share a folder, follow these steps:

    1. Right click on the folder to share and click Sharing Options
    2. Check the box labeled “Share this folder”. If you do not have sharing services installed yet, it will ask for your permission to do it for you.
    3. Once that’s done you can select either SMB (Windows share) or NFS (Unix share). Choose SMB so your Windows VM can access it.
    4. Check the box labeled “Allow other people to write in this folder” because you are sharing it to exchange files.
    5. Check the box labeled “Guest access” so you won’t need to create a user account anymore.
    6. When that’s done, click “Create Share”

    Extra tip: to connect to a shared folder from Ubuntu, open an address bar in Nautilus or on the Desktop by pressing Ctrl-L and then typing smb://hostNameOrIPAddress

    Backing-Up Everything

    VM Backup
    VM Backup

    Now we’ve finished setting up the dirty work, we can now start to reap the benefits of this setup.

    Ok, let’s say that we have set up a Windows XP guest VM and we’ve already set up all of the basics like the IP address, registering your Windows copy, installing anti-virus, anti-spyware, firewall, email clients, and MS Office (sure is a lot of basic setup for a Windows box, huh?).

    We’ll want to make this our “starting point”, so that everytime we need a new environment, we can use this initial state and we won’t have to go through all those tedious setup and concentrate on setting up your project-specific workspace.  How do you do it? It’s quite simple.

    1. Shutdown your guest VM
    2. Go to the folder where all your virtual machine’s files are stored
    3. Copy that folder, and name it something appropriate, like WinXP_base.

    Need to create a backup? Again it’s quite simple. Just follow the three steps above.

    Need to restore from a backup? Again, simple. Copy or your backup and open it up in VMPlayer.

    Starting a new project? Again, the 3 steps.

    You get the point.

    Extra Tip: When making VM copies for your different projects, it would be very useful to change the Display Names of each VM. That way, they won’t all appear as “WinXP” in the VMPlayer. To do this, open up the .vmx file found in the folder of your VM, and change the value of displayName

    Terminal Server Client
    Terminal Server Client

    Using Terminal Server Client (TSC)

    Most of the time, I control my VMs via the Terminal Server Client instead of directly with the VMPlayer. I do this for a few important reasons:

    • Sometimes, I want my VM to be just a small window. Other times I want it full screen. Using TSC allows me to quickly change between display sizes (or display color-depth) without changing the actual display settings on the VM.
    • It performs faster in my experience.
    • Keyboard and mouse input are locked to a VMPlayer session, and you have to press Ctrl-Alt together to give back control to your host; With TSC, you simply move your mouse in and out of the window.

    You have to turn on Remote Desktop in your guest desktop. Also, it won’t work if you don’t set a user password.

    Workspace Separation

    By keeping non-project-related programs running in your host OS not only means less distraction (specially when viewing full-screen), it also means not disconnecting your IM client while you’re restarting because your Windows is starting to bog down. A restart no longer means a trip to the pantry to get some coffee, you still get to do something else on your host OS, be it researching for a technical paper or preparing slides for a presentation.

    Extra tip: As an added “boss button”, when you’re using your VM at full screen, no one would notice that it’s a VM. If your boss ever figured out that you were browsing blogs at another workspace, this’ll probably take them longer to figure out.

    Pros and Cons

    Naturally, there are advantages and disadvantages to this kind of setup. But in my case, the pros outweigh the cons.

    The downside to all these multi-OS multi-tasking is, you will need a pretty decent computer to do this kind of setup if you do not want impact on your output. In particular, since you’ll be running at least 2 systems at the same time (1 host + 1 guest), you will need ample amount of memory for both. The number or size of your virtual machines is also dependent on how much disk space you have. There is also some performance impact, though it is becoming less and less apparent with multi-core processors. Although, on my 600Mhz Kohjinsha with 512MB of RAM, I was still able to run a WinXP to perform some basic operations. It makes my computer a dog slow, though, but it works.

    Now if the pros weren’t already obvious, perhaps the most significant pro is the flexibility in using whatever operating system you desire and the ability to quickly and completely backup that system. When archiving old projects, you no longer just back up the project files, you back up the whole system, environment setup and all. That means, several years down the road if ever you need to revisit those old projects, you just take out that virtual machine out of storage and run it. Workspace separation also has its advantages, which can be used for increasing productivity, or improving the quality of breaks.

    For system administrators, the advantage is obvious. Using only one physical hardware, they’d be able to run several different servers, minimizing costs, maximizing server utilization, and making the world a greener place by consuming less energy.

    Lastly, of course, with a GNU/Linux host, now you can keep playing with your Compiz-Fusion 3D cube and wobbly windows, hehe…

    Social Bookmarks:

    Posted by punongbisyonaryo @ 8:30 pm

1 Comment to Setup for the Modern Virtual Workspace

  • Welcome, cool site. I am also leading one’s so I know how hard it is. Your articles are great, although not always I agree with your opinions, but in spite of that I will visit your blog more often. I wish you the success and the perseverance in running the site, Monica

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>