Physical to Virtual Guest OS for Windows7 64 bit

This is for discussing general topics about how to use VirtualBox.
Post Reply
Daisuke
Posts: 4
Joined: 22. Jun 2019, 00:57

Physical to Virtual Guest OS for Windows7 64 bit

Post by Daisuke »

I have a Windows 7 laptop which I would like to "clone" as a disk image and run as a VM in either a Linux Mint host or a Windows 10 Host.
I have tried Clonezilla which creates a disk image and which completes the Restore process but when the restored system is started, it crashes immediately.
I also have a rescue DVD and a System Image of my hard drive created by Windows 7 Backup and Restore process.
I can boot off the rescue DVD, or off the original install DVD, but once up and running, the guest can never find the WindowsBackup directory on either a hard drive or a USB device.
I do not know how to provide access to a physical device from the settings->storage option. In Linux, it will only accept a file.
Is it possible to copy the contents of a device to a file and provide the data this way?
There would be no conflict, because once the software finds the disk image, it would copy it to the virtual disk. Then before rebooting, I would remove the physical device from the virtual OS.

Having spent a week working on this, I wonder if it is even possible.
Has anyone managed to run a Windows P2V disk image in VirtualBox?
If so, any advice would be most welcome and extra points if there is an online reference for the steps involved.
If this is not a supported use case for VirtualBox, please advise.
Thanks!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Physical to Virtual Guest OS for Windows7 64 bit

Post by scottgus1 »

P2V has been done a lot and there's a lot about it on the Virtualbox websites. Use your favorite search engine with the restricting tag 'site:virtualbox.org' to get everything Virtualbox has about it:

P2V site:virtualbox.org
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Physical to Virtual Guest OS for Windows7 64 bit

Post by BillG »

It is certainly possible. I have a vm version of my wife's old PC running as a vm on my machine. I simply cleaned up the disk on the old physical machine, created a .vhd file using disk2vhd and copied this to my PC. I then created a new vm using this file as its virtual hard drive.

The vm thinks it is still running on the old 500G HDD but the virtual disk uses only 46G.
LottieVM.PNG
This one is running Windows 10 and won't activate, but Windows 7 might.
Bill
Rootman
Posts: 251
Joined: 1. Oct 2012, 18:29

Re: Physical to Virtual Guest OS for Windows7 64 bit

Post by Rootman »

I've done this dozens of times. One key is to make the VM's disk controller an IDE controller and not a SATA - even if the 'real' laptop has a SATA. This one factor has allowed me to create a lot of successful P2V clones. There is NO performance advantage of a SATA controller in a VM, it's all virtualized anyway so one works just as well as another. If you are hell bent on having a SATA drive then create the VM with an IDE controller first, then add a second SATA controller along side the IDE, boot to Windows, get the SATA all straightened out with drivers, then down the VM and switch the disk from the IDE to the SATA controller and see if it works. I've done it, but just as an exercise, again there is NO performance advantage of SATA over IDE in a VM

You can use almost anything to get an image of the disk. I usually use Macrium Reflect and make a backup of the donor to a USB drive. I then use a Macrium Rescue ISO to boot the new VM with and restore the back from there. This way I avoid and weirdness with disks and concentrate on only the OS as it is only restoring the data and boot information.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Physical to Virtual Guest OS for Windows7 64 bit

Post by mpack »

Daisuke wrote: I have tried Clonezilla which creates a disk image and which completes the Restore process but when the restored system is started, it crashes immediately.
A Linux tool that just crashes when asked to work for real? Never!
Daisuke wrote: ... and a System Image of my hard drive created by Windows 7 Backup and Restore process.
A VHD? I seem to recall from past discussions on this site that the backup process doesn't necessarily create a bootable VHD, i.e. it doesn't do what Disk2VHD does. VHD is just a container, you shouldn't make assumptions about what it contains.

Like RootMan I've also had lots of success with Macrium in almost every scenario: P2P as well as P2V, and also just for backup and restore to the same PC.
Post Reply