Score:1

Error attaching or detaching virtual disk

mp flag

I just physically moved my home lab from one house to another and my storage space for my primary array will not re-attach. The message I get is "Error attaching or detaching virtual disk: Failed to attach virtual disk to MyServer."

I tried a few things including Get-VirtualDisk | Where-Object IsManualAttach -eq $true | Set-VirtualDisk -IsManualAttach $false and after multiple attempts I was able to set the value to $false.

I was able to pull these error messages from Event Viewer:

An error occurred during method execution.

Class:      SPACES_VirtualDisk
Method:     Attach
ObjectId:   [REDACTED]
Error Code: 4

And

An error has occurred during method execution.

Class:      MSFT_VirtualDisk
Method:     Attach
Error Code: 4
Error Message:

Failed
Activity ID: {68137d67-7406-4e9b-b566-050f30b9ea14}

Running Get-VirtualDisk | Connect-VirtualDisk in PowerShell returns:

Connect-VirtualDisk : Failed
Activity ID: {90b49a62-37c6-4dc1-aabc-1489763f0696}
At line:1 char:19
+ Get-VirtualDisk | Connect-VirtualDisk
+                   ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (StorageWMI:ROOT/Microsoft/...SFT_VirtualDisk) [Connect-VirtualDisk], CimException
    + FullyQualifiedErrorId : StorageWMI 4,Connect-VirtualDisk

At this point I am not sure what to do. I do have some commercial recovery software from RunTime Software but I would rather avoid doing that as that would require my to buy additional drives to offload all my data onto it. I do have a backup of 85% of it online but I would rather not go that route if possible.

mp flag
I ended up spending a few days restoring the data and about 20 TB of bandwidth later, I restored everything. I think what happened is a windows update nuked something permissions wise. A few updates installed before I powered down the machine before the move and I also had issues powering up my Hyper-V VM that uses a physical disk. It had a permissions error with accessing it. I had to remove the drive from the VM settings and then add it back.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.