Virtual Hard Disk randomly unattaches from VM

Hello all. I am new to the forum. I’m an IT support specialist at my company, and we’re dealing with a very odd issue. We have a VM running Windows Server 2012 R2 Standard hosted in Hyper V. This virtual machine runs a software that our front desk admin
uses. We have the operating system installed on the C drive, and the software and database is installed on another drive (E drive we created, and attached to the VM.) We did this in order to keep the operating system, and software separate so that the C drive
would not fill up, and possibly crash the OS. Currently, the E drive randomly unattaches itself from the VM about once every week to two weeks. For example on Monday you may be able to log into the VM, see both drives perfectly fine, and use the software.
Then you log in on Tuesday (machine has not been restarted, and no settings have been changed) and the E drive has disappeared from "This PC" and you cannot use the software. The drive is still present on the hypervisor, and the data is still there
(I’m not worried about that) but it keeps randomly unattaching, and rendering the software unusable. My original fix for this was to just restart the VM. A script that I wrote would automatically attach the VHD through disk management on startup, and the software
would work fine. Now, for some reason, my script is not working, and I have to manually attach the VHD after restarting the VM to get the software to work again. But that is a separate issue.. The VHD should not be randomly unattaching itself in the first

My question is, what is the correct way to permanently attach a VHD to a virtual machine in Hyper V? Or why does this VHD randomly unattach itself even when the machine has not been restarted? I simply want to figure out how I can make sure that my VM and
software can remain stable. Any assistance/guidance is appreciated.

Read full post . . . .

Go Que Newsroom