Jump to content

Can't Detach VHD

Go to solution Solved by Oshino Shinobu,
Just now, perplex said:

offline does the same error

 

powershell says

 

Dismount-VHD : The term 'Dismount-VHD' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Dismount-VHD cmdlet
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Dismount-VHD:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

 Looks like it may actually be created by the Windows Sandbox feature. See if that's enabled (Control Panel > Programs and Features > Turn Windows features on or off > Windows Sandbox). Or you can disable it through Powershell as well:

 

Disable-WindowsOptionalFeature –FeatureName “Containers-DisposableClientVM” -Online

i never added the VHD, i think it was added because i plugged in a external hd with windows on it, and im assuming that had the VHD on it (wasnt my drive)

 

in computer management i click detach and it says the file location what isnt on my current pc, im assuming the external drive windows system, after i click ok it says the device is not ready

 

running windows 10

 

how so i force delete it? it only shows in computer management, and i cant assign it a letter path or delete volume, i can only turn it online and offline

 

 

1.JPG

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/
Share on other sites

Link to post
Share on other sites

If you turn it offline and then detach it, does it work? 

 

If not, try running Powershell as admin and use the Dismount-VHD cmdlet

 

EDIT: Looks like it may actually be created by the Windows Sandbox feature. See if that's enabled (Control Panel > Programs and Features > Turn Windows features on or off > Windows Sandbox). Or you can disable it through Powershell as well:

 

Disable-WindowsOptionalFeature –FeatureName “Containers-DisposableClientVM” -Online

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789827
Share on other sites

Link to post
Share on other sites

4 minutes ago, Oshino Shinobu said:

If you turn it offline and then detach it, does it work? 

 

If not, try running Powershell as admin and use the Dismount-VHD cmdlet

offline does the same error

 

powershell says

 

Dismount-VHD : The term 'Dismount-VHD' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Dismount-VHD cmdlet
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Dismount-VHD:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789830
Share on other sites

Link to post
Share on other sites

Just now, perplex said:

offline does the same error

 

powershell says

 

Dismount-VHD : The term 'Dismount-VHD' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Dismount-VHD cmdlet
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Dismount-VHD:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

 Looks like it may actually be created by the Windows Sandbox feature. See if that's enabled (Control Panel > Programs and Features > Turn Windows features on or off > Windows Sandbox). Or you can disable it through Powershell as well:

 

Disable-WindowsOptionalFeature –FeatureName “Containers-DisposableClientVM” -Online

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789832
Share on other sites

Link to post
Share on other sites

3 minutes ago, Oshino Shinobu said:

 Looks like it may actually be created by the Windows Sandbox feature. See if that's enabled (Control Panel > Programs and Features > Turn Windows features on or off > Windows Sandbox). Or you can disable it through Powershell as well:

 

 


Disable-WindowsOptionalFeature –FeatureName “Containers-DisposableClientVM” -Online

 

ah looks like you are correct, it was sandbox, thanks

 

i never got sandbox to work though keeps saying -  error 0xc0370106 when trying to launch any ideas for that?

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789835
Share on other sites

Link to post
Share on other sites

1 minute ago, perplex said:

ah looks like you are correct, it was sandbox, thanks

 

i never got sandbox to work though keeps saying -  error 0xc0370106 when trying to launch any ideas for that?

Not sure on that. 

 

An article I found suggests that KB4501375 could have caused it. Most of the June cumulative and security updates broke some pretty important Windows features, so I wouldn't be too surprised. If you haven't already, try applying July's updates and see if you get the same problems. 

 

EDIT: it also suggests that KB4497165 seems to be causing it. Uninstalling that (it's an update from May) supposedly fixes it.

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789843
Share on other sites

Link to post
Share on other sites

4 minutes ago, Oshino Shinobu said:

Not sure on that. 

 

An article I found suggests that KB4501375 could have caused it. Most of the June cumulative and security updates broke some pretty important Windows features, so I wouldn't be too surprised. If you haven't already, try applying July's updates and see if you get the same problems. 

yea thats what i read too, how do you re apply the update?

 

maybe ill just keep waiting for them to fix, surly they know about it

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789844
Share on other sites

Link to post
Share on other sites

Just now, perplex said:

yea thats what i read too, how do you re apply the update?

If you've already installed the new updates, then it's probably not that. 

 

Further on in the article, it says KB4497165 is causing it. Search to see if you have that installed and uninstall it. 

 

Can be done through installed updates in control panel. 

 

Quick PS to search for it if you want.

 

get-hotfix | findstr "KB4497165"

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789848
Share on other sites

Link to post
Share on other sites

5 minutes ago, Oshino Shinobu said:

If you've already installed the new updates, then it's probably not that. 

 

Further on in the article, it says KB4497165 is causing it. Search to see if you have that installed and uninstall it. 

 

Can be done through installed updates in control panel. 

 

Quick PS to search for it if you want.

 

 


get-hotfix | findstr "KB4497165"

 

yea it doesn't let me uninstall it, no option

 

all good, ill just wait for them to fix, if they ever do...

Link to comment
https://linustechtips.com/topic/1091709-cant-detach-vhd/#findComment-12789856
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×