A couple of years back, I was running Windows Server 2008 on my everyday notebook PC so that I could work with Hyper-V. That wasn’t really ideal and, these days, I’m back on a client OS – Windows 7 as it happens…
Even so, I’ve been discussing the concept of a developer workstation with my friend and colleague, Garry Martin, for some time now. I say “developer”, because Garry works in our application services business but the setup I came up with is equally valid for sysadmins who need a client side virtualisation solution (and no, type 2 hypervisors do not cut it – I want to run on bare metal!).
I finally got Hyper-V Server running from a USB flash drive a few days before Microsoft announced that it is a supported scenario (although I still haven’t seen the OEM document that describes the supported process). That provided the base for my solution… something that anyone with suitable hardware can use to boot from USB into a development environment, without any impact on their corporate build. Since then, I’ve confirmed that the RTM version of Hyper-V Server 2008 R2 works too (my testing was on the RC).
Next, I integrated the network card drivers for my system before starting to customise the Hyper-V Server installation. This is just the same as working with a server core installation of Windows Server but these days
sconfig.vbs makes life easier (e.g. when setting up the computer name, network, remote management, Windows updates, etc.), although it was still necessary to manually invoke the
control intl.cpl and
control timedate.cpl commands to convince Hyper-V that I’m in the UK not Redmond…
Other changes that I made included:
- Using the built in FTP client (
ftp.exe) to download a selection of my favourite tools for use when working with server core/Hyper-V Server: a Windows port of the GNU
wgetutility; 7-Zip; and
devcon.exe. In order to do this I needed to create a firewall exception using
netsh advfirewall firewall add rule name="FTP client" dir=in action=allow program="c:\windows\system32\ftp.exe" enable=yes(following the guidance in Microsoft knowledge base article 947709).
- Installing PowerShell using the following commands (although I later found that I could do this with
sconfig.vbs– note that it didn’t work for me using
dism.exeis a new command in Windows Server 2008 R2 and it looks pretty powerful):
dism /online /enable-feature /featurename:NetFx2-ServerCore
dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell
- Downloading and installing the PowerShell management library for Hyper-V.
- Copying 4 files from a full Windows Server 2008 installation to allow the Microsoft Remote Desktop Connection client to run as a portable application.
The real beauty of this installation is that, now I’ve got everything working, it’s encapsulated in a single virtual hard disk (.VHD) image that can be given to any of our developers or technical specialists. I can take my bootable USB thumb drive to any machine and boot up my environment but, if I used an external hard disk instead, then I could even take my virtual machine images with me – and Garry has done some research into which drives/flash memory to use, which should appear as a guest post later this week. Creating and managing VMs can be done via PowerShell (remember, this setup is mobile and is unlikely to be accessible from a management workstation) and access to those running VMs is possible from PowerShell or Remote Desktop. I could even install Firefox if I wanted (actually, I’ve not tried that on Hyper-V Server but it works on Windows Server 2008 server core)
Of course, what I’d really like is for Microsoft to produce a proper client-side hypervisor, like Citrix XenClient but, until that day, this setup seems to work pretty well.