Perfect Windows KVM Setup

Background Anyone who knows me well, will be surprised to see a post of mine related to Windows. I’m not a huge proponent of the Operating System, but never the less, I have administered it since the late 90’s. Good ol’ Windows NT, startup scripts... those were the days. The days of constant crashing, total lack of accountability and professionalism... yeah those days. Anyway, there is one product that Microsoft makes that I find myself constantly needing, and I often have setup Windows Virtual Machines, purely for it. What application you ask? MS Office of course. So one day I took it upon myself to do something that I’ve known to be possible on Macs, and even Linux boxes for some time, Seamless RDP. It goes by other names as well, but the idea is simple. Setup a VM with Windows, install the applications you want (in this case MS Office) and use Remote Desktop Protocol to serve up ONLY that application in a window on your non-Windows Desktop. So Windows applications appear to be running natively. Beyond just achieving this aim, I also wanted to setup a VM as much as possible using the fantastic tool called Chocolatey. Check out the page on it, it’s pretty amazing – apt-get for Windows. Now what can we do with something like that... well watch. NOTE: This is only possible with Windows 7 Ultimate or Enterprise. Seamless RDP doesn’t work with Pro or lower.

KVM Specific VM Setup

  • VirtIO Drivers – Necessary for decent performance – Mount the latest driver CD via virt-manager — found at VirtIO-Win
  • Add a temporary disk device (1 meg is fine) with virt-manager that’s virtIO, reboot, install drivers in Device Manager by pointing to the VirtIO-Win cd you just mounted.
  • Shutdown and remove the temp device and change the type of the your disk image from IDE -> VirtIO in virt-manager
  • Change the network driver to e1000 (better performance)
  • Optional: Switch video to Spice -> This requires installing linux apps, google it if you see choppy window behavior

General Windows / Office Stuff

  • Activate Windows
  • Install SP1 (if not bundled) + Remove backup files w/ Disk Cleanup after reboot / finished.
  • Install Office 2013
  • Open Office 2013 so that MS Updates are configured
  • Run MS Update, check for updates (to make sure SP1 install is reflected), then install all Windows and MS Office Updates

Say goodbye to Windows Installers

  • Go to Chocolatey.org. Open an Administrator command prompt and install it via the command on the front page of the site.
choco install GoogleChrome 7zip Firefox dropbox InSync MicrosoftSecurityEssentials javaruntime-platformspecific notepadplusplus
  • Drink a beer (or coffee), you just saved yourself hours and have tied yourself into an easy update mechanism.

Seamless RDP

  • While most applications handle operating in an RDP window fine, Office 2013 isn’t one... Go here to fix an annoying black shadow border that will show up in Office 2013 windows when run through RDP -> Fix The app to download is at the bottom of the page where it references RDP instead of Citrix.
  • Open Regedit and go to HKLocalMachineSOFTWAREPoliciesMicrosoftWindows NTTerminal Services, Add a DWORD32 value — “fAllowUnlistedRemotePrograms” – set the value to 1
  • Run ipconfig (to get your ip)
  • Lock your workstation
  • Open a linux terminal and run this:
xfreerdp -D -u USERNAME --ignore-certificate --plugin cliprdr --app --plugin rail --data "WinWord.exe" -- IPADDRESS
  • Bask in your increased productivity.