Restoring a physical computer image backup to a VM.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
mercyfall
Posts: 3
Joined: 5. Sep 2016, 10:30

Restoring a physical computer image backup to a VM.

Post by mercyfall »

Hi all. I am testing out a backup software called "Drive Snapshot". Some of you have probably heard of it before. I don't have any spare physical machines at the moment to do a test restore on so I'm using VirtualBox. I'm attempting to restore a complete disk image (partitions and everything) as I would expect to have to do in a real scenario, by booting off a Windows install disc and using the recovery console command prompt to image the hard drive. My host is Windows 7 x64.

My difficulty is in how to access the snapshot program and image directories stored on my host from the VM's recovery console cmd prompt through VirtualBox. I can't access the shared folders I've setup. For example I've setup a folder share called "Snapshot". I've set it to auto-mount and make permanent. I boot up the VM, initialize the networking interface by typing "wpeutil initializenetwork", then try "net use S: \\vboxsvr\Snapshot\". It tells me it can't find the specified directory. I've tried installing Guest Additions through the load drivers option but no matter what file I choose Windows tells me that "the specified location does no contain information about your hardware". That's probably not right anyway, just trying it since I know GA needs to be installed on the VM.

Any suggestions or help is appreciated. Thanks!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restoring a physical computer image backup to a VM.

Post by mpack »

Actually, I'm not familiar with the imaging program mentioned, but most normally feature a boot CD or boot USB stick (*) which you boot the failed PC with. Then you access the drive containing the backup and restore it to your blank hard disk (I'm imagining a scenario where the original hdd failed, as that's close to what you have with a blank VM).

Note that there is no OS installation step, but you should choose the correct OS in the VirtualBox template.

(*) VirtualBox VMs can't be booted from a USB stick. You must boot from a virtual CD, i.e. an ISO of your recovery CD. The backup file can however be on any drive which the recovery CD enables access to, e.g. network, USB etc.
mercyfall
Posts: 3
Joined: 5. Sep 2016, 10:30

Re: Restoring a physical computer image backup to a VM.

Post by mercyfall »

mpack wrote:I'm imagining a scenario where the original hdd failed
That's exactly what I'm trying to replicate... a HDD failure, critical OS failure requiring reformatting, or complete PC replacement.
mpack wrote:Then you access the drive containing the backup
Therein lies my difficulty. How do I access the drive containing the backup? In a real scenario I would either have the recovery image on a USB drive or network location. To restore the image I would have to boot with a recovery disk like you said and use DOS to run the snapshot program and access the image. This would be no problem with a physical machine. But in VB you have to install something on the guest OS to access the shared folder. The only way I can think of accessing them without drivers right now is copying them to a USB drive or making an ISO image. But it seems kind of a roundabout way. I'm kind of determined to figure out how to access the image from the "shared folder", which is seen as a network resource in the guest. Does that make sense?
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Restoring a physical computer image backup to a VM.

Post by Martin »

If you have recovery boot media which can access the backup over the network this should work the same way in VM.
For the Virtualbox Shared Folder you would need to install the Vbox Guest Additions to your boot media, which is much more complicated than to just use standard network file sharing.
mercyfall
Posts: 3
Joined: 5. Sep 2016, 10:30

Re: Restoring a physical computer image backup to a VM.

Post by mercyfall »

Martin wrote:If you have recovery boot media which can access the backup over the network this should work the same way in VM.
Sigh... I knew I was being stupid. Sometimes I overcomplicate things. Thanks.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Restoring a physical computer image backup to a VM.

Post by mpack »

I had a quite similar discussion when I was new to this the site. The discussion is well worth reading all the way through IMHO, since I end up covering all of the available methods of accessing your backup file. At that time my image backup tool was Acronis using BartPE for the recovery CD, but the principles would be the same with other software and a different recovery CD - as long as it's bootable and gives you a few media choices (network, secondary hard disk, media etc).

Accessing huge Acronis Images After a CD Boot
SparkingDidley
Posts: 1
Joined: 22. Sep 2016, 19:25

Re: Restoring a physical computer image backup to a VM.

Post by SparkingDidley »

I have a similar issue. I'm trying to restore an iso image of a computer running RAID 1 with openSuse 32. The backup process generates a bootable DVD that runs SLAX.
This works fine with physical hard drives. Normally I boot from the DVD with two blank hard drives, run a script that formats sda and sdb, and then restores the computer. I would like to virtualize the machine.
So, I've configured a VirtualBox VM for openSuse32, assigned the DVD (drive E: from my Windows 7 host) to the IDE Primary Master, and created a new .vdi for SATA port 0.

The VM boots fine into SLAX. But when I run fdisk -l, no disks are listed. There is no /dev/sda or /dev/sdb to restore to.

Any guidance you can provide is very much appreciated!
Post Reply