Is it possible to restore a windows 10 home backup inside a virtual machine?

Discussions related to using VirtualBox on Windows hosts.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by scottgus1 »

einstein1969 wrote:the recovery drive is a usb stick. how should i continue?
All of the options could be used with the backup being on a USB stick. It depends on if the Windows 7 restore CD can use the VM's network or USB system.

First I would try to set the VM network to Bridged or Host Only, then share the USB drive in the host OS then try to see if the restore CD can see the shared folder.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by mpack »

scottgus1 wrote:
einstein1969 wrote:the recovery drive is a usb stick. how should i continue?
All of the options could be used with the backup being on a USB stick.
I think the OP means that he used the option in the Windows 10 dialog to "Create a System Repair disk". This will not be the disk containing the backup image.

As I already mentioned above, you will need an ISO version of the recovery disk before you can use it in a VirtualBox VM. I can't give details since I've never used the Windows Backup feature, but if the creation function offers an ISO option then use that. Otherwise you would have to use an ISO management tool (ImgBurn is what I usually use) to transfer the USB stick contents to a CD image (i.e. to an ISO). Do remember to mark the CD image bootable otherwise it won't boot.
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

scottgus1 wrote:
einstein1969 wrote:the recovery drive is a usb stick. how should i continue?
All of the options could be used with the backup being on a USB stick. It depends on if the Windows 7 restore CD can use the VM's network or USB system.

First I would try to set the VM network to Bridged or Host Only, then share the USB drive in the host OS then try to see if the restore CD can see the shared folder.
I have not explained myself well or the translator does not work and I know little English. The software to start in case of disk failure I have it on a USB stick, I don't have the CD in short. The data that has been copied I have them on another external usb3 drive
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

mpack wrote:
scottgus1 wrote:
einstein1969 wrote:the recovery drive is a usb stick. how should i continue?
All of the options could be used with the backup being on a USB stick.
I think the OP means that he used the option in the Windows 10 dialog to "Create a System Repair disk". This will not be the disk containing the backup image.

As I already mentioned about, you will need an ISO version of the recovery disk before you can use it in a VirtualBox VM. I can't give details since I've never used the Windows Backup feature, but if the creation function offers an ISO option then use that. Otherwise you would have to use an ISO management tool (ImgBurn is what I usually use) to transfer the USB stick contents to a CD image (i.e. to an ISO). Do remember to mark the CD image bootable otherwise it won't boot.
The version that I have installed now of windows allows me to use only USB drives, even if I have a DVD burner. I don't create the iso file, but I think you can use software. I think I solved it using the windows installation iso. I started it on the virtual machine and the installation starts but at first it asks if you want to access the recovery options.

I tried to restore the backup by creating a vhd file with window disk management and I copied the "windowsImageBackup" directory that contains the backup. But I had problems with the fact that it is uefi the backup and also the boot sequence and the controller type gave me problems, after several numerous attempts I managed to start the recovery procedure but it gave me error, then I done something and now nothing works anymore ... I mean I can't reproduce the error to show you, even if I recreate the machine it gives me an error:

Can you help me get out of it?
Attachments
image1.png
image1.png (120 KiB) Viewed 14054 times
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

I found the error that I can no longer reproduce. however it was this:
Attachments
VirtualBox_restore_12_09_2021_02_46_38.png
VirtualBox_restore_12_09_2021_02_46_38.png (13.53 KiB) Viewed 14054 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by scottgus1 »

If you made a VHD on the host OS and copied the backup media to it, then you have to unmount the VHD from the host OS to use it in the VM.

Forget this VM. Reset Virtualbox so everything starts fresh:
Reboot the host so no Virtualbox processes are running.
Go to C:\Users\{youraccount} and move the folder ".Virtualbox" (note the period in the name) to your desktop.
Start Virtualbox. The VM list will be empty.
Make a new VM with a correctly-sized disk file.
Put the Windows 10 ISO in the VM's Optical Drive.
Add the VHD to the VM.
Start the VM and try the restore.

Also, Web translators can't translate pictures. Please type the text of the error next time you have an Italian error.
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

Thanks for your support and forgive me for the unwritten image, I am lazy sometimes.

However I found that yandex is online that translates an image into text. It's not very accurate, but it's a good starting point.

I followed your instructions and after several attempts I was able to restore the backup. The disk needs to be 1 tera size like the backup one, otherwise it gave me an error. I created it dynamically expanding.

The size of backup is about 20-25GB. The problem is that it took a long time, almost two days, for restore and startup the windows 10 restored. My laptop is not a splinter so it definitely depends on it.

I have seen that there are various settings in the virtual machine. I have already fixed the ram by increasing it from 2GB(the default for win10) to 3GB and it speeded up a lot. I have assigned 4 processors (the host has 4 processor and 8GB ram).

Can you tell me the best ones to get the fastest VM possible? What else can I do?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by scottgus1 »

Congratulations on getting the backup restored!

Regarding number of processors: if the VM OS does not have much multiprocessing software like video transcoding programs installed, 2 processors should be enough. 2 processors is a hint faster than 2 processors' worth of data through 4 processors, due to extra processor scheduling oversight on the host.

If you don't want the VM's disk expanding to 1TB over time, you can limit the main partition size in the Windows Disk Management to the maximum you want it to get.
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

thanks for the great advice, the partition he restored is 20GB so it doesn't expand. However, it has the recovery partition at the end of the 1 tera disk.

I wanted to ask you if you can advise me how to set these parameters of the vm. Always to see if I can speed it up again.

1) PAE / NX
2) AMD-V
3) AHCI sata controller (okay?)
4) IO Host cache
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by mpack »

einstein1969 wrote: I wanted to ask you if you can advise me how to set these parameters of the vm. Always to see if I can speed it up again.

1) PAE / NX
Don't change this. If it's required by the OS then the template already sets it.
einstein1969 wrote: 2) AMD-V
VirtualBox 6.1.x no longer gives you the VT-x/AMD-v enable option. It's always enabled.
einstein1969 wrote: 3) AHCI sata controller (okay?)
With the VM shut down it is easy to add a SATA controller in "Storage" settings and then move the hard disk to the new controller. Don't expect a huge performance boost though. In my experience the speed of a virtual hard disk is dominated by the speed of the physical drive it's located on. Fastest would be an SSD, slowest would be a USB or network drive.
einstein1969 wrote: 4) IO Host cache
You can experiment with turning it on, but don't turn it off.


... but I would question whether any of these (other than moving the VM to an SSD) will have much impact on performance. Plus it would be wise to be specific about which performance aspect concerns you. Certainly the first thing to do is to make sure the Guest Additions are installed.
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

One thing I didn't understand about using the host's io cache.

When you say "but don't turn it off" do you mean it's better to turn it on? Or that if it is activated it is better to leave it activated? Does the VM manager automatically activate it?

For the guest additions I had already installed them as soon as the guest started.

I also have another question. In the vm I had to activate EFI. But now I wanted to redo the restore and therefore I need to boot from cd / iso.But as soon as the machine starts, the windows 10 guest system starts on the harddisk. I don't know how to boot from CD / ISO. How should I do?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by mpack »

Turning on the host I/O cache has been known to lead to instability. So if it's off and you're already happy with disk performance then you might be best to leave it off. Or, if it is on and the VM is stable then you gain nothing by turning it off.

> I had to activate EFI. ... I need to boot from cd / iso. ... How should I do?
As you will no doubt have discovered, the "boot order" settings only apply to legacy BIOS, not to UEFI. The only workaround at present is to hit Esc a few times as soon as the VM starts booting, which should break you out to a boot menu, allegedly (never tried it myself as very few of my VMs use EFI).
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

The ESC key worked, thanks.
einstein1969
Posts: 16
Joined: 9. Sep 2021, 15:06

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by einstein1969 »

Hi, I've been using this method for a while now.
I have two questions.

1) How can I set the virtual machine date independently of the host system date after I have done a restore or immediately before?

2) Since I often have to copy GB of backup data to the virtual machine disk, I wanted to know if there was an option to avoid it because the copy takes several hours. The copy is that of the windowImageBackup directory on the disk mounted by disk management.

I have seen that there is a thing called "VISO" maker, but the documentation I have found is scarce to understand.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Is it possible to restore a windows 10 home backup inside a virtual machine?

Post by mpack »

einstein1969 wrote: 1) How can I set the virtual machine date independently of the host system date after I have done a restore or immediately before?
Independently? Not possible. When a physical PC boots up it gets current time from the Real Time Clock (RTC) chip on the motherboard. Call this timeref1. Once booted it might also get time from a network time server, if it has internet access. Call that timeref2. If you installed the Guest Additions then you can apply a fixed offset to the VM timeref1, but you can't make it truly independent, because no PC "remembers" a time, they all read it from RTC or network.
einstein1969 wrote: 2) Since I often have to copy GB of backup data to the virtual machine disk, I wanted to know if there was an option to avoid it because the copy takes several hours.
I'm tempted to pass on this one since I have no idea what data you are copying into the VM, or why. I will however say that the fastest function on a computer is one that doesn't need to happen at all. I.e. consider less cumbersome alternatives.
einstein1969 wrote: I have seen that there is a thing called "VISO" maker, but the documentation I have found is scarce to understand.
Yep, the devs keep promising to expands the docs for this feature, or create a fancy GUI interface to it, but I guess it never has priority. A virtual ISO (.viso) is just a little text file that describes the contents of an ISO, so VirtualBox will just pretend that such an ISO exists so you don't actually have to create it. I am attaching a .viso file that I created an an experiment. I believe you can just plonk this file into a folder and it will make the contents of that folder part of the ISO. NOTE HOWEVER THAT IT NEEDS TO BE EDITED. In order to be bootable (which this viso is) it has to include references to a boot folder and several files that would normally be present on a bootable DVD. In my case I already had a bootable Win10ISO folder, so I just inserted a bunch of references to files in that. I suggest you do something similar and correct the path references in the viso file.
Attachments
ad-hoc.viso.zip
(397 Bytes) Downloaded 11 times
Post Reply