Is there any free tool that will install a virtual image (VMware/vbox/virtualpc etc) on a hard driver and vice versa? I’m wanting to take a full image of a server i.e. just the OS on the C drive and use it as a backup then if a server fails restore it using the virtual image.
What you ask is technically possible, but sometimes complex. I'll include every way I can think of to accomplish what you're looking for but you'll have to evaluate your own technical level and decide what you're comfortable with. In case you want the short, pithy answer: it's better not to migrate and just do fresh installs. Guaranteed environments, everything known-state, etc. If VM conversion increases rather than decreases your workload, don't do it. It's provided as an option to ease the transition. If you have the time it'd probably be best to do this like you were getting a full hardware upgrade.
Virtual to Physical
I'll start out with installing a virtual image to disk. The main issue is that Windows doesn't deal well with changes to its underlying hardware. Virtual hardware is different enough from the physical hardware that you will see issues. You'll have to manually copy the virtual disk either by mounting it via loopback or booting a VM using a Linux LiveCD with an attached physical disk. Linux is more feasible by far since it works on most any hardware. If it's Linux you'll need to reinstall a boot loader; if Windows you'll have to play with device drivers. In both cases you'll have a long, convoluted, and technical process that will need careful handling. In the Windows case if you don't understand Windows imaging and deployment you may be out of luck.
Virtual on Physical
There's something that's halfway between native boot and VM boot: Windows 7 and Windows Server 2008 R2 both support booting a physical machine from a virtual drive. This feature is called Native Boot and requires you to modify the bootloader configuration.
Getting the VHD
If you already have a VHD you've no problem here. If you don't you might want to use one of the other options. See below, though: this falls into the P2V category.
VHDs are often created using ImageX or WDS and friends. This is only for fresh Windows installations, unfortunately; it's a slightly trickier version of automating a Windows install to physical disk.
You'll need to be in an environment with access to recovery tools. This basically means a preexisting Windows install (unlikely, since the space for creating this Windows install would be wasted once you start using your VHD), Windows Recovery Tools (boot to a command shell off an install disk), or WinPE (you can create a bootable CD with WAIK.
Once at a command shell you'll use
Physical to Virtual
This is much easier since it's in companies like VMware's best interest to make migration as simple as possible. There are a few ways to smooth over the slightly sticky bits. The easiest is probably VMware's vCenter Converter. I've only used it as part of a full-blown ESX setup but I believe it's possible to use by itself; you should check out the standalone download. It involves installing an agent to the machine to be converted. This agent pulls a copy of the disk and automagically creates a VMware virtual machine based upon it.
VirtualBox you'll have to manage by yourself, but basically entails taking a raw disk image and converting to a virtual drive with
For Windows Hyper-V or Virtual PC you'd want System Center Virtual Machine Manager. Unfortunately unlike VMware's offering this one costs gobs of money. Unless you're going the Hyper-V route, in which case you'll already have it, in which case I'm not really sure why you're asking this question :). But I mention it for completeness' sake. I hear Windows Backup can spit out some VHDs; that might work. There are some third party imagers that can do so, but none that are FOSS (that I know of).