Archive for February, 2015

Hyper-V — Remote Desktop: Good, Virtual Machine Connection: Bad

February 10, 2015

I run Hyper-V virtual machines (VM’s). I copy and paste using the clipboard between the host and VM’s, and between the VM’s themselves. A lot. So it is truly annoying when the clipboard doesn’t work. And no, it doesn’t work if you simply do what comes naturally — find the VM in the built-in Hyper-V Manager, right click, and select Connect.

This opens a window of your VM, using “Virtual Machine Connection”. But this window doesn’t support the clipboard, nor any of the following:  redirected audio, drives, or printers. There is something new called Enhanced Session Mode which does support them, but only if the client OS is Windows 8.1 Enterprise or Windows Server 2012. I don’t know about you, but those aren’t the OS’s I typically put into my VM’s. So this would seem to be a worthless feature.

Thankfully, there is an easy alternative. Just use the Remote Desktop Connection application (connecting to other computers via Remote Desktop), which is built into all Windows. Remote Desktop has for years supported all of the missing clipboard and redirection of client resources such as printers.

[Caveat] Again related to the client OS running in the VM – the client OS needs to support “being a Remote Desktop host” (being connected to via Remote Desktop).  For example, Windows 7 Home Premium does not support this, but Windows 7 Professional/Ultimate does.

[Setup] You will need to enable Remote Desktop in the client OS and know the client’s Computer Name in order to connect to it.

Short wish: One of the things missing from Remote Desktop that VMware Workstation has is dragging the client desktop window to resize it, and then the client “hardware” display settings are changed so that it matches the new window size. The client remains optimally sized, as intended.

One client, One VM

February 10, 2015

Juggling several client projects at once requires some sort of dedicated computer resources for each of them. Happily the state of the art makes it very easy. At first, I used just one computer and just juggled.  Then I installed SysInternals Desktops to be able to switch to different screens for each client.

This proved too little, as each client eventually needed incompatible Visual Studio configurations. For example, the .NET projects benefited from add-ins like .NET Demon (continual rebuilding of the project), but this was incompatible with C++ projects. In addition, some clients required the Qt add-in, different versions of the Windows SDK, some required the DDK, etc. One needed the Dev Express ASP.NET controls, but that license was only for that client and I couldn’t use it for other projects.

Clearly the easiest way to assure an optimum environment for each client was a dedicated PC. While I do have enough computers to do this, so many physical machines makes for a very crowded desk, and I only have one good keyboard, mouse, and 30″ monitor, Happily, the performance of virtual machines makes this an unnecessary cost and inconvenience.

Which virtual machine software is the best? The cheapest and best performing is Hyper-V. Compared to my other favorite, VMware Workstation, it is a Type 1 hypervisor,  which allows for faster performance, and it’s now included free with Windows 8(.1).

So my main development machine is a 3 year old Core i7, with 24 GB RAM and 1 TB SSD. I can run several Hyper-V VM’s with dedicated 4-6 GB of RAM simultaneously. Since most of the time they are just sitting idle, the one or two I am working in are very fast performing.

It is such a productivity booster to be able to Remote Desktop into these VM’s from anywhere on the Internet (although mostly from the Hyper-V host machine itself) with all the apps open exactly as I have left it. As I get older, my memory forgets things like what is the next thing to do for a client, and seeing all the apps there just as it was when I last worked on it saves me many minutes of ramp up time.

So it works great, and I wouldn’t change a thing.  The one irritant is the initial setup of the VM’s.  The number of installs you need to perform grows proportionally to the number of VM’s you create.  But this is not as bad we it could be.  First, we can create a “reference VM” which we clone to start all the new ones; the reference VM has all our must-have apps installed and configured, so these automatically work for all our new VM’s.  This also helps with software that allows only a limited number of installations – when such software is installed, it checks a server on the Internet to see how many times prior the license file was installed.  But after installation, it doesn’t check the Internet anymore.  So if the VM is subsequently cloned, that software is none the wiser.   (I realize this subverts the letter of the license, but not the spirit — I paid for a license to have full use of the software, I can’t help it if the software has a license that does not keep pace with how people use computers today.)

The second thing about all these installs is that they go way faster now, with the SSD.  Even gargantuan packages like Visual Studio and Office install (relatively) very quickly.