Monday, May 14, 2012

Hyper-V and VirtualBox with Windows 8

Well, here I am posting this on my Windows 7 laptop...I ended up reverting back to Windows 7 after a not too successful run with Hyper-V on Windows 8.  I have a pretty decent laptop, 8GB of RAM & an older generation i7 CPU (2 core, 2 threads) and with Windows 7 it runs VirtualBox pretty well. 

I have my domain controller/SQL Server box on one VM, and my SharePoint dev environment on the other.  I also have a Windows 7 workstation as part of the internal network so I can do some single signon testing.  With VirtualBox I can have all three of these machines running at the same time with decent performance - two are on an eSata SSD & the other is on an internal fairly fast hard drive.

With Windows 8, the good news is if you've used the VHD file format for your virtual machines, you're in luck - with a bit of work on changing additions & a few reboots you can definitely use your VirtualBox VMs.  If you went with the VDI file format, you're not out of luck, you just need some patience - VirtualBox offers a method to clone your VDI files to the VHD format.  Good instructions for doing this here:  http://srackham.wordpress.com/cloning-and-copying-virtualbox-virtual-machines/.  It takes a while but in the end I did have a workable copy of my VDI file in VHD format, which Hyper-V on Windows 8 could handle.  Didn't try any VMWare image conversions, good luck with that!

But that's about as far as the happiness went...when I fired up the VMs performance was slow.  I moved the VHDs around so that I was running on an internal SATA II SSD, not a rocketship drive but still plenty fast.  Got the additions sorted out, but still no luck.  The kicker was on the Windows 7 workstation machine, the video driver seemed very slow - colors didn't look great & performance was poky.  Should have taken a screen capture, sorry about that! 

So for now the answer is, I liked what I saw - our corporate hypervisor solution is Hyper-V with System Center 2012's Virtual Machine Manager.  I took one of our prebuilt VHD files & it worked great, and I was able to use my VirtualBox VMs with Hyper-V.  Performance was just too slow for now - high hopes for the next release of Windows 8 & higher hopes for the RTM release, hope it comes soon!

Timer job - cannot uninstall, missing default public constructor

So the answer is yes, timer jobs do need a default constructor, even if there isn't a need to have one. When my colleague tried to deploy an update to a timer job after pulling out the constructor, he got the following message:

Uninstall-SPSolution: MyCo.MyTimerJob.JobDefinition cannot be deserialized because it does not have a public default constructor

Tried to uninstall through the SharePoint UI but had the same error.

The fix was to put the constructor back in the code, then take the DLL and GAC it onto the server. Use PowerShell for this or if you have permissions drop it into the c:\windows\assembly folder, then perform an IISReset for good measure. After that you can uninstall the solution and redeploy.