Category Archives: Virtualization

My Virtualization Saga Continues

When I last talked about my virtualization strategy for my dev PC, I had built a new PC with new hardware, but didn’t have much of a need for portability.

Lately my need for portability has increased a bit, so I got an opportunity to put my virtualization strategy to the test.

The problem

My big problem at this point was how to get my virtualized dev PC to be portable.macbook My Virtualization Saga Continues

I recently purchased a 15” MacBook Pro with Retina display so that I could have one portable machine to use for my workshops and speaking on cross platform mobile development, but I wanted to be able to run my primary dev machine on it as well.

When I first got the MacBook, I thought I would just copy my VMWare image to the MacBook and go, but I soon found out that copying 100 gigs over my wireless connection was not exactly a quick task.

I also wanted to be able to create a few other virtual machines with different setups that I could transfer easily back and forth between my desktop PC and my MacBook.

If it was going to take me several hours to copy the VMs back and forth, this was going to be a real pain.

I also realized that my MacBook had pretty limited disk space since I had only opted for the 256GB storage.

USB 3.0 Changes things

Now that USB 3.0 is fairly prevalent, the idea of having an external hard drive to use as a virtualized PC is much more conceivable.

I decided that the best way to be portable would be to buy a decently sized SSD drive and put it in a USB 3.0 hard drive enclosure.

usb3 My Virtualization Saga Continues

With SSD prices coming down so much, it only cost me about $80 to get a latest generation 128GB SSD drive.

I put this SSD drive in a USB 3.0 enclosure and suddenly I have the ability to take my development PC anywhere I want.  All I need to run my dev PC is a computer with a USB 3.0 connection and a copy of VMWare player.

This ended up working out great.  Now I could have multiple VMs on different USB 3.0 hard drives that I could just swap out as I needed.

I could also very easily copy VMs back to my desktop if I wanted to be able to run them from there.

The test

I had my first true test of the concept this last week when I went to Austin for the the .NET Rocks Road Trip show.

I was presenting there and doing a live recording for the tablet show, but I still wanted to be able to work during my downtime.

I brought my MacBook and my external hard drives with me and I was able to successfully run my full development workstation right off my USB 3.0 hard drive just like I was sitting at my home office.

I had a few wireless connectivity issues, so I will probably add a Ethernet converter to my bag for use with my MacBook in the future, but other than that it worked out perfectly.

I finally have a really good reason to virtualize my development environment.

The future

Even though I’m pretty happy with this setup, I still want something better.

In the future, I’d like to be able to pull down the differences in my virtualized environment from the cloud.  There is no real reason to be carrying around and copying around multiple copies of the same old operating system on a disk image.

I should be able to just store what is different in my workstation and I should be able to get those differences from the cloud instead of a USB drive.

I’d also like to not have to install my apps, but rather to be able to stream the apps to my PC as I am using the app.

I think we’ll eventually get there, but for now I’m happy to carry around my USB 3.0 hard drives and have a completely portable workstation for whatever task I need.

Virtualization Experiment Reloaded

Well, I tried the virtualization experiment again.

It worked out much better, but it still isn’t quite there.

This time though, I am going to stick with it.

The hardware

037step2 thumb Virtualization Experiment Reloaded

It was time for me to get new development PC hardware.  I went with a desktop again instead of a laptop, simply because I can get so much more power for the dollars and I like to have 4 monitors.

Yes, there are laptop configurations that can get you four monitors, but none of them are very nice, and portability is only a concern 1% of my time.  Even half of that time, I can just use any crappy laptop to remote desktop into my PC, so it just doesn’t make much sense to use a laptop as my primary PC.

Before I get much hate mail about this, let me say “your needs may be different, and I can respect that.”  Although, every developer should ask the question of whether or not spending the same budget on a laptop vs. a desktop PC + a crappy laptop would net more horsepower and meet the general case better.

My basic hardware for the new PC was this:

  • Intel i7-3930K CPU @ 3.20Ghz (6 core x 2)
  • 32 GB RAM
  • 2 x ADM Radeon HD 7700
  • 2 x Kingston HyperX 3K 128GB, RAID 0

First PC I did not build myself, instead built by iBUYPOWER.  (Turns out they can build the PC for just as cheap as I can and they test everything to make sure it is all compatible.)

I just put the HDs in after it was shipped to me, since I was able to get a better deal on those.

The plan

What I wanted to do for this development machine was to make it easy to backup, portable and isolated.

I essentially wanted to create a clean environment where all of my work stuff lived and not install other things on it.  Much smaller ambitions than my previous desire to create virtual machines for each kind of development task and have a separate virtual machine for my databases.

One neat thing about this plan was that I should technically be able to put my work PC on an external drive for transport and load it up on a laptop if needed or another pc if my hardware failed.

One additional part of the plan was to be able to seamlessly transfer from my old PC to the new hardware without even a day of downtime. Just create the virtual work PC on the old hardware, work on it for a few days, and when the new hardware arrives, transfer the VM.

I also had planned to use the Unity mode of VMWare to allow me to seamlessly run apps from the VM outside of the VM.

The execution

It pretty much went flawlessly.

  1. I got the new vm created on the old hardware.
  2. I worked on that vm for about 3 days.
  3. When the new hardware arrived, I set that up on one monitor and installed vmware.
  4. I then turned the old pc into a vm and backed it up in case something went wrong or I forgot some data.
  5. Finally, I copied the vm to the new hardware and fired it up.

Didn’t end up having to waste a day of work switching hardware.

vmware view pilot 5132022 thumb Virtualization Experiment Reloaded

The reality

So, I am pretty sure I am sticking with this setup. It isn’t perfect, but it works good enough.

The good

  • Speed seems fine, minimal hit since I am on a RAID 0 with 2 SSDs.
  • Reboot work PC without going offline.
  • Not having to install crap apps that bog down work PC.
  • Clear separation of work and non-work. (Helps for staying focused.)
  • Easy backup of work PC, just copy a file.  (CrashPlan does this, for me automatically.)
  • Easy file transfer to work PC and back.
  • VPN without going offline.
  • Chrome synching is awesome.  This is the real use case for it.
  • Every USB device seems to work fine.

The bad

  • Unity is kind of crap.  It really needs some work.  It works sometimes, but never really good.  Lots of issues.  Windows disappear.  It gets stuck in Unity mode.  It is also very hard to launch and find apps in the VM.  In my opinion, this whole thing needs to be reimagined.
  • Full screening the VM to 4 monitors is a pain.  A ridiculous pain.  I have to hit a cycle monitors button about 8 times, before it cycles to the mode where the VM takes up all four monitors.  There is just plain no excuse for this.  VMWare should have a setting to specify that the VM should default to full screen 4 monitors.
  • The little status bar to control the VM in full screen mode is impossible to make appear.  I absolutely HATE this paradigm.  Remote desktop does this as well, except that one has the opposite problem.  Easy fix here, hide the thing until I hit some key combination.  This would be much better than a mouse location.
  • Some slight video type problems.  Applications like Join.me get pretty pissed off about me running a VM and using Unity mode.
  • Only able to push 8 CPUs into the VM.  (Doesn’t seem to support all 12.)
  • Takes up a lot of space on my SSDs.  It is a bit of a crunch with only about 20 gig left over, but seems like I can manage.

Final thoughts

So virtualization has come a long way, but for the developer case at least, it still has a way to go.

I do think hardware for desktops has come far enough along that you can get sufficient hardware to host a virtual dev machine.  It is easy and cheap to get 32gigs of RAM and fast SSD drives.  Hardware still isn’t quite fast enough to make running a VM completely seamless, but it is close enough that I don’t feel like I am taking much of a performance hit at all.

I would like to see technology like Spoon.net become much more mainstream.  This would reduce the need to install the same apps on the non-virtualized PC as the virtualized PC.  The whole OS really needs to move to the cloud.  Applications shouldn’t need to sit on HDs (for the most part.)

Virtualization software vendors have quite a bit of work to do still.  The software has gotten pretty good, but it really sucks with handling multiple monitors and seamless application integration.  When I am working on a virtual machine or running apps that live on a virtual machine, that process should be painless and easy.  I should not even realize I am using virtualization.

Just having one dev VM instead of 3 or 4 seems to have solved most of my complaints from my previous trial at virtualization.  There is something that just feels really good about actually shutting down your dev PC at the end of a work day and knowing that you have a good dependable backup of it from various points in time.

I’d also really like the ability to be able to just boot from a VMWare image.  I know you can boot from a VHD, but Virtual PC seems to be lacking in too many other areas to use it instead of VMWare.  (Although, perhaps I am wrong on this.  Might be worth an experiment.)

At this point though, I don’t see myself going back to bare metal for my dev PC.  There are a few mild annoyances, but most of them are fixed by my simply clicking “cycle monitors” 8 times first thing in the morning to make my dev PC take up all 4 screens.  I also predict that I will go to two retina displays eventually.

The Virtualization Experiment

Well, I finally reverted back to making my dev environment non-virtualized.

I spent the last couple of months testing out running different VMs for each function of application development I was working on, and I am pretty convinced that technology has not yet reached the point where this makes sense.

I’m not saying you can’t do it.  I’m just saying it isn’t worth the cost.

My initial assumptions or theory

I first thought that this would be a good idea for several reasons:

  • I might actually get a speed boost by having dedicated virtual machines for each function of application development, by not having the other cluttering programs installed on the machines that didn’t need them.
  • I would be able to only use what I needed at the time, thus reducing the overhead I would incur.
  • I would be able to keep each virtual machine clean to its purpose, so it would never get cluttered up and need to be repaved.
  • I would be able to transport my machine to any computer just by transferring the VM.
  • If I hosed a machine I could restore to a known good state from a backup.

Most of these were decent assumptions.  To give you an idea of what I was really aiming for, you have to understand my VM setup.

  1. Web Development Machine
  2. Mobile Development Machine
  3. SQL Server Machine
  4. Other / Side Project Development Machine
  5. Test Dangerous Stuff Machine

The basic idea was isolate in order to make things clean and orderly and increase performance on single tasks by only using what I need.

image thumb2 The Virtualization Experiment

It wasn’t a total disaster

But it wasn’t exactly what I had planned.

Things worked out pretty well, and I could have kept operating in that mode, but there were enough irritations that I decided to bite the bullet this weekend and axe the VMs for normal development work.

The biggest factor that made me end this experiment was performance.  I had my VMs running on my SSD drive, but I still felt that the performance was suffering quite a bit.

Compile times and general Visual Studio user experience just were not what I thought was tolerable for every day use.  Considering how often I compile in a day, even a small bit of a performance hit is magnified.

It was definitely nice to have development activities separated out to the point that I could just fire up certain VMs to do certain kinds of work, but it also would be a bit of a pain when I got to my machine and found the wrong VM was running or that I needed to apply windows updates to 5 machines.

Having SQL server on a separate box seemed like one of the best ideas but when I really think about it, SQL server running on your machine only really consumes memory when it is not actively being used and I have 16 gigs of RAM.  Also losing that auto complete you get for connecting to a local instance of SQL server was a fairly large price to pay.

Another big issue turned out to be tools and tooling.  Turns out many of the tools I use aren’t specific to a certain development task.  Things like text editors and R# needed to be installed on each VM.  Often I would find that the tool I wanted wasn’t installed on the VM that I was using and it became a headache keeping everything up to date and installed in the right place.

One issue I didn’t expect was the use of monitors.  Using VMWare I could expand a VM onto multiple monitors but I found that it was irritating when the VM was covering up a window on the main computer and I needed to switch back and forth between multiple machines.  In my configuration, I have 6 monitors hooked up to my PC, so for most people this probably wouldn’t be as big of an issue.

I had some big dreams of using Unity mode to allow me to use applications from different VMs and make it all feel like it was on the main PC, but that technology just isn’t quite what it needs to be to make it worth the cost of efficiency.  Right now it seems Unity mode is rather slow, error prone, and hard to use.

For me it comes down to this…

I want my workstation to be as fast as possible when I am doing disk or processor intensive tasks.  PCs are not at the point yet where we have so much CPU and disk speeds are so fast that everything is still virtually instantaneous in a VM.  If we get to that point, I won’t feel like I am making a sacrifice in a VM.

I want to be able to seamlessly switch tasks and monitors.  The reason I have 6 monitors on my computer is because I like being able to drag any window anywhere and keep right on going.  Running VMs put a bit of a stutter step into my window flinging.

I don’t want to maintain 5 different operating systems.  You don’t really notice the effort when you are just maintaining one, but when you are trying to keep 5 operating system up to date with patches, software updates and everything else, it become a pain.

Sure, I can’t have that nice clean, my computer just stepped out of a shower feeling as I open up my VM targeted exactly for the task I am about to do.  Yes, I have to put all kinds of junk into my registry and feel “icky” about it.  SQL server is always running in the background chomping up a gig or so of my RAM.

But!  I am running about as fast as I can and I have the agility I need to be more efficient.

As always, you can subscribe to this RSS feed to follow my posts on Making the Complex Simple.  Feel free to check out ElegantCode.com where I post about the topic of writing elegant code about once a week.  Also, you can follow me on twitter here.