Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restore large .vhd due to automount #12

Open
inator1192 opened this issue Jan 7, 2023 · 1 comment
Open

Unable to restore large .vhd due to automount #12

inator1192 opened this issue Jan 7, 2023 · 1 comment

Comments

@inator1192
Copy link

I hope this helps others with the same issue...

Hi, I ran into this error a couple of times and was unable to restore a .vhd to a new drive.

Can't write on physical drive. It's probably mounted.
You need to put it off line before to be able to write on it.
Microsoft choose this way for security reason...
It's nice for us and avoid to overwrite a non wanted drive.

The .vhd was about 220GB, so it took quite a while and I never made it to the end.
It appears like Windows was automatically rescanning the disks and mounted the the drive I was currently restoring.

I reproduced this behaviour by manually rescanning the disks while restoring, which produces the same error.

I then disabled automount in diskpart, ("automount" to check current setting; "automount disable/enable" to change the setting) started a new restore attempt and it worked.

Could this command be integrated into the program?

On start of a restore session -> "automount disable"
End or Cancel of restore session -> "automount enable"

(don't forget to re-enable automout if you had the same issue and found this)

@lp85d
Copy link

lp85d commented Jan 12, 2024

А можно просто форматировать физический диск и всё пойдёт как по маслу
compmgmt.msc /s
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants