Better Living Through Virtual Machines
When I got my new laptop a couple of months ago I decided that I would do things right this time. As a developer I have special needs out of my work computer. It has to be able to to support development on several different projects at a time, some of which have conflicting prerequisites as far as the environment is concerned. So I have begun using virtualization with VMWare as a way to make life easier.
This is very much still an experiment for me and I’m learning what works best as I go along. Creating a VM for each of my current projects was a no-brainer. I love working in the VMs for development for several reasons:
- Now it doesn’t take me 2 or 3 hours to reconfigure my laptop to switch tasks and work on that web project that has some 3rd party tools that conflict with that winform project that uses different versions of the framework they both share and the source control providers that they don’t. It’s just a two-minute procedure of suspending one machine and opening up up the other. Presto chango!
- It’s so nice at the end of the day to not have to shut down all my development tools (Visual Studio, Query Analyzer, Enterprise Explorer, etc…) and turn off the computer. I just suspend and close VMWare and shut down the host (which goes considerably faster since I don’t have 200 services running in the background like I do in a development environment). And when I come back the next day I start up literally exactly where I left off.
- Creating a new development environment takes so little time. I already have several “base” VMs with varying configurations that I can just clone and customize. And I don’t have to worry about any conflicts with what I already have installed.
- If I have to turn over development to someone else on my team, all I need to do is put the VM (or a copy of it) out on a directory where they can grab it and get started. No configuration issues of setting them up on their machine! (Note, this would probably end up being a temporary situation, such as when I’d go on vacation, since the OS is licensed to me, though it might not be an issue since everyone on my team has an MSDN subscription through our company…)
- Telecommuting without VPN access, (heck, without even lugging my laptop home) is easy now! I have all my VMs and shared data on an external portable 100GB harddrive. I just unplug that sucker and take it home. It’s light and almost small enough to fit in my purse. Then I just plug it in on my home computer and run the VMs from home! Fortunately I am not travelling out of town on this assignment but if I am later, this will definitely be nice for getting through airports. No laptop to be hassled with in the security checkpoints. Admittedly I have to make sure I have local copies of the databases that I need to develop against, but that hasn’t been an obstacle yet.
Figuring out what to do with my “office productivity” software and personally licensed software is another story. Contrary to Jeff Atwood’s interesting proposal that all software will eventually be packaged and run through VM’s I haven’t figured out how it will work for particular varieties of applications.
Initially I had decided that I would install all the Microsoft Office software, including Outlook on a VM to keep my host OS as clean and fresh as possible, but I couldn’t bring myself to justify the resources it would take to run a VM all day that did nothing productive 90% of the time other than poll for my incoming mail. So I opted for the install on my host instead. I don’t really like that solution, but the potential performance issue (on the other VMs that I would have running) and the fact that it would take an additional 3-4GB of space (for the “blank” Windows VM) just made it seem too impractical for me. I am considering going ahead and creating a VM for it anyway for use from home since Outlook is the last thing that ties me to lugging my laptop home.
As for my personal software, again, I opted out. I have personal copies of Trillian and Photoshop CS2 (among other things), but besides having the same extra 3-4GB-of-space-to-run-them issue, there were two additional problems:
- For instant messaging, it didn’t make sense to not have it installed on the host. Otherwise, if I wasn’t paying attention to the VM that I was running it in, I’d never see my messages. That was also an issue for running Outlook in a VM as well, not receiving the notifications of new mail. I can’t figure out any way around that problem.
- As for Photoshop CS2, it is a RAM hog. With all the memory that it requires to run (especially when you have several files open and do some of the fancy filters) I still get the friendly warnings from Windows that I’m about to run out of memory when I’m using it on my 1GB processor home computer. I haven’t tried it but I figure that it would probably be a futile attempt to run it in a VM, even though I would very much like to not have to install it on my work computer to use it for work. And there’s the issue of whether the “virtual graphics card” can even support the full color range (that’s just a matter of ignorance on my part one way or the other).
And then there were a couple of issues about using VMs with multiple monitors that have stumped me:
- I am unaware of (and would love to know otherwise) a way to make the VM be able to span multiple screens. For me this is not as big of an issue because of the way that I’m used to working, but for some of my teammates this makes virtualization pretty much a no-go.
- Also, (possibly specific to VMWare) if I have my VM running in full screen mode on the second monitor, my cursor gets “captured” in the VM which is very annoying when an IM pops up on the other screen and I forget the keycode to get my cursor released. I know it shouldn’t be a big deal to use the key code but I don’t want to. I want to just be able to move my mouse over to the other screen like I can when I’m using Remote Desktop. For some reason, if I run the VM in the “Quick Switch” mode this is not an issue but I’m scared of that since I’ve run into situations where the auto-hide toolbar at the top wouldn’t come down. I don’t understand why both modes shouldn’t work the same way for the cursor.
So for development, overall, using VMs has been very useful and helped my productivity, but I haven’t been able to see benefits at a personal level because of the obstacles I’ve encountered. I pretty much agree with Mr. Atwood and his commenters that virtualization will play a big role in the future as far as how people will use their hardware and I think it’s another step in the direction of making the OS irrelavant. But there are still a lot of things to work out to make it practical for the typical computer user. I’d love to know what other people are doing and if they’ve found ways around some of the issues I’ve brought up. Please let me know if you have because I’d like to keep exploring the options of “living the virtual life.”











February 15th, 2006 at 6:42 pm
> But there are still a lot of things to work out to make it practical for the typical computer user.
I agree– we’re on the very first baby steps of the virtualization journey.
For one thing, computers need to get a lot more powerful. VMs have an insatiable demand for memory, hard drive space, and cpu power. That’s pretty rare by today’s standards; the hardware is way ahead of the software. But not VM software!
However, do you really think your power-user needs are representative of the “typical computer user”? I’d think the average joe who only uses a web browser, maybe a few minor office apps, and IM — all on a single monitor — could easily run inside a fullscreen VM and not even know it.
February 15th, 2006 at 8:54 pm
Thanks for stopping by, Jeff!
Yeah, my needs are pretty specialized, at least as far as the development scenario is concerned.
Most of my issues have to do with the fact that I am running more than one machine (multiple VMs or even just one and the host) and multiple pieces of real hardware (monitors).
If you don’t have a need to run multiple VMs to isolate configurations, then yes, it probably wouldn’t make a difference whether you were using a VM on a host or the host itself. But in that scenario, you don’t really need a VM in the first place. And at this point, the “typical” user falls in that category and wouldn’t know the difference. But also, in that scenario, what’s the point of introducing a VM at all?
Eventually, if it becomes standard that applications will run in their own VMs as you suggested, and therefore something that the typical computer user will encounter, then the issues that I have run into will need to be resolved.
I think there will is a need to have partial transparancy from the VM to the host… Some kind of message relay, or software that can run on the host and coordinate things between the VMs and the VMs and the host. Such a thing might already exist and I’m currently ignorant of it…
I’m just working through these issues now and hoping that someone else has already blazed the trail and started thinking about them and might be able to offer some workarounds they’ve discovered.
February 17th, 2006 at 2:25 am
> But also, in that scenario, what’s the point of introducing a VM at all?
Because average users have a habit of accidentally trashing their PCs. This way they don’t have to care– they just ball up the VM and throw it away after each session. Every day their computer is as “fresh” as the day they unpacked it from Dell. Viruses? Malware? Trojans? Hard drive formatted accidentally? No effect whatsoever.
Of course, this also implies that their shared files are automatically preserved in a store on the host somewhere. That part I’m unclear on, but I think it can be done.
February 17th, 2006 at 9:30 am
Hmm… yes, that can be done… specifically with VMWare (which is what I’m currently familar with) you can set up things so that your changes are not saved when you shut down the VM. Each time you open it would revert to it’s original state. I know you can set up shares on the host that the VM can see as well for the common files.
There’d still be some issues though. I know that as I have been setting up VMs I have made many tweaks as I go to the layout of the desktop and other settings. These are things that are specific to my preferences that other people might not like but make my use more productive. There would need to be a way to be able to save state changes like these but discard other changes so that people could “customize” their VMs but have the flexibility to blow away other changes and revert to the “pristine” state. I’m not sure how to accomplish this currently. Would there be a way to distinguish what changes are user preferences and what changes are malicious by viruses and crew?
Some interesting things to ponder, though. Maybe I should use my mom as a test case sometime. She (like many people who don’t have the time to really educate themselves on how viruses work and are aquired) is always concerned that she’s going to get a virus to the point that she disables things like javascript in the browser, which ends up causing a lot more problems for her in the long run than the potential virus she thinks she’ll get from leaving it enabled. Setting her up with a VM for browsing that resets everytime might be a good option. Hmmm…
February 20th, 2006 at 12:21 pm
Dual (or more) monitors under VMWare can be achieved using Maxivista. See:
http://www.maxivista.com/
But, the VM machine needs to be hacked a little:
1. Install the MaxiVista server (primary) component in the guest.
2. Install the MaxiVista viewer (secondary) component on the host.
3. Additionally you need to disable Edit > Preferences > Input > Ungrab when cursor leaves window, and:
4. Uninstall the VMware mouse driver in the guest.
I have (briefly) tried this and it works.
Actually my second monitor is on another machine that is networked to my first machine. I normally use a VMWare guest with a single monitor and Maxivista as a way to add a second monitor to my primary machine.
If you do this then you have to use Ctrl-Alt to ungrab the mouse from the VMWare guest.
YMMV
Don.
February 23rd, 2006 at 9:50 pm
NVidia video cards config utility lets you choose to clone/span/merge/let windows do it your two monitors. Having played with this, it’s less fun than it sounds. Sure, merging the monitors gives me a 2600×1000-ish desktop, and VMware maximises to it just fine. But it’s very wide, and all your VMs have to be that size - smaller ones center between the displays. But it can be done - you possibly need the very latest NVdia driver, the older ones this was a once-only choice. ATI don’t do it at all AFAIK.
I prefer the tabbed mode (F11, Quick Switch) which costs 30 pix off the top of the screen but lets me click anywhere in or out of the VM with no hassle. I set the display res of the client to just fill the display by adding this to the .vmx files:
svga.maxWidth = 1278
svga.maxHeight = 996
svga.vramSize = 5242880
That just fills a 1280×1024 screen. This way I can run two copies of VMware, one in each monitor, or just have a pile of VMs in one copy of VMware on one monitor (what I usually do) and use the other monitor for junk on the host machine (email, text editor, IM etc.
March 1st, 2006 at 11:47 am
Thanks for the info Don and Moz. I was forwarded some links to some similar solutions and I will try things out. It’s good to know that there are other people trying to figure this stuff out as well.
November 1st, 2006 at 3:47 am
Good news
The three Rs of Microsoft support: Retry, Reboot, Reinstall.
March 1st, 2007 at 5:35 pm
Hi Lindsay, I’m an engineer in the graphics group at VMware. I just wanted to note a few things in response to your post:
- Your multimon issues and experience will hopefully be much improved in Workstation 6.0, as we now support multiple monitors in the guest, and we can detect and reflect your host system’s window topology into the guest automatically.
- Running Photoshop in the guest should work just fine. You’ll want to install your ICM/color profiles in the guest. Photoshop will run slower when it needs to hit the disk, but if your file fits in guest RAM, you should get near-native performance. In general, CPU intensive workloads such as Photoshop filter jobs etc. run great in VMware, it’s disk-intensive stuff that tends to take a bigger hit.