Is there any software to 'copy' a physical machine to a virtual one?
October 29, 2010 12:52 AM   Subscribe

Is there any software to 'copy' a physical machine to a booting virtual one?

I am looking for some software to create a Virtualbox or Virtual PC image and VHD type files from a real pc.

I've seen some things online but usually they only seem to make a copy of the hard drive, they don't actually boot.

Cheers!
posted by tomw to Technology (12 answers total) 8 users marked this as a favorite
 
If you're setting up Windows, you might look at sysprep.
posted by Blazecock Pileon at 1:02 AM on October 29, 2010 [1 favorite]


Vmware have some licensed software called Vsphere converter which will create a bootable vm from a real windows machine.
posted by elephantday at 1:10 AM on October 29, 2010


If you prepare Windows properly beforehand, an image of the existing hard disk installation will indeed boot in a VM. You need to replace the existing hard disk controller driver with the Microsoft "standard IDE controller" driver (or the "standard SCSI controller" driver if the box currently boots from a SCSI drive) and you need to replace the existing display driver with the Microsoft "standard VGA controller" driver. You can do this by hand if you don't like any of the available automated tools.

Once the VM is booting successfully, you can install the guest display, disk controller and network drivers the VM environment provides for Windows to make it perform as it should, then use the Device Manager as described in the Ars Technica article I linked above to remove all the devices the VM doesn't have.
posted by flabdablet at 1:27 AM on October 29, 2010


I'm assuming you mean a windows installation, as you don't say.

Some good advice above, it is definitely easier if you can do some work on the system before trying to turn it into a VM - but sometimes that's not possible.

I've used VMWare converter successfully (probably the same thing as elephantday mentions, but it is free as far as I know) but have run into a few systems that it didn't work on.

Anything that gives you a raw disk image can be made to work, although you may run into the dreaded STOP 0x...7B error with windows XP - this happens when the disk driver is not able to read from the boot device. Windows starts booting using the computer BIOS, but then loads its own driver when it switches to 32-bit mode - and if that driver can't read the disk then it stops with a blue screen and the 7B error. Depending on which driver the system is using you can sometimes get these to boot by changing the emulated disk subsystem from IDE to SCSI, but sometimes it's just hopeless.

My favourite method at the minute is to use Acronis TrueImage to back-up the system and restore it into a VM with their universal restore. This does basically the same thing as sysprep without needing to do it before taking the backup and usually works fine. I mostly like this because we are using Acronis for system imaging anyway. Drawbacks are Acronis isn't free and you still have to deal with the windows activation issue.
(Also Acronis is slowly going the same way Ghost went - soon it will be nothing but a bad backup program instead of a decent system imaging tool).

Once you've got your system booting in a VM, you will probably need to bypass the windows authentication. Technically this is against the licence, but I assume you're just doing this for testing purposes. If you are permanently converting your windows install to a VM then you can just activate it as normal (only if it's a real licence, OEM keys won't work because they are linked to the motherboard type they are installed on).

Woah, that's a big wall of text. Oh well.
posted by samj at 2:11 AM on October 29, 2010


Response by poster: Thanks for the tips so far.... I should clarify...

Yes this is for Windows based systems. It's generally for remote machines which I don't manage. I sometimes have to debug software installed on them which has a few different components. It struck me that I could take a full backup and work on them as virtual machines somehow when we don't want to mess with settings in a live environment.

I checked out VMware converter... looks good. I will also check the suggestion of how to change vhds to make them bootable.
posted by tomw at 2:19 AM on October 29, 2010


I think the keyword you're missing from your google searches is "p2v", which'll get you these instructions for virtualbox.
posted by yeoz at 2:25 AM on October 29, 2010


You may also want to take a look at Novell's PlateSpin Migrate.
posted by kovacs at 3:19 AM on October 29, 2010


With ShadowProtect Desktop you are able to use the HDD backup image as a source for a VirtulBox VM. If you are interested in exploring this path, you should look at the following features: Hardware Independent Restore (HIR), VirtualBoot, Virtual Converter. In order to backup from a bootable CD (w/o installing the software on the target computer) you need to get the ISO CD - you will have to contact them or ask for a full evaluation.
posted by MzB at 3:51 AM on October 29, 2010


Another way to do a Windows p2v that I've used successfully is to use the inbuilt Windows Backup (ntbackup.exe) tool to take a complete backup of all local drives and system state, then do a fresh Windows installation inside the VM, making sure you create at least as many drives as the physical machine had and that none of them are smaller; then boot the VM and run ntbackup from inside it to restore everything from the physical backup.

You will probably want to exclude C:\WINDOWS\system32\drivers from the restore, as restoring system state will also restore references to drivers that probably won't be appropriate for the VM. If the referenced drivers are missing when Windows boots, it will whinge but not die. On the other hand, if they're all present and correct it may well attempt to use them during bootup and bluescreen.
posted by flabdablet at 4:01 AM on October 29, 2010


You want Disk2VHD, available free from Microsoft.
posted by deezil at 4:13 AM on October 29, 2010


IS this for high end servers? You might want to look into System center virtual machine manager 208 r2.

It has exactly what you are looking for. Can convert physical machines to virtual ones. It uses windows built in stuff and does it in the background. IT leaves the physical server running and you can set it so that once its done it shuts down the physical machine and boots up the virtual one. We have virtualized 5 of our machines this way so far.

Also most backup solutions can do this 2.
posted by majortom1981 at 4:48 AM on October 29, 2010


Seconding Virtualbox

I think you could also try clonezilla and try to recover the image after making your VB boot the clonezilla CD iso image...

Links regarding windows HAL for VB:
VB HAL discussion and guide for XP

Clonezilla discussion

google (your flavor of Virtual software) and P2V or p to v and you'll likely find a guide.

Good Luck!

also, I've successfully used gparted to expand a VB partition when I moved to a larger drive so the VM could make use of the larger space too...
posted by clanger at 5:42 PM on October 29, 2010


« Older We must not touch our hairdos...   |   Powerbocks to replace a bike? Newer »
This thread is closed to new comments.